Attention: PROnetworks has upgraded our forum from phpbb2 to phpbb3!!

Please head over to our new converted forum at: http://www.pronetworks.org/forums/

This old forum will remain 'read-only' until approximately February 2009. We look forward to seeing you at the new forum!
Author Message
DRAGON OF DARKNESS
PostPosted: Tue Apr 08, 2008 2:06 pm Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
Hey guys :D

I need some help with this web application Im making. I just started with PHP about 2 days ago so I only know alittle

First I need to know how I could go about inputting text data and uploading files all on the same page. I already have fields of data that connect and insert data input my table and also a upload script that saves a file on my server, but I need to put these both on the same page. Also, after the file is uploaded, I need to input the path of the file into the database.

Secondly, I need help with a query. I need it to find the usernames usergroup when a user logs in.

Im pretty sure Ive given all the info I need to for someone to help me but if you need more info or anything else let me know. Thanks.
 
Back to top
DRAGON OF DARKNESS
PostPosted: Wed Apr 09, 2008 9:48 am Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
ok I got one of the queries for the usergroup:

SELECT usergroup FROM data WHERE username = '$myusername'

But I still need help with the rest ... Anyone?
 
Back to top
DRAGON OF DARKNESS
PostPosted: Fri Apr 11, 2008 9:14 am Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
Ok the only thing I have left to do is this: I have get file and text input to work on the same page. Like this:

Code:
form action="file.php" method="post" enctype="multipart/form-data"
input type="file" name="file" id="file"


AND

Code:
form action="insert.php" method="post"
input type="text" name="text"


But I need them on the same page... I got them to work fine on seperate pages, but not together... Any help ?

EDIT: I had to take off the "<" and ">" because It wouldnt display right with them.
 
Back to top
jbullard
Jason Bullard
PostPosted: Fri Apr 11, 2008 12:06 pm Reply with quote

VP - Software
 
 


Joined: 06 Jun 2004
Posts: 3304
Location: Utah
What I would do is combine both of them into one php file. Then you can do two things at once - either upload file and/or save text.

Or, you can have a radio button which specifies which is being done and use javascript to dynamically insert the action on the form. The default would be file and choosing the radio button "text" would then change the action to insert.php.
 
Back to top
DRAGON OF DARKNESS
PostPosted: Fri Apr 11, 2008 1:32 pm Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
Yeah jason, I want to upload a file and save text on the same page ... But im not sure of the coding on the form page and the target page ... Thats what Im saying, I need help with that.

EDIT: The code I gave above Is what I have working on sperate pages now...
 
Back to top
DRAGON OF DARKNESS
PostPosted: Tue Apr 15, 2008 11:48 am Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
Anychance anyone else knows how to do this?
 
Back to top
DRAGON OF DARKNESS
PostPosted: Thu May 08, 2008 12:22 pm Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
jason can you help me with this ? I still dont know how to put text data and file uploads on the same page and I need to get it done asap sad
 
Back to top
jbullard
Jason Bullard
PostPosted: Thu May 08, 2008 12:24 pm Reply with quote

VP - Software
 
 


Joined: 06 Jun 2004
Posts: 3304
Location: Utah
Yeah, can you post the code for both so I can see what is going on? Or PM them if you don't want to post it here. smilenod
 
Back to top
DRAGON OF DARKNESS
PostPosted: Thu May 08, 2008 12:52 pm Reply with quote

PRO SILVER
 
 


Joined: 16 Jul 2004
Posts: 4674
Location: MIA > FLA > USA
jbullard wrote:
Yeah, can you post the code for both so I can see what is going on? Or PM them if you don't want to post it here. smilenod


sent
 
Back to top
jbullard
Jason Bullard
PostPosted: Thu May 08, 2008 1:07 pm Reply with quote

VP - Software
 
 


Joined: 06 Jun 2004
Posts: 3304
Location: Utah
So from what I can tell you want the personal information stored in the database and then also upload a file. What part is not working with this script?
 
Back to top
Back to top
Index >> Webmaster Domain & Code Room >> PHP web app help

Goto page 1, 2, 3  Next

Page 1 of 3

 


Tired of the Ads? Registered users have 80% less adverts.