Forum Moderators: coopster
thanks.
AMit.
if(isset($_POST['submit']))
{
if($_POST['textbox1']!="")
{
$qu = "insert into allmail (email) values('".$_POST['textbox1]."') ";
mysql_query($qu) ;
}
}
Once the values are submitted you can redirect, the page to a different page where you can thank them for posting the comments or similar.
Please also note that you need to learn ways to clean customer data before you directly add into an SQL statement as you did.
So an easy way around that would be to redirect the browser to another page after the information has been entered into the database. This will then clear the original post sent, unless people go back to that page again.
if(isset($_POST['submit'])) {
if($_POST['textbox1']!="") {
$qu = "insert into allmail (email) values('".$_POST['textbox1]."') ";
$result = mysql_query($qu) ;
if (!$result) {
echo 'It died...try again later';
}
else {
header('Location: some_other_page.php');
}
}
}