Top Comments
All Comments (208)
-
@tonytrfd write on top error_reporting(0);
-
Guys if you get a undefined index error, just use a ternary operator, it doesn't hide the error:
$submit = isset($_post['submit']) ? $_post['submit'] : '';
//form data
$fullname = isset($_post['fullname']) ? $_post['fullname'] : '';
$username = isset($_post['username']) ? $_post['username'] : '';
$password = isset($_post['password']) ? $_post['password'] : '';
$repeatpassword = isset($_post['repeatpassword']
) ? $_post['repeatpassword'] : ''; -
@XxRedDude Putting @ in front of the posts won't stop the actual error it will just hide the error message.
-
md5decrypt(dot)org
-
@tonytrfd i got the same error too but once i set the items they went away...i suppose it was b/c the variabled werent being used
-
@MrYoranimo Thank you again.
-
@kobi1974 If you have trouble with errors in PHP, you can add an at sign before an called function, or like in the example, before a variable. It will suppress the warnings that normally come up when there is one.
Notice: Undefined index: submit in C:\xampp\htdocs\SiteB\Register.php on line 2
Notice: Undefined index: fullname in C:\xampp\htdocs\SiteB\Register.php on line 4
Notice: Undefined index: username in C:\xampp\htdocs\SiteB\Register.php on line 5
Notice: Undefined index: password in C:\xampp\htdocs\SiteB\Register.php on line 6
Notice: Undefined index: repeatpassword in C:\xampp\htdocs\SiteB\Register.php on line 7
tonytrfd 5 months ago 13
Guys if you get a undefined index error, just add a @ at the begining of all $_POST in your register.php. For example:
$submit = @$_POST['submit'];
//form data
$fullname = @$_POST['fullname'];
$username = @$_POST['username'];
$password = @$_POST['password'];
$repeatpassword = @$_POST['repeatpassword'];
if ($submit)
it worked for me
XxRedDude 2 months ago 5