I am having one of those problems that you just cant figure out even though its simple code.
Here is my html:
[code]
User List - Account Deletion |
Here is my php:
[php]<?php
if(isset($_POST[‘yes’])){
echo “test”;
//mysql_query(“DELETE FROM users WHERE id=$id”);
//header(“Location:?p=userlist”);
echo “yes”;
}
if(isset($_POST['no'])){
//header("Location:?p=userlist");
echo "no";
}
$id = $_SESSION['userID'];
$result = mysql_query("SELECT * FROM users WHERE id=$id");
while($row = mysql_fetch_array($result)){
$fname = $row['first_name'];
$lname = $row['last_name'];
}
$message = "Are you sure you want to delete the user: ".$fname." ".$lname."? <input type='submit' name='yes' value='Yes'><input type='submit' name='no' value='No'>";
?>[/php]
When I click either yes or no I go to a blank page (its the same page). And I can’t even echo out if its getting to the isset if statements. Its probably something stupid, but it happens.