Page 1 of 1

form action question

Posted: Wed Jan 12, 2005 3:11 pm
by devfun
My index.html include a form, the code is like:
<form action="process.php" ...>

However this will redirect my current page index.html to process.php. I just want to use the php file to process the data which are extractted from the form in index.html and I want the index.html stays still. Anybody can tell me how to do this?

I am totally new in php, thanks a lot in advance.

Posted: Wed Jan 12, 2005 3:15 pm
by feyd
make sure your script outputs nothing, and include() the index.html file after it's done processing.

Alternately, you can use header() to redirect the user after the script has processed the form. Make sure you don't have any text output at all with this route.

Posted: Wed Jan 12, 2005 3:19 pm
by devfun
thank you very much. I'll try.