PHP web app help
26 posts
• Page 1 of 3 • 1, 2, 3
PHP web app help
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
- DRAGON OF DARKNESS
- Posts: 1826
- Joined: Fri Jul 16, 2004 11:14 pm
- 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?
Last edited by DRAGON OF DARKNESS on Fri Apr 11, 2008 1:32 pm, edited 1 time in total.
Stephen
- DRAGON OF DARKNESS
- Posts: 1826
- Joined: Fri Jul 16, 2004 11:14 pm
- 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:
AND
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.
- 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
- DRAGON OF DARKNESS
- Posts: 1826
- Joined: Fri Jul 16, 2004 11:14 pm
- Location: MIA > FLA > USA
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.
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.
- jbullard
- VP - Software
- Posts: 3653
- Joined: Sun Jun 06, 2004 10:17 pm
- Location: Utah
- Real Name: Jason Bullard
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...
EDIT: The code I gave above Is what I have working on sperate pages now...
Stephen
- DRAGON OF DARKNESS
- Posts: 1826
- Joined: Fri Jul 16, 2004 11:14 pm
- 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
Stephen
- DRAGON OF DARKNESS
- Posts: 1826
- Joined: Fri Jul 16, 2004 11:14 pm
- 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.
sent
Stephen
- DRAGON OF DARKNESS
- Posts: 1826
- Joined: Fri Jul 16, 2004 11:14 pm
- Location: MIA > FLA > USA
26 posts
• Page 1 of 3 • 1, 2, 3
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 9 guests