Nested (echoed) php running wrong script


Posted on 16th Feb 2014 07:03 pm by admin

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?

No comments posted yet

Your Answer:

Login to answer
348 Like 15 Dislike
Previous forums Next forums
Other forums

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

download directory onto C drive
I am attempting (if this is possible) to write a routine to automatically dump the contents of a dir

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an e

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

PHP form help required
Hi all! Apologies in advance for having to message the forum for help. I know you must get a lot of

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash