我把这个值放入我的数据库中,但是当打开phpmy admin并转到我的表时,我的数据在哪里?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>register
</title>
</head>
<body>
<?php
mysql_connect('localhost','root','');
mysql_select_db('babak');
?>
thanx for your registering <?php
echo $_POST["name"];
?><br />
your email is <?php echo $_POST["E-MAIL"];
?><br />
<?php
$sql="INSERT INTO users(id,pass) VALUES ($_POST[id],$_POST[pass])";
?>
</body>
</html>发布于 2012-03-01 19:30:17
您需要执行sql语句。
mysql_execute($sql);发布于 2021-06-05 23:32:58
您需要创建一个连接变量,该变量必须作为参数传递给'select_database_db‘命令
//Connect to the server.
$connection = mysql_connect('localhost', 'root', '');
//Select our database.
mysql_select_db('babak', $connection);https://stackoverflow.com/questions/9515342
复制相似问题