on the line that starts with $query =  there's an extra ."
the line should be:
$query = "SELECT shops.name FROM shops WHERE name = ".$name;

[]s
Fernando


"Adam French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm just starting out, this is my script...
>
> <?
> $name = $_POST['username'];
> $name = $name;
> $db = mysql_connect("localhost");
> mysql_select_db("vinyldealers",$db);
> $query = "SELECT shops.name FROM shops WHERE name = ".$name.";
> $result = mysql_query($query);
> while ($record = mysql_fetch_assoc($result)) {
>  while (list($feildname, $feildvalue) = each ($record)) {
>   echo $feildname. ": <B>" .$feildvalue. "</B><BR>";
>   }
>  echo"<BR>";
>  }
> ?>
>
> This is the error I get...
>
> Parse error: parse error, unexpected ':' in
> C:\Xitami\webpages\php\result1.php on line 12
>
> I dunno what I'm doing wrong. Help please???
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to