Re: single page form
| From: | omar cromwell mercado | Date: | Thu, 26 Oct 2000 04:08:03 +0000 |
| Subject: | Re: single page form | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3919@lists.php.net to get a copy of this message | ||
Another example:
<?php
if (trim($your_name)=="")
{ $command="form"; }
switch ($command)
{
case "form":
?>
<form action='<?php print $PHP_SELF ?>'
method=post>
<input type=hidden name=command value="display">
<input type=text name=your_name>
<input type=submit command="display">
</form>
<?
break;
case "display":
print "You entered $your_name<br>";
?>
<form action='<?php print $PHP_SELF ?>'
method=post>
<input type=hidden name=command value="form">
<input type=submit value="Back to Form">
</form>
<?php
break;
default:
break;
}
?>
>
> > Hello:
> >
> > I think this must be a FAQ...I see alot of PHP
> forms
> > that gather user input without calling another
> page
> > (it calls itself), all the while passing the
> collected
> > variables to the url string...does anyone have a
> form
> > like that where I could see the structure? What is
> the
> > basic logic in a page like that?
> >
> > If you could point me to some source that could be
> > dissected I would really appreciate it...
> >
> > Thanks
> > Luis
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Messenger - Talk while you surf! It's
> FREE.
> > http://im.yahoo.com/
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> php-db-unsubscribe@lists.php.net
> > For additional commands, e-mail:
> php-db-help@lists.php.net
> > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-db-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-db-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/