0

Im creating a register section within my website, and it seems to be half working. When the register button is pressed on the next page i receive the message :

Notice: Undefined index: user_name on line 7, Notice: Undefined index: user_email on line 8, Notice: Undefined index: user_password on line 9

Does anyone know how i can resolve this? please help. This is the code:

   Thankyou for registering
   <?php
   include ("dbConnect.php");
   $dbQuery = $db->prepare("select * from loginregister");
   $dbQuery->execute();

   $usernamesignup = $_POST['user_name'];
   $user_email = $_POST['user_email'];
   $user_password = $_POST['user_password'];

   $usernamesignup = ($usernamesignup);
   $user_email = ($user_email);
   $user_password = ($user_password);

   $query = "
  INSERT INTO `loginregister`(`id`, `user_name`, `user_email`, `user_password`) VALUES (NULL, '$usernamesignup',
    '$user_email', '$user_password',
    CURRENT_TIMESTAMP);";


  echo "<h2>Thank you for registering!</h2>";



?>

Any help is greatly appreciated

Saty
  • 22,443
  • 7
  • 33
  • 51
lauren
  • 35
  • 5

0 Answers0