Darkmatter5 Posted April 22, 2008 Share Posted April 22, 2008 I have a few variables with the following data: $FirstName=joe; $LastName=doe; $Address=1 street; $City=Austin; $State=Texas; $ZipCode=90210; Here's the code I'm using //after new client data is applied to clients table, display success message and display entered data from table to verify accuracy $FNresult=mysql_query(sprintf("SELECT FirstName FROM byrnjobdb.clients WHERE FirstName='$FirstName' AND LastName='$LastName' AND Address='$Address' AND City='$City' AND State='$State' AND ZipCode='$ZipCode'")); echo "NEW CLIENT ADDED... The following is the data you entered to verify accuracy. $FNresult"; Here is the output I recieve. NEW CLIENT ADDED... The following is the data you entered to verify accuracy. Resource id #5 Why does it not say? NEW CLIENT ADDED... The following is the data you entered to verify accuracy. joe Help please!! Link to comment https://forums.phpfreaks.com/topic/102406-strange-output-with-the-code-included-please-help-understand/ Share on other sites More sharing options...
DarkWater Posted April 22, 2008 Share Posted April 22, 2008 I have a few variables with the following data: $FirstName=joe; $LastName=doe; $Address=1 street; $City=Austin; $State=Texas; $ZipCode=90210; Here's the code I'm using //after new client data is applied to clients table, display success message and display entered data from table to verify accuracy $FNresult=mysql_query(sprintf("SELECT FirstName FROM byrnjobdb.clients WHERE FirstName='$FirstName' AND LastName='$LastName' AND Address='$Address' AND City='$City' AND State='$State' AND ZipCode='$ZipCode'")); echo "NEW CLIENT ADDED... The following is the data you entered to verify accuracy. $FNresult"; Here is the output I recieve. NEW CLIENT ADDED... The following is the data you entered to verify accuracy. Resource id #5 Why does it not say? NEW CLIENT ADDED... The following is the data you entered to verify accuracy. joe Help please!! $result = mysql_fetch_assoc($FNresult); echo "NEW CLIENT ADDED...<br />The following is the data you entered to verify accuracy:<br />{$result['FirstName']}"; Use that. Link to comment https://forums.phpfreaks.com/topic/102406-strange-output-with-the-code-included-please-help-understand/#findComment-524367 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.