All pastes #181932 Raw Edit

Something

public text v1 · immutable
#181932 ·published 2006-09-25 14:42 UTC
rendered paste body
$result = mysql_query("SELECT * FROM nuke_usershop where username='$uname'");
while ($row = mysql_fetch_assoc($result)){
$rows[] = $row;
 
 
}
 
if($delete){
	for($i=0;$i<$count;$i++){
		$itemname = $checkbox[$i];
		$sql = "DELETE FROM nuke_usershop WHERE itemname='$itemname'";
		$result = mysql_query($sql);
	}
}
 
echo "<table border=2>\n";
 
 
 
	echo "<tr><td>Item Name</td><td>Item Price</td><td></td></tr>\n"; 
foreach($rows as $irow) {
	echo '<tr><td>'.$irow['itemname'].'</td><td>'.$irow['price'].'</td><td>'.$irow['price'].'</td><td><input type="checkbox" name="checkbox[]" value="'.$irow['itemname'].'" /></td></tr>';
$itemname = $irow['itemname'];
}
 
	echo "</table>\n";
 echo '<input type="submit" name="$delete" value="Delete">';