Jump to content

[SOLVED] Nested (echoed) php running wrong script


cactuscake

Recommended Posts

Got a problem with a php website I'm creating.

 

In a nutshell, the first page is entirely html and calls a php script to process an uploaded file and some form fields using POST. After validating the uploaded file the script echos a new page with a new form containing hidden inputs to carry forward the extra information provided in the original form (this was easier than getting my head around cookies). It works, because when I view the generated source all of the hidden input values have been populated with the correct information.

 

The problem I am having is with the next part of the process - the echoed page includes a new button that is supposed to call a separate php script, using the new form values. But when the button is clicked, it executes the existing php script again (and fails on the validation) instead of running the correct script as referenced in the onClick attribute of the button.

 

Any idea what I'm doing wrong? or why it is behaving like this?

Using onclick because the input type is an image... can't get into my host server at the moment to test a simple submit button but will try that as soon as I'm back in.

 

uggh! Looks like the server has been down for several hours... I guess I'm going to have to wait until tomorrow to sort it out.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.