Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\test\search.php:20 Stack trace: #0 {main} thrown in C:\xampp\htdocs\test\search.php on line 20
i am using php7.1 version is there issue?
http://www.c-sharpcorner.com/uploadfile/c63ec5/display-records-in-html-textboxes-in-php-script/ i use your code and create the database that code shown.
i paste code here it's search.php
$con=mysqli_connect("localhost","root","","test");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// ...some PHP code for database "my_db"...
// Change database to "test"
mysqli_select_db($con,"test");
// ...some PHP code for database "test"...
//$sql="select * from accountdtl";
$result = mysql_query("select * from accountdtl where account_no='$_POST[name]'");
while($rowval = mysql_fetch_array($result))
{
$accountnumber= $rowval['account_no'];
$title= $rowval['title'];
$fname= $rowval['fname'];
$lname= $rowval['lname'];
$add1= $rowval['address1'];
$add2= $rowval['address2'];
$town= $rowval['town'];
$country= $rowval['country'];
$pin= $rowval['pcode'];
$mob= $rowval['con_no'];
$mailid= $rowval['mail_id'];
$uname= $rowval['uname'];
$balance= $rowval['balance'];
}
mysql_close($con);
?>
| Account no: | |
| Title | |
| FirstName: | |
| Surname: | |
| Address Line 1: | |
| Address Line 2: | |
| Town: | |
| Country: | |
| Post Code: | |
| Contact Number: | |
| Email Address: | |
| User Name: | |
| Balance: | |
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sundaram SubramanianPosted Jun 17, 2017, 2:36 AM
Ijas HameemPosted Jun 19, 2017, 4:38 AM