Code: Select all
if(strlen($_POST['cancel'])) { //cancel button
if($_POST['pin'] != $pin) { //if the text box does not match the dbfield
$error=TRUE;
$msg.='<li>You did not enter the security code correctly!</li>'; //show error msg
} else {
$r = mysql_query("delete from Users WHERE pin='".$_POST['pin']."'")or die (mysql_error()); //execute query
Code: Select all
<?php
if($DONE==TRUE) {
?>
<h4 class="left_nav" style="margin-top: 1em;">Account Being Deleted..Please Wait... </h4>
<p>You are now being logged out. Sorry to see you go</p>
<?php
} else {
?>
<?php if($error==TRUE) { echo "<ul><font color=red>$msg</font></ul>"; } ?><form action="termination.php" method="post"><table width="100%">
<tr>
<td width="31%">Security Code : </td>
<td width="69%"><input name="pin" type="text" id="pin" style="width: 200px;" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"><div align="center"><input name="cancel" type="submit" id="cancel" value="Cancel My Account" /></div></td>
</tr>
</table>
</form> <?php } ?> I hope someone can help me out i know I must be forgetting something to let it work.
Thanks