Hi guys :)
I made a news system and in add news form i would like to have an Attach File option:
- You would have a browse button for a file and it would then upload it to a specified directory.
- Next to the Browse button i would like to have a FileName field, in which you would enter a more appropriate name for the file.
I am using MySql, so i guess there would be two fields, something like FilePath and FileName.
In the news display it would then show "Attached File: FileName", if there is a file attached, or it wouldn't show the "Attached File:" if there was no file attached to the news.
Also a simple check, if a file with same name exists in the upload dir, and then warn the admin to change the filename would be required i guess :)
How can that be done (code wise)?