php - How to attach a file in HTML? -
i have assignment wherein i'll make website enable user attach file , save database. i'm doing research , found out i'll need use php , mysql/sql database. bad thing here don't know how use php.
can me in coding attach file documents of user , save database?
<!doctype html> <html> <head> <title>attach file</title> </head> <body> <table width="450px"> <tr> <td valign="top"> <label for="attach_file"><b>attachment *</b></label> </td> <td valign="top"> <input type="submit" value="attach file"> </td> <td valign="top"> <label for="attach_file">no file selected</label> </td> </tr> <tr> <td valign="top"> <label for="app_name"><b>application name *</b></label> </td> <td valign="top"> <input type="text" name="app_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top"> <label for="desc"><b>description </b></label> </td> <td valign="top"> <textarea name="desc" maxlength="1000" cols="25" rows="6"></textarea> </td> </tr> <tr> <td colspan="4" style="text-align:center"> <br><br> <input type="submit" value="submit"> </td> </tr> </table> </body> </html>
since assignment i'll point in direction of information need.
first of all, need have the
<input type='file' name='upload'>
on page.
next php has several pages dedicated handling file uploads: http://php.net/manual/en/features.file-upload.php
good luck assignment.
Comments
Post a Comment