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?

348 Like 15 Dislike
Previous php-forum Next php-forum
Other php-forum

update post issues
I am trying to create an update to a post function, while the update does occur, the page routing an

PHP and MySQL on intranet?
Is it possible to use both these on an intranet network?

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

Code doesn't print what i wanted it too. Please help!
Hi there,

I wrote this code to mae it so that in the form before it that the user said their

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what c

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would

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