Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with url variables - not being seen anymore

Status
Not open for further replies.

twintriode

Technical User
Jan 6, 2005
21
0
0
AU
Hello,

Have set up a few simple scripts lately on some new servers and PHP does not appear to be working the same way. I cannot seem to do this anymore:

IN a form

<td><a href=<?php echo $PHP_SELF ?>?id=<?php echo $myrow["id"] ?>&link=yes>Edit</a> </td>

I can no use this URL variable with a simple

if ($link){

Do stuff

}

Can anybody tell me what might be the problem?

Thanks
 
Somebody really needs to write a faq, I think this question gets asked every other day.


There's your problem.

You should be using $_GET['link'] not $link

If you must use $link, you can turn register_globals on in your php.ini, but please read the above link to find out why this is not a good idea.
 
I knew I'd read it in there in the past... thanks, I'll keep that one bookmarked for the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top