You are here: Re: Action and Header « PHP Programming Language « IT news, forums, messages
Re: Action and Header

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация