this is my deletegame.php code that shows the games I can select to delete by the title only:
this is the removegame.php code that needs to remove the game and all data that goes with that particular game:
The game info is not deleted when I run this script, can someone help me fix my problem?
Thanks in advance!
this is what is in my config for $title:
Code:
<?
include("./config.php");
?>
<html>
<form method="post" action="removegame.php">
<h3>Delete Game:</h3>
<select name="id">
<?php echo $title; ?>
</select>
<br>
<br>
<INPUT TYPE="submit" name="submit" value="submit">
</form>
this is the removegame.php code that needs to remove the game and all data that goes with that particular game:
Code:
<?
if($_POST['submit'])
{
include("./config.php");
$id = mysql_real_escape_string($_POST['id']);
$result=MYSQL_QUERY("DELETE FROM gamepage WHERE id='$id'");
echo "Query Finished";
Header ("Location: ./deletegame.php");
}
?>
The game info is not deleted when I run this script, can someone help me fix my problem?
Thanks in advance!
this is what is in my config for $title:
Code:
//this pulls gamepage title into deletegame.php
$result = mysql_query("SELECT * FROM gamepage");
$title = '';
while ($row = mysql_fetch_assoc($result)) {
$title .= '<option value="' . $row['title']. '">' . $row['title']. '</option>';
}
Last edited:





