All pastes #923715 Raw Edit

Something

public php v1 · immutable
#923715 ·published 2008-02-29 20:04 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Boutique Le Tuul</title><link rel="stylesheet" type="text/css" href="main.css"/></head><?//Connnection propertissession_start();session_destroy();$host = "localhost";$user = "";$sqlpw = "";$db = "";$table = "";$username = $_POST['username'];$password = $_POST['password'];$password_md5 = md5($password);$connection = mysql_connect($host, $user, $sqlpw) or die ("Database is currently offline");mysql_select_db($db, $connection) or die ("Cannot establish connection with the database");$createTableProduct = 	"CREATE TABLE shopProduct	(	pid int NOT NULL AUTO_INCREMENT,	PRIMARY KEY(pid),	name text,	description text,	dateDay int(2),	dateMonth int(2),	dateYear int(2),	price int(20),	category int(2)	)";	$createTableCategory = 	"CREATE TABLE shopCategory	(	cid int NOT NULL AUTO_INCREMENT,	PRIMARY KEY(cid),	name tinytext	)";mysql_query($createTableProduct);mysql_query($createTableCategory);?><div id="container">		<div id="mainbox"> 	<div id="leftmenu">	<?	$result = mysql_query("SELECT DISTINCT category FROM shopProduct", $connection); 	while ($cid = mysql_fetch_array($result))	{	$result = mysql_query("SELECT name FROM shopCategory WHERE cid = '".((int)$cid['category'])."'");	$row = mysql_fetch_assoc($result);	$category = $row['name'];		echo '<h2>',$category, '</h2>';	}	?>	 </div>	</div></div><body></body></html>