RE: [PHP] New to PHP Need Help

From: Date: Thu, 04 Apr 2002 16:18:54 +0000
Subject: RE: [PHP] New to PHP Need Help
Groups: php.db php.general 
Request: Send a blank email to php-general+get-91543@lists.php.net to get a copy of this message
change: $Location_Info = mysql_fetch_row($result); to: $row = mysql_fetch_array($result); $Location_Info = $row['fieldname']; replace "fieldname" with the real name of your database field -----Original Message----- From: Jason Tobias [mailto:jtobias@risecom.net] Sent: Thursday, April 04, 2002 9:29 AM To: php-db@lists.php.net; php-general@lists.php.net; php-windows@lists.php.net Subject: [PHP] New to PHP Need Help I am trying to define variables through an anchor tag to retrive data from MySQL, When the script runs it displays Array. I am running WIN2K and IIS 5 echo "<a href=location.php?location=2>Camp Street Cafe</a>"; Here is the script that is called. <?php $db = mysql_connect("localhost", "", "") or die ("Could not connect to Localhost"); mysql_select_db ("ETM", $db) or die ("Could not connect to the Database"); $table = "locations"; $location = ($_REQUEST["location"]); $query = "Select * from $table where Location_ID = $location"; $result= mysql_query($query); $Location_Info = mysql_fetch_row($result); echo "<p>$Location_Info"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#91543) next »