<form method="post" action="reg.php"> <div id="formStyle"> <input type="text" name="email" placeholder="Enter your eMail"> <input type="password" name="pass" placeholder="Enter your desire Password"> <input type="text" name="fname" placeholder="Enter your First Name"> <input type="text" name="mname" placeholder="Enter your Middle Name"> <input type="text" name="lname" placeholder="Enter your Last name"> <button id="logButton" type="submit">Sign Up</button> <div id="signButton"> <a class="signLinkStyle" href="login.php">Log In</a> </div> </div> </form>
<?php $con = mysqli_connect("localhost","root","123456"); mysqli_select_db("muchies"); if(mysqli_connect_errno()) { echo "Failed to connect to mysql:" . mysqli_connect_error(); } $sql = mysqli_query( "INSERT INTO member (userMail,userPass,userFname,userMname,userLname) VALUES (NULL,$_POST[email],$_POST[pass],$_POST[fname],$_POST[mname],$_POST[lname])" ); if(!mysqli_query($con,$add)) { die('Error: '.mysqli_error($con)); } echo "added"; mysql_close($con); ?>
INSERT
NULL
INSERT INTO member (userMail, userPass, userFname, userMname, userLname) VALUES (NULL, $_POST[email], $_POST[pass], $_POST[fname], $_POST[mname], $_POST[lname])
"INSERT INTO member (userMail,userPass,userFname,userMname,userLname) VALUES (NULL,'$_POST[email]','$_POST[pass]','$_POST[fname]','$_POST[mname]','$_POST[lname]')"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)