字典翻译 问答 其它 "mysqlfunctionundefined"inPHPfile<?php$con=mysql_connect("localhost","peter","abc123");if(!$con){die('Couldnotconnect:'.mysql_error());}mysql_select_db("my_db",$con);$sql="INSERTINTOPersons(FirstName,LastName,Age)VALUES('$
问题标题:
"mysqlfunctionundefined"inPHPfile<?php$con=mysql_connect("localhost","peter","abc123");if(!$con){die('Couldnotconnect:'.mysql_error());}mysql_select_db("my_db",$con);$sql="INSERTINTOPersons(FirstName,LastName,Age)VALUES('$
问题描述:

"mysqlfunctionundefined"inPHPfile

<?php$con=mysql_connect("localhost","peter","abc123");if(!$con) { die('Couldnotconnect:'.mysql_error()); }mysql_select_db("my_db",$con);$sql="INSERTINTOPersons(FirstName,LastName,Age)VALUES('$_POST[firstname]','$_POST[lastname]','$_POST[age]')";if(!mysql_query($sql,$con)) { die('Error:'.mysql_error()); }echo"1recordadded";mysql_close($con)?>-------------and.aftericlickit.thescreendisplay:Fatalerror:Calltoundefinedfunctionmysql_connect()..............allhost,username&passwordisright.but computercantdefinedthemysqlfunctionandicheckedthecomputerhasmysqlinstalled....plzhelpme.----------P.S.imusingschoolcomputersocanttypeinthechinese.sorryaboutthat.

彭国茂回答:
  代码也不发规范一点
点击显示
其它推荐
热门其它推荐
  • 其它