PHP transfer variable question?????

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PHP  transfer variable question?????

My program is ok in apache_1.3.19 and php-4.1.2£¬but when I change over to
php_4.3.2

and apache_1.3.27,I can't get variable¡£
------------------------------------------------------------------------
code:

//newsList.php:

$querystring = "SELECT id,title FROM $nTable ORDER BY id DESC LIMIT 3";
$result = mysql_query($querystring) or die ("can't query£¡£¡£¡");
while ($row = mysql_fetch_row($result))    {
    echo "<a href='news/show.php?id=$row[0]' >$row[1]</a><br>";
}
------------------------------------------------------------------------
code:

//show.php

$querystring = "SELECT  * FROM $nTable WHERE id='$id'";
$result = mysql_query($querystring) or die ("can't query£¡£¡£¡");

echo $querystring;  //test

while ($row = mysql_fetch_row($result))
------------------------------------------------------------------------ 

echo display£º
SELECT * FROM news_tb WHERE id=''
                               ----??  why is empty???
$id can't receive!

How to resolve it??



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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux