My html ‘form1’ receives a customer ‘did’ number, and other data from the incoming url.On submit it goes to the following ‘test’ php script. I am trying to populate the ‘name’ field in ‘form1’ with the results of this query
?php // Receiving variables from first form ‘form1’ and is working good
@$name = addslashes($_GET[‘name’]); // this is now being used for email data
@$email = addslashes($_GET[‘email’]); // not used see name
@$phone = addslashes($_GET[‘phone’]); // not used
@$id = addslashes($_GET[‘id’]);
@$visits = addslashes($_GET[‘visits’]);
@$cust_lat = addslashes($_GET’cust_lat’]);
@$cust_long = addslashes($_GET’cust_long’]);
@$cust_did = addslashes($_GET[‘cust_did’]); //this is unique phone id that comes in
@$event = addslashes($_GET[‘event’]);
@$date_created = addslashes($_GET’date_created’]);
@$date_updated = addslashes($_GET[‘date_updated’]);
// Make a MySQL Connection
mysql_connect(“host”, “db”, “pw”) or die(mysql_error());
mysql_select_db(“bus1”) or die(mysql_error());
// Get a specific result from the “mainleticias”
$result = mysql_query(“SELECT * FROM mainleticias WHERE did=’$cust_did’”) or die(mysql_error());
// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array($result);
// Print out the contents of each row into a table
$name=$row[‘name’];
echo $name;
// I get the right name/=email here, but I need it to populate name field in first form ‘form1’
I have been trying for over 2 weeks to get help with this problem to no avail.I have googled my hands off.Is it possible or am I wasting my time?It seems like it should be an easy thing to do, at least I thought so…
looking forward to anyones reply.
Thank you
Ray Ward