|
Posted by Pedro Graca on 10/06/06 09:17
["Followup-To:" header set to comp.lang.php.]
Vjeran wrote:
> <?php
> $result = mysql_query("select * from news WHERE
> news_id='$news_id'") or
> die (mysql_error());
> while ($row = mysql_fetch_array($result))
> ....
It appears you have register_globals on.
http://php.net/register_globals
*Turn it off!*
And change your code to:
<?php
$result = mysql_query("select * from news WHERE news_id='".$_GET['news_id']."'") or die (mysql_error());
...
Happy Coding :)
--
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
Navigation:
[Reply to this message]
|