Jump to content

What's an alternative to form within a form


swatisonee

Recommended Posts

I have a form that uses php self and includes a dropdown . It also has other variables that a user needs to input. All that datas moves to another php file for processing. Now i also need to be able to upload a file using phuploader.php in the same form.

 

Since phUploader also includes a form, i cannot insert it into the main form without errors coming up. So how do i solve the problem ?

 

The user has to be able to only see one page where he chooses customer  , that then leads to addresses getting listed and the user choosing one, then he also adds in other variables - date etc and finally uploads a file and hits a submit button .

 

i can get all of this to work separately but not on a single submit button such that the user sees only one page. ...how may i go about this pl ?

 

thnaks.

 

 

Field A : Customer –--php self gets activated to give options for Field B

Field B:  Customer address ---one address selected

Field C:  Date

Field D – other info

Field E – Upload a specific file and store it in a folder on the server AND

                store its path in the table storing data from Fields A-D. The script being used is phUploader.php

Submit

 

 

@beta0x64 : Thanks ! My php skills are rudimentary at best, ajax etc will be beyond me though i will take a look at the link you sent.

 

@phpchamps: i did try to modify but landed up with so many errors at so many places ..if the recycle bin were in the real world , it'd be overflowing !

 

I even tried the options listed here   http://www.webmasterworld.com/html/3985542.htm  by giving 2 names to the 2 submits but in vain.

@phpchamps: have spent almost 2 days but with no luck on this. this class also requires that i use a form within a form so its the same problem as with phUploader.php. If i dont use the form tags and only use

."<input name='upload' type='file' />

, the file doesnt get uploader nor do i get any error message..

so its back to square 1 :-( ....  what can i try now pl ?

 

 

<?php
include("Upload.php");

echo "<form enctype='multipart/form-data' action='index.php' method='POST'>"
."<input name='upload' type='file' /><input type='submit' value='Upload' />"
."</form>";
......the rest of it.
?>

 

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.