Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
by AaaDee » Wed Jul 17, 2002 7:27 am
Hi, i have a form which has a hyperlink so you can open a new page and upload a file.
This uploads the file and then i want it to have a submit button to tell the page to add the file name to the form page along with the details that have already been answered.
so if the user adds:
Name: Adam Bell
News Title: Football
News: Blah Blah
Attach: <hyperlink>
Date:
Time:
So the upload page will submit the upload name into the form page and it will get the forms ORIGINAL details! and add the attach name onto the page.
Cheers
-

AaaDee
- New php-forum User

-
- Posts: 25
- Joined: Mon Jun 24, 2002 1:10 am
- Location: Huddersfield
-
by GeOrGe » Fri Jul 19, 2002 12:19 am
- Code: Select all
$upload_path = YOUR PATH;
$filename = $HTTP_POST_FILES['userfile']['name'];
if( move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], $upload_path.$filename) ) {
http://YOUR.SITE".$upload_path.$filename."\n";
}
The above address is the where the file is.
$filename is the name of the file.
I am not sure if this is what you want but I hope this will help you.
-
GeOrGe
- New php-forum User

-
- Posts: 6
- Joined: Thu Jul 18, 2002 11:56 pm
Return to PHP coding => General
Who is online
Users browsing this forum: Google Feedfetcher and 3 guests