-1

So, I am having an issue with referencing the database for storing new user information for my website. Here is an example of the html that we are using. I have also provided the php form as well.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"
    >
<html lang="en">
<head>
    <title>Log In</title>
</head>
<body>
<form action= "form_process.php" method="post">

//Inputting user information: first name, last name, password, gender.
First Name: <input type="text" name="firstname"> <br/>
Last Name: <input type="text" name="lastname"> <br/>
Password <input type="password" name="password"> <br/>
Are you male or female?<br/>
Male<input type="radio" name="Male" value="Male"> <br/>
Female<input type="radio" name="Female" value="Female"> <br/>
<input type="submit" value="submit"> 
</form> 
</body>
</html>

Here is the php form that I am using to confirm the data passed.

<?php
$first = $_POST['first'];
$last = $_POST['last'];
$email = $_POST['email'];

echo("First: ". $first);
echo("<br/>Last: " . $last);
echo("<br/>Email: " . $email);
?>

Let me know how I would be able to store the information to mysql. I am using Go Daddy as the mysql server.

Thank you!

4

1 に答える 1