Posted by C. Taddiken on 02/02/06 04:50
sheldonlg@gmail.com wrote:
> I have used the action= statement to send the form to a new page which
> can get the posted variables.
>
> I have used the header("Location: foo.php) statement after testing on
> the submit with isset.
>
> What I want to know is if they can be combined. That is, test first
> with the isset, and if no errors go to the action call. Simply going
> with the header call doesn't seem to send the form variables.
>
> Am I missing something?
>
> Shelly
>
Should be pretty easy - just try the following:
header("Location: foo.php?varname=varvalue&varname2=varvalue2");
This won't really work if you are passing sensitive information to the
next page because it will be
part of the URL - if you don't mind me asking why do you need to go to a
different page to interpret
and/or manipulate the data? You might want to think about keeping it a
part of the page that is
determining whether the variables are set. I would suggest something
like the following:
if( isset($varname) && isset($varname2) )
{
//your function here
//after function is complete then forward to next page
header("Location: wherever.php");
exit;
}
Just a thought.
[Back to original message]
|