Re: Which is better??
| From: | Michael Kimsal | Date: | Fri, 06 Apr 2001 16:39:15 +0000 |
| Subject: | Re: Which is better?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47463@lists.php.net to get a copy of this message | ||
Why are you having problems with option one? That one makes more
sense to me, because you can have the FORM in only one file, and show
error messages/etc on the same page as the form.
psuedo-code
<?
if (submitted) {
check values
if no errors(redirect to next page)
if errors }
?>
<?= $errors;?>
<form>
SHOW FORM STUFF HERE
also include submitted values so if
there are errors we'll see them an not
have to reinput everything
<input type="hidden" name="submitted" value="yes">
</form>
?>
Self-referencing seems to be the way to go, imo.
Curtis wrote:
> <snip>
> The reason I ask is that I am having problems making a field REQUIRED
> with option one.
> But all of my forms are set up that way.
>
> Thanks for any input.