You are here: Re: Headers?? « PHP Programming Language « IT news, forums, messages
Re: Headers??

Posted by Scott on 11/19/77 11:47

On Fri, 2006-05-12 at 10:21 -0700, bob.herbst@gmail.com wrote:
> I am writing a page with sessions. At the start of every page I check
> to make sure that the user actually has a session by checking for some
> SESSION variables. On one of my pages I have a form that is to add
> guests for an event. I have no idea how many guests a particular member
> is giong to bring and the number of guests is not limited. So to save
> myself time I wrote a form that will allow you to add one guest and
> then hit add guest. This will save that guest to the guest table in my
> MySQL database but then I want to reload the page to have them add
> another guest. The only problem I am having is that the only way I know
> how to send the user to the page is using the header() function. This
> is not working because I have already output data. Is there a better
> way to do this so that I can one form and not have to have a form input
> for guests up to 20?
>
> Thanks
>

Instead of using header(), why not have the form post to itself?

<?php
if (isset($_POST['guest'])) {
include('formProcessingCode.php');
}
?>

<form action="<?=$_SERVER['PHP_SELF']?>" method="post"> ...

 

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

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