I have been trying to display data from my wholsalers database onto my website. I feel I'm getting close, but once you fix one error, its on to the next. Im not a coder just learning PHP for the first time.
My Code:
<?php
$connect = mysql_connect ("localhost", "root", "") or die(mysql_error());
mysql_select_db("scpricelist") or die(mysql_error());
?>
<?php
mysql_select_db("scpricelist");
$query = "SELECT ProductTitle FROM pricelist WHERE PartNum = '90-PN513CE-00100'";
$results = mysql_query($query)
or die(mysql_error());
while ($record = mysql_fetch_assoc($results)foreach ($record as $value)
echo "$value";
}
?>
Basically all im trying to do is, diplay product info in my catalogue. I keep getting this error.
Parse error: syntax error, unexpected T_FOREACH in C:\wamp\www\catalog.php on line 49
LINE49
echo "$value";
What am i doing wrong, this can't be that hard....