How to connect HTML Register Form to MySQL Database with PHP




If you don’t know, How to store data from HTML Register Form to your MySQL Database using PHP then watch this 6 minutes video. How to Create Registration …

Original source


21 responses to “How to connect HTML Register Form to MySQL Database with PHP”

  1. pleas help me i got this error:

    Warning: mysqli::__construct(): (28000/1045): Access denied for user 'root'@'localhost' (using password: NO) in /Applications/AMPPS/www/insert.php on line 17
    Connect Error(1045)Access denied for user 'root'@'localhost' (using password: NO)

  2. Sir i m getting some unexpected o/p after clicking register button…

    prepare($SELECT); $stmt->bind_param("s", $email); $stmt->execute(); $stmt->bind_result($email); $stmt->store_result(); $rnum = $stmt->num_rows; if ($rnum==0) { $stmt->close(); $stmt = $conn->prepare($INSERT); $stmt->bind_param("ssss", $username, $password, $repassword, $email); $stmt->execute(); echo "New record inserted sucessfully"; } else { echo "Someone already register using this email"; } $stmt->close(); $conn->close(); } } else { echo "All field are required"; die(); } ?>

    what error can it be?

  3. Thank you for this , now my question is the message New record inserted successfully comes on insert.php page , how we can avoid this page to open and this message only show on same html form page rather than opening in insert.php

  4. Hello! Can u help me? I don't know why but when i try to insert a second record it shows me:"New record added successfully ", but in database it doesn't happen any change. It takes only the first record and it doesn't add new records. Can u guess what's going wrong? Because it doesn't shows any error. Please i need your helpppppp

Leave a Reply