Another thing that I have done to help with setting variables is that I set a variable equal to a value, where the value is also a variable. Pay close attention to the variable $prodid, positioned just under $db in the code below.
EXAMPLE...
<?php
include("connectme.inc");
$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
$prodid = "$prodid";
$query = "SELECT * FROM tblProducts WHERE prodid='$prodid'";
$result = mysql_query($query)
or die ("Couldn't execute query")
//****The rest of your PHP code goes here****//
?>
|