Before hand im going to say "THIS IS NOT A DUPLICATE" I have used isset, BUT it should be set no matter what! The form will not work unless it's set "required"
I have searched for the answer to this and i know i can check for isset but that's not the problem. My problem is the $_POST variable is definatly being set, it's just not going through for some reason. Here is my code:
I'm going to shorten it just so it can be read easily:
<form method='POST' action="php/account-scripts/register-request.php">
<strong>Email Address:</strong><small>Only email addresses ending in ".co.uk" or ".com" are accepted.</small><br/>
<input type='email' name='register-account-email' required><br/><br/>
<input type='submit' value='Login'><br/>
and the register-request (Shortened):
if (isset($_POST['register-account-email']))
{
$r_email = $_POST['register-account-email'];
}
There should always be a $_POST set for register-account-email but i type it in and it just wont go through? Any ideas?
Error is: ...PHP Notice: Undefined index: register-account-email... ...line 8
SOLVED
I removed the form action="", ran it, then replaced the action attribute. Worked fine after that. Very strange bug.