|
Posted by Ken Robinson on 04/08/07 13:29
gallasr@post.sk wrote in news:1176042537.275827.15330
@y66g2000hsf.googlegroups.com:
>
> Worked before, not working now.
> http://someUrl/index.php?content=kurzy
>
> Whole navigation is made by different value of variable content.
> Variable is not posted from form. It is just link.
>
> <a href="index.php?content=kurzy">Kurzy</a>
>
> print $content; prints nothing, so it seems that variable is not
> initialized. Why? What have changed between versions 4 and 5 of PHP.
Regsiter_globals used be enabled by default, it is now disabled. Please
read <http://www.php.net/register_globals> for more information. This
setting in the php.ini file controls whether variables on the URL, from
POSTed forms, or in COOKIEs were preset. Now you have to retrieve the
values from the particular superglobal array yourself.
$_GET for forms with method="get" and from variables on the URL
$_POST for forms with method=post"
$_COOKIE
$_SERVER
$_SESSION
$_FILES
So in your case, you need to change the code to read
print $_GET['content'];
Ken
Navigation:
[Reply to this message]
|