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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

Echoing a Variable from a Object
How do I get a variable from the new User Class to echo out in this clasS?

class MyApp
{

Check premium expire
Hi,

I am making a simple file hosting site and want to check if users premium subscriptions h

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

PHP FTP Can't upload Big FIles
Anyone had any success using FTP to upload a file say 90m?

im using ftp_put and it returns fa

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

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