A Digital Age Deserves A Digital Leader

PHP web app help

PHP web app help

Postby DRAGON OF DARKNESS » Tue Apr 08, 2008 6:06 pm

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.
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby DRAGON OF DARKNESS » Wed Apr 09, 2008 1:48 pm

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?
Last edited by DRAGON OF DARKNESS on Fri Apr 11, 2008 1:32 pm, edited 1 time in total.
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby DRAGON OF DARKNESS » Fri Apr 11, 2008 1:14 pm

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: Select all
form action="file.php" method="post" enctype="multipart/form-data"
input type="file" name="file" id="file"


AND

Code: Select all
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.
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby jbullard » Fri Apr 11, 2008 4:06 pm

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.
VP - Software
User avatar
Posts: 3653
Joined: Sun Jun 06, 2004 10:17 pm
Location: Utah
Real Name: Jason Bullard

Postby DRAGON OF DARKNESS » Fri Apr 11, 2008 5:32 pm

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...
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby DRAGON OF DARKNESS » Tue Apr 15, 2008 3:48 pm

Anychance anyone else knows how to do this?
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby DRAGON OF DARKNESS » Thu May 08, 2008 4:22 pm

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 :(
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby jbullard » Thu May 08, 2008 4:24 pm

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. :yesnod:
VP - Software
User avatar
Posts: 3653
Joined: Sun Jun 06, 2004 10:17 pm
Location: Utah
Real Name: Jason Bullard

Postby DRAGON OF DARKNESS » Thu May 08, 2008 4:52 pm

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. :yesnod:


sent
Stephen
PRO Level 16
User avatar
Posts: 1826
Joined: Fri Jul 16, 2004 11:14 pm
Location: MIA > FLA > USA

Postby jbullard » Thu May 08, 2008 5:07 pm

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?
VP - Software
User avatar
Posts: 3653
Joined: Sun Jun 06, 2004 10:17 pm
Location: Utah
Real Name: Jason Bullard

Next

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 4 guests

cron
cron