How to close html-form with PHP?

Hal Mueller hal at MOBILEGEOGRAPHICS.COM
Mon Dec 4 10:56:17 PST 2006


Not clear to me what you want to do.  Do you mean that you want the 
browser window to close?  You might be able to get some Javascript 
happening to do this, but I don't think it's a good user experience 
("I clicked SUBMIT and my browser window went away").  What does it 
mean to tell the only window on a PDA/smartphone browser to close?

When your user hits the "submit" button, the browser will go on to 
whatever page it's directed to by the form.  It's up to that target 
to display new content.

On most of my PHP forms, if the target of a form is the same PHP 
script that created the form I do something like this:
if (this is a form submission) {
process form;
say thank you;
}
else {
display the form;
}

where "if (this is a form submission)" checks for PUT/GET variables 
as appropriate.

H

At 5:27 PM +0100 12/4/06, Chris Beaart wrote:
>I have created a html document to get input from the user. On this 
>form I created a button which runs some PHP code. After running the 
>code I want to close the form automatically. How do I do this?
>
>Thanks,
>Chris Beaart.
>


-- 
Hal Mueller                hal at mobilegeographics.com              
Mobile Geographics LLC     http://www.mobilegeographics.com/



More information about the MapServer-users mailing list