因此,我在引用数据库以存储我的网站的新用户信息时遇到问题。这是我们正在使用的 html 示例。我也提供了 php 表单。
<!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);
?>
让我知道如何将信息存储到 mysql。我使用 Go Daddy 作为 mysql 服务器。
谢谢!