What is wrong with the code?

I have been trying to solve this problem for a week and cannot see what I have done wrong (I am fairly new to PHP)
I am trying to make a php program that can remove items from a MySQL database. I have the form and the options. But when I click ion remove it always says:
Sorry, no high score was specified for removal.
I’m using ‘localhost’.
I’m sure it is something obvious! I include both programs below:

Admin.php

<?php require_once('appvars.php'); require_once('connectvars.php'); // Connect to the database $dbc = mysqli_connect(DB_Host, DB_User, DB_Password, DB_Name); // Retrieve the score data from MySQL $query = "SELECT * FROM gwdb ORDER by score DESC"; $data = mysqli_query($dbc, $query); //LOOP through the array of score data, formatting as HTML echo ''; while ($row = mysqli_fetch_array($data)) { //display score data echo ''; echo ''; echo ''; echo ''; } echo '
' . $row['first_name'] . '' . $row['last_name'] . '' . $row['score'] . 'Remove
'; mysqli_close($dbc); ?>

removescore.php

Guitar wars -Remove High Socre

Guitar Wars - Remove High Score

<?php require_once('appvars.php'); require_once('connectvars.php'); if (isset($_GET['first_name']) && isset($_GET['last_name']) && isset($_GET['score']) && isset($_GET['screeenshot'])) { //Grab the score data from the GET $first_name = $_GET['first_name']; $last_name = $_GET['last_name']; $score = $_GET['score']; $screenshot = $_GET['screenshot']; } else if (isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['score'])) { // Grab the score data from the post $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $score = $_POST['score']; $screenshot = $_POST['screenshot']; } else { echo '

Sorry, no high score was specified for removal.

'; } if (isset($_POST['submit'])) { if ($_POST['confrim'] == 'YES' ) { //Delete the screen shot image from the server @unlink(GW_UPLOADPATH. $screenshot); //Connect to the database $dbc = mysqli_connect(DB_Host, DB_User, DB_Password, DB_Name); //Delete the score data from the database $query ="DELETE_FROM gwdb WHERE first_name = $first_name LIMIT 1"; mysqli_query($dbc, $query); mysqli_close($dbc); //Confirm success with the user echo '

The high score was not removed.

'; } } else if (isset($first_name) && isset ($last_name) && isset($score) && isset($screenshot)) { echo '

Are you sure you want to delete the following high score?

'; echo '

First Name: ' . $first_name . '
Last Name: ' . $last_name .'
Score: '. $score . '

'; echo ''; echo ' YES '; echo 'NO
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '

<< Back to admin page

';

Sponsor our Newsletter | Privacy Policy | Terms of Service