On Tuesday, March 5, 2002, at 04:06  PM, Andre Dubuc wrote:

> After inserting variables from a fill-out html form into my database, I 
> would
> like the form to "goto" the next html page, but I cannot figure out how 
> to do
> this basic function. I assume that when one clicks a "Submit" button, 
> the
> info is sent to the server, but how do you call a new page?

When the "submit" button is hit, the form executes the script located at 
the URL specified in the "action" attribute of the <form> tag.  So do 
$script_target = "./nameofscript.php";
print "<form method="get" action="$script_target">.....  ";

in your PHP.  If you're new to this, don't worry about using PHP_SELF to 
call the same script, just make a new page with the code that handles 
the first page's data.  But eventually you'll probably want to clean up 
your style and use switch() statements or if statements to keep it all 
in one page.  (Right now I'm working on a 700-line monster that doesn't 
even include any HTML!)



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to