MySQL Forums
Forum List  »  PHP

Re: Return values from a select
Posted by: Michael Smith
Date: August 05, 2018 06:24AM

I have now changed the code as below:

$sql = "SELECT lotno, fname, lname, address1, phone1, email FROM customer1 WHERE trim(lotno) = '400' " ;

$result = $conn->query($sql);

if ($result->num_rows > 0){
$FirstName = $_POST["fname"];
$Lastname = $_post["lname"];
echo "First Name " . $FirstName;
echo "Last Name " . $LastName;
else {
echo "No record found at all.";

So the return values are from the Table Customer1. But I get error messages about the code: $FirstName = $_POST["fname"];


Options: ReplyQuote

Written By
August 04, 2018 03:13PM
Re: Return values from a select
August 05, 2018 06:24AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.