$_REQUEST Problem

Jul 20, 2005

I've a variable that can come with the GET and POST method, So I use
$_REQUEST to get it

When I use a simple href
href="myFile.php?myVar=value"
I have myVAr in the $GET and $_REQUEST arrays.

But when I pass throw a javascript function (to do some checks before to
call php)
href="javascript:myJsFunction('myFile.php?myVar=value',' ');"

and here is the javascript code
function myJsFunction(phpAction)
{
/// code for checks
document.forms[0].action=phpAction;
document.forms[0].submit();
}
I have myVar in $_GET but not in the $_REQUEST array
How can I have it in the request array

View 1 Replies


ADVERTISEMENT

Jquery :: No Data In $_REQUEST When Submit

Jan 27, 2011

Here is the button:

And here is the submit:

So when I submit with jquery, and try to get with php the data

It does not see such index.

But when I change button type to submit and remove javascript code for submitions, then it works. Have you idea, why it works differently when I submit with jquery and what to do?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved