There was a syntax error in a previous statement but the idea was correct it think. here is one way to do it.
- Have the page reload itself
- Check if the email field variable is set...
Part 1.
<form name=add_email action=$PHP_SELF method=POST>
This will reload the current page when the form is submitted.
Part 2.
set up an if statement...
if( !empty($email_value) )
{
// add to database
}
that is all. Including the else statement as written above is optional. You may want the form box to appear even when you submit the email to the database.
hope this was helpful..best of luck,
losang