All pastes #83767 Raw Edit

Stuff

public php v1 · immutable
·published 2006-07-10 01:36 UTC
rendered paste body
<?PHP session_start(); require("access.php"); ?><?php include("top2.php"); ?><?phpif(isset($_POST['Delete'])) { $id = $_GET['id'];$query = mysql_query("DELETE FROM gallery WHERE id=".$id." LIMIT 1 ");{echo "This image has been delted from the gallery. <p>";};} else {?><?php$id = $_GET['id'];$query = mysql_query("SELECT * FROM gallery WHERE id = '".$_GET['id']."' ") or die(mysql_error());$data = mysql_fetch_array($query);?><table width="433" border="0">    <tr>    <td height="75"><div align="center"><strong>Image: </strong></div></td>    <td colspan="2"><div align="center"><img src="<?=$data['image_loc']?> " width="300" height="200"></div></td>  </tr>    <tr>    <td height="29"><strong>Title:</strong></td>    <td colspan="2"><?=$data['title']?></td>  </tr>  <tr>    <td height="38"><div align="center"><strong>Description:</strong></div></td>    <td colspan="2"><?=$data['description']?>    </td>  </tr>  <tr>    <td>&nbsp;</td>    <td><form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">      <div align="center">        <input name="Edit" type="submit" id="Delete" value="Delete">      </div>    </form></td>  </tr></table><?php}?><?php include("bottom2.php"); ?>