大家帮我看一下这个php写mysql是那里出了问题?
html:
<center> <br /> <form action="addData.php" method="post" target="_blank" ><br /> <p>账号:<input name="u_User" title="text" size="32" maxlength="32" /></p><br /> <p>密码:<input name="u_pwd" title="text" size="32" maxlength="32"/></p><br /> <input type="submit" value="注册" /><input type="reset" value="清空" /><br /> </form></center>
<?php <br /> /////////////////和mysql建立链接 <br /> $host = "localhost";$user="root";$pwd="";$DataBaseName="db_appdata";$db_name="appdata";<br /> $con = mysql_connect($host,$user,$pwd); <br /> if (!$con) <br /> { <br /> die('连接数据库失败: ' . mysql_error()); <br /> } <br /> mysql_select_db($DataBaseName, $con); //选取数据库 <br /> ////////////////////向表内插入数据 <br /> mysql_query("INSERT INTO $db_name (Name, pwd) <br /> VALUES (.trim($_POST["u_user"]), .trim($_POST["u_pwd"])"); <br /> echo "添加成功"; <br /> //关闭连接 <br /> mysql_close($con);?>