[FX.php List] $_GET won't GIT

Joel Shapiro jsfmp at earthlink.net
Thu Jan 17 18:46:36 MST 2008


Hey Jonathan

One thought: What are you using as the page in your <form  
action="....?  Are you creatiing the page name dynamically (such as  
w/ a flavor of $_SERVER['REQUEST_URI'] -- which could include your  
GET data), or do you have the page name hardcoded (e.g.  
action="page.php")?

Once the page has been submitted via the form/submit, does your url  
contain the GET data?

-Joel


On Jan 17, 2008, at 4:47 PM, Jonathan Schwartz wrote:

> Hi Folks,
>
> Like my clever subject line? ;-)
>
> Just spent the better part of a day wrestling with a problem on a  
> single page script. The page uses both URl links (generating $_GET)  
> and a form (generating $_POST)....but only one a time, of course.
>
> The user arrives to the page clicking a "Next Record" link  
> generating a $_GET array.  Then, when the user clicks a form  
> button, the page is supposed to process the form.  Simple enough.
>
> I have code on the page that tests whether the user has clicked a  
> link or clicked the form button.
>
> The problem?  Even the though the user might have clicked the form  
> button,  the $_GET array is still returned, alog with the $_POST  
> array.  I finally realized what was happening after using print_r  
> to display both $_POST and $_GET.  I forced $_GET to disappear only  
> after testing for $_POSt and then using $_GET = array();
>
> So....what is going on here?  Why does $_GET persist if it wasn't  
> generated on the last step of the current page?
>
> Thanks
>
> J
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-381-1852
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list