Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
New php-forum User
New php-forum User
Posts: 25
Joined: Mon Jun 24, 2002 1:10 am
Location: Huddersfield


Postby 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>

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.


New php-forum User
New php-forum User
Posts: 6
Joined: Thu Jul 18, 2002 11:56 pm

Postby 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) ) {         


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.

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 4 guests