Jump to content

madlady37

New Members
  • Posts

    6
  • Joined

  • Last visited

madlady37's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you all for your help I understand, and I apologize for not making my error clear.
  2. HELLO everyone. Can some one help me understand this please. I get a load of undefined indexs, when my page first loads, but when I do a refresh it goes away. Here is my code. The page Im a referring to is my login in page and my register page. These pages seems to have something in common with indexs. My registration page code. I have strip_tags, striplashes, and mysqli_real_escape_string in place. if(isset($_POST['register'])){ include_once("db.php"); //Define Variables $username = strip_tags($_POST['username']); $password = strip_tags($_POST['password']); $password_confirm = strip_tags($_POST['password_confirm']); $email = strip_tags($_POST['email']); $email_confirm = strip_tags($_POST['email_confirm']); $firstname = strip_tags($_POST['firstname']); $lastname = strip_tags($_POST['lastname']); $middlename = strip_tags($_POST['middlename']); $suffix = strip_tags($_POST['suffix']); $dateofbirth = strip_tags($_POST['dateofbirth']); $address1 = strip_tags($_POST['address1']); $address2 = strip_tags($_POST['address2']); $city = strip_tags($_POST['city']); $state = strip_tags($_POST['state']); $county = strip_tags($_POST['county']); $zip = strip_tags($_POST['zip']); $cellphone = strip_tags($_POST['cellphone']); $homephone = strip_tags($_POST['homephone']); $worknumber = strip_tags($_POST['worknumber']); $extension = strip_tags($_POST['extension']);
  3. Hello Everyone, Im trying to allow a user to login to my website. I want to check and see if the user is in the database, then proceed to the main page, if not have the user register and then login. Can anyone tell me what the problem is here? Thank you so much in advance. ~MADLADY37~ Here is my code: // checking the user if(isset($_POST["submit"])){ $email = trim($_POST["email"]); $email = strip_tags($email); $email = htmlspecialchars($email); $email = mysqli_real_escape_string($con,$_POST["email"]); $password = mysqli_real_escape_string($con,$_POST["password"]); if(email_exist($email, $con)) { header("Location: test5.php"); } else { $error = "Email Does Not Exist!, Please Register, in order to login!"; } } ?> HERE IS MY FUNCTIONS CODE: <?php function email_exist($email,$con) { $result = mysqli_query($conn,"SELECT * FROM userstbl WHERE email = '$email'"); if(mysqli_num_rows($result) == 1) { return true; } else { return false; } } ?>
  4. thank you...I did not know that I could not post under someone else's help, because it would of been a duplicate post, I though. My apologies, and thank you. And of course it worked.
  5. Hello All, Im new with php. I am making a simple login form, and want to echo the variables. here is my code: Help! This is the error message I get. Notice: Undefined index: username in C:\xampp\htdocs\The Centorium\registration.php on line 60
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.