Forum Moderators: coopster
I have the following type of code setup on a page 'newsletter.php' where a user will be able to either use the signup form or the remove form (both on newsletter.php) and for the life of me, I can't get my forms to even submit. Obviously the example provided is a simple test case. Can anyone tell me why the form won't even submit - is it my nasty php? Thanks in advance!
<?php
if($_POST['signup']) {
echo 'You have signed up';
} elseif($_POST['unsubscribe']) {
echo 'You have unsubscribed';
} else {
echo '<form method="post" action="newsletter.php" name="signup">
Add Email: <input type="text" id="add_email"><br />
<input type="button" name="signup" value="Sign Up">
</form>
<hr>
<form method="post" action="newsletter.php" name="unsubscribe">
Remove Email: <input type="text" id="remove_email"><br />
<input type="button" name="unsubscribe" value="Unsubscribe">
</form>';
}
?>