Hi, solve my query plz
I've got a form where the user picks a value from a drop down list. The list is populated from a MySQL db using a value and the primary key for that value.
When the user presses "edit", another query is supposed to run that pulls the remaining fields that match the key. But it doesn't.
My code:
PHP Code:
$db = mysql_connect(XXX) or die ("Couldn't connect to server");
mysql_select_db(XXX,$db) or die ("Couldn't connect to database");
$query="SELECT * FROM prod WHERE key = '".$record."'";
$result = mysql_query($query,$db);
if (!$result) {
echo mysql_error();
die;
}
$row = mysql_fetch_array($result);
The error I get:
Quote:
You have a
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --