Portal Home > Knowledgebase > Articles Database > Please help, my GET command will not work where I want it


Please help, my GET command will not work where I want it




Posted by 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 certain 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?

Posted by -Edward-, 09-21-2007, 06:30 PM
Try This:

Posted by 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.

Posted by whmcsguru, 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.

Posted by 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..

Posted by 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.

Posted by orbitz, 09-24-2007, 06:20 PM
I don't think this would be the best way to solve the problem. Post your codes - it will be easier to see.

Posted by jimpoz, 09-25-2007, 12:32 PM
Maybe try this, just in case the key isn't what you're expecting:

Posted by lexington, 09-25-2007, 12:44 PM
Thanks guys but this topic is old now I solved the problem by using another technique.

Posted by juangake, 09-28-2007, 09:18 AM
What technique?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
HostBright Downtime? (Views: 689)

Language: