You are here: Re: 2 Forms « PHP Programming Language « IT news, forums, messages
Re: 2 Forms

Posted by Moot on 12/06/06 15:10

Jerim79 wrote:
> My working theory
> right now is that the second form erases all variables from the first
> form, as for as the system is concerned.

Indeed, this is the case. A form submission is a *one-time-only*
action. Whatever form fields exist are passed to the next page,
afterwhich they no longer exist. Submitting that second form passes on
the second form's data, but none of the first.

> <form method="POST" action="check.php?email=<?php echo $email ?>">
>

Eww. This just looks like a bad idea. Typically, to have forms span
multiple submissions, you need to propogate the form fields, but not
like this. The easiest way is to use hidden form fields. IE, something
like:
<input type="hidden" name="name" value="<?php echo $_POST['name'] ?>">

You give each piece of data you want to propogate it's own hidden
element, that way this data gets included along with the next form
submission.

 

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

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