lexington
09-21-2007, 05:58 PM
Hello, I have never experienced this problem before so I am totally stumped. Basically I add a variable in the url, and use $_GET to grab it. For some odd reason in this one particular script, it will not GET the data. I made a test and echoed the GET command in the beginning and end of the php file, but near the middle where I want it to work, it displays nothing. I even tried to use the DEFINE constant but nothing works and it makes no sense. I am not good with functions, so is this the only way of grabbing the ID from the url and forcing it to appear anywhere I want in the file or?
-Edward-
09-21-2007, 06:30 PM
Try This:
$id = $_GET['id'];
lexington
09-21-2007, 06:59 PM
Yeah I tried everything. I even showed someone else and they were confused to since it should work. Either way I got it to work by using a different method. Instead of using GET I just created a new DB entry and had it insert that db row from another table instead and it works.
linux-tech
09-21-2007, 07:36 PM
check your error_reporting, and make sure that your sysadmin/host hasn't got some sort of filter turned off to block get with mod_security.
ThatScriptGuy
09-21-2007, 08:21 PM
Also, for future reference, a few lines of code can go a LONG way in helping us help you..
ubersmith_boo
09-24-2007, 11:29 AM
if I ran into this type of problem, i'd add a print($_GET['whatever']); line somewhere in the script where I knew it would work and then gradually move it down the script until it stops working. That should at least tell you which line the problem is starting out and get you pointed in the right direction of the actual cause.
orbitz
09-24-2007, 06:20 PM
Instead of using GET I just created a new DB entry and had it insert that db row from another table instead and it works.
I don't think this would be the best way to solve the problem.
Post your codes - it will be easier to see.
jimpoz
09-25-2007, 12:32 PM
Maybe try this, just in case the key isn't what you're expecting:
foreach ($_GET as $key => $value) echo "<BR>$key = $value";
lexington
09-25-2007, 12:44 PM
Thanks guys but this topic is old now I solved the problem by using another technique.