Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble with redirecting to other page

Status
Not open for further replies.

tshey

Technical User
Dec 28, 2005
78
0
0
AU
Hi, I am still having trouble redirecting a form. Let me explain, I have a form inserting data into a table within a mysql database. However once the user presses the submit button it goes straight back to the initial page except with a ? after the php filename. I want the page to be displayed after submit to be the confirm page. Any ideas?
 
Form Page -> Processing Page -> Confirmation Page.

1. In Form Page, put the action form to the URL of the processing Page.

2. In Processing Page, insert data into table, blabal and put
header("Location: URL_OF_CONFIRMATION_PAGE"); in the last action. it should direct to the confirmation page.

Regards,

Namida
 
tshey,

Make sure you have set the action of the form to point to the file you want to process/insert with.

Failing that, make an extreme cut-down version of your page that contains only the required information to test this problem (no CSS, no javascript)... and then post the code (wrapped in [code]...[/code] tags) for us to look at.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Hi tshey

i'd hoped i'd given you all the tools you'd need in your other post on the same topic.

there were parse errors in this code (as i'd feared and mentioned). i have corrected it and posted the revised code here.

the success element is in lines 51 to 61 and i have provided you with code to exemplify both a fully autoprocessing page and one that redirects to a success page (the latter in line 58).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top