By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,722 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,722 IT Pros & Developers. It's quick & easy.

Remove record from Mysql

P: n/a
I am trying to remove a record from the database but it is not working.

Here is my code:

---------------------------------------------------------------------

<?php require_once('Connections/myDB.php'); ?>
<?php
mysql_select_db($database_myDB, $myDB);
$query_Recordset1 = "SELECT * FROM signup";
$Recordset1 = mysql_query($query_Recordset1, $myDB) or
die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Unsubscribe</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function alertFunction() {
document.forms['form1'].submit();
}
//-->
</script>

</head>

<body>
<div id="Layer1" class="background">

<form name="form1" method="POST" action="thanku.php">
<input name="email_address" type="text" class="field1"
id="email_address" >

<img style="cursor:pointer; "onClick="alertFunction();"
src="button.jpg" type="submit" class="button" value="Remove"
width="44" height="37" title="Submit">
</form>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

-----------------------------------------------------------------

Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Kenneth,
I am trying to remove a record from the database but it is not working. <form name="form1" method="POST" action="thanku.php">
<input name="email_address" type="text" class="field1"
id="email_address" >

<img style="cursor:pointer; "onClick="alertFunction();"
src="button.jpg" type="submit" class="button" value="Remove"
width="44" height="37" title="Submit">
</form>


You are sending the email address to the thanku.php page. That is where
your query will need to delete the email.

Mike
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.