|
Posted by Lloyd Harold on 11/14/07 12:50
The Natural Philosopher <a@b.c> wrote:
> $query="select * from mytable where location ='4'";
> $result=mysql_query($query);
> > Each result should be displayed in it's own paragraph.
> >
> if ($result && ($rows=myql_numrows($result) >0))
> {
> > Each result should be within a link to open a new page (details.php ?)
> > that will retrieve the details for that name.
> >
> for($i=0;$;<$rows;$i++)
> {
> > Ideally, but not essentially, the new page should contain a link back to
> > the previous results.
> >
> $last_id=$__GET['id'];
> $var1=mysql_result($result,'id); // and any other variables you
> want.
> printf("<p><A HREF=Mycode.php?id=%d>id=%d,</A>\r\n",
> $last_id,$var1);
> }
> }
Thanks for your prompt response.
I've tried the code and am seeing this error:
PHP Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /- on
line 25, which is:
for($i=0;$;<$rows;$i++)
[Back to original message]
|