Re: DUMB QUESTION I'M SURE

From: Date: Fri, 03 Jan 2003 06:26:03 +0000
Subject: Re: DUMB QUESTION I'M SURE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-130055@lists.php.net to get a copy of this message
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" <afrench@westman.wave.ca> wrote in message news:20030103061400.82385.qmail@pb1.pair.com... > 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??? > >

« previous php.general (#130055) next »