Jump to content

Can I open a new page when the form processing completes?


SteveMann

Recommended Posts

I hope that this is a simple "DOH!" solution.

 

I have a page with a form on it, and the form action is to call my database insertion in a separate php file. This particular php file does not interact with the user it just adds the data to a mysql database.

 

Is there a method where I can send the user's browser to another page when the database update is complete - but without a button? I just want to start the PHP execution then go to a "thank-you" page.

 

Thanks

Link to comment
Share on other sites

Thanks, but I get the following error:

 

"Warning: Cannot modify header information - headers already sent by..."

 

I didn't think that I could put a header() after the php had already started.

 

Good idea, though..

 

 

Your processing script shouldn't generate any output, this way you can call header when its done.

Link to comment
Share on other sites

Thanks, but I get the following error:

 

"Warning: Cannot modify header information - headers already sent by..."

 

I didn't think that I could put a header() after the php had already started.

 

Good idea, though..

 

 

Your processing script shouldn't generate any output, this way you can call header when its done.

 

 

AHA! - I have some debugging "echo" statements in the script.

 

I also found this way to do the same thing:

print "<meta http-equiv=\"refresh\" content=\"0;URL=finish.php\">";

 

 

Thanks to everyone for the help!!!!

Steve

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.