I had a file named start.php in my D:\Wamp folder.I need to upload the file and enter the full path ie D:\Wamp\start.php into my database.I did the code.But I am not getting the full file path in my database
the Code is as follows:
<tr> <td width="71">Select a file <span style="color:#FF0000"></span></td> <td width="292"><input type="file" name="userfile" id="userfile"></td> </tr>
My php code is as follows:
$path = "uploads/"; $path = $path . basename( $_FILES['userfile']['name']); move_uploaded_file($_FILES['userfile']['tmp_name'], $path);
My database insertion code is as follows:
$sql ="insert into invoice(filelocation) values('$path')";
Any help would be appreciated....