![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2001
Location: Utopia
Posts: 392
|
Super Easy PHP question
Why doesn't this work any more? (assuming the code is inside of test.php)
<a href="test.php?table=oral">ORAL</a> <? print("$table"); ?> It used to work for me on an older server. But now it says no variable is defined for $table when you click on the ORAL link. WTF? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Nov 2004
Location: Scottsdale, AZ
Posts: 5,167
|
globals is off. use $_GET["table"] instead
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Because on the new server, global variables are probably turned off.
which means that if you pass something in the url, you have to get it like this: $_GET[table]; and if you pass it in a form, it's like this: $_POST[table]; |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
( ͡ʘ╭͜ʖ╮͡ʘ)
Industry Role:
Join Date: Mar 2004
Posts: 20,010
|
Correction. This is a "not so easy php question" now isn't it
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2001
Location: Utopia
Posts: 392
|
Thanks azguy - I knew it had to be something incredibly simple
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Nov 2004
Location: Scottsdale, AZ
Posts: 5,167
|
you can also turn on register_globals in your php.ini if you want
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,119
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Feb 2001
Location: Utopia
Posts: 392
|
Dang, you guys post quick. lol
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Join Date: Feb 2001
Location: Utopia
Posts: 392
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Join Date: Nov 2004
Location: Scottsdale, AZ
Posts: 5,167
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Industry Role:
Join Date: Dec 2004
Posts: 363
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: Nov 2004
Location: Scottsdale, AZ
Posts: 5,167
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Quote:
There's people out there who don't deal with a bunch of code day in and day out, they don't have to deal with this stuff. That's what diversity is all about. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |