Hi
I am getting the following errors in my php code
Notice: Undefined index: name in C:\wamp\www\simplifiedcodding\register.php on line 3
Notice: Undefined index: name in C:\wamp\www\simplifiedcodding\register.php on line 4
Notice: Undefined index: name in C:\wamp\www\simplifiedcodding\register.php on line 5
Notice: Undefined index: name in C:\wamp\www\simplifiedcodding\register.php on line 6
see my php code below
[syntax=php]
$name = $_GET['name'];
$username = $_GET['username'];
$password = $_GET['password'];
$email = $_GET['email'];
if($name == '' || $username == '' || $password == '' || $email == ''){
echo 'please fill all values';
}else{
require_once('dbConnect.php');
$sql = "SELECT * FROM users WHERE username='$username' OR email='$email'";
$check = mysqli_fetch_array(mysqli_query($con,$sql));
if(isset($check)){
echo 'username or email already exist';
}else{
$sql = "INSERT INTO users (name,username,password,email) VALUES('$name','$username','$password','$email')";
if(mysqli_query($con,$sql)){
echo 'successfully registered';
}else{
echo 'oops! Please try again!';
}
}
mysqli_close($con);
}
?>
[/syntax]
Kindly help
Notice: Undefined index: name
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Guest UserRank #816 · 2.8K reputationPosted Feb 10, 2016, 9:27 PM EST
Sandeep BanerjeeRank #4,887 · 320 reputationPosted Feb 12, 2016, 3:56 AM EST
Dipankar BiswasRank #992 · 2K reputationPosted Mar 16, 2016, 7:45 PM EDT