Reply to Posting behavior??

Your name:

Reply:


Posted by Shelly on 07/21/05 05:51

I am a little puzzled by the sequence of events. Please help me out.

I have page a.php. There is a button of type "submit" and name
"submit". I do an

if (isset($_POST['submit'])) {....}

I enter the braces. Inside the braces I have a

header("Location: b.php");

Now here is the thing. What happens is that the a.php seems to get
reexecuted, and since it now fails on a fopen in a.php, the thing never gets
to b.php. Initially I pass in to a.php parameters that enables it to find
the file that it needs to open and read. However, now I am leaving a,php so
why is a.php reexecuted? I came across this behavior before when I needed
to pass a variable that was defined in the page. The called page couldn't
get it. I solved this by setting a hidden variable in the calling page to
that value and passing the value of the hidden variable in the url string.

Also, what is the very best way of leaving a page and returning to the
calling page? Right now I have been naming the calling page in the called
page, but that is a bad hack. There has to be a better way. I looked at
things like PrevUrl and didn't understand it.

Thanks,
Shelly

[Back to original 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

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