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

pagination numbering pattern
Hello,

I have following code which works great for pagination. but i have small issue now.

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to com

Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website

Probably Easy, Need help with Check Boxes in PHP Code
hello,

Thanks for looking this over and helping me out. My problem is I have a online store l

Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then

Undefined variables
hi
----------------------------------------------------------------------------------------------

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

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