Try to use == instead of =
Sorin Ifrim
----- Original Message -----
From: Andrew <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 5:33 PM
Subject: [PHP] parse error driving me nuts ...
> hi, can anyone help me spot the parse error?
> It's throwing up on the first "if" line, and for the life of me I cannot
> find it! :)
>
> tia,
> andrew
>
> <?php
>
> include("db_connect_params.inc");
> $sql="select path from PHOTO where pid =1";
> $link_id = mysql_connect($host, $usr, $pass);
> $result = mysql_db_query($database, $sql, $link_id) or die("no result");
>
> if ((mysql_num_rows($result)) = 1)
>
> {
> $row=mysql_fetch_array($result);
> extract($row);
> echo "<img src =\"$path\"></img><br>";
>
> } else {
> if (!isset($ii)) $ii = 1;
> $i = 1;
> while($row=mysql_fetch_array($result))
> {
> extract($row);
> $displayed[$i]=$path;
> echo "<a href=\"$PHP_SELF?ii=$i\">$i</a>  ";
> $i++;
> }
> echo "<img src =\"$displayed[$ii]\"></img><br>";
> }
> ?>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]