Forum Moderators: coopster
>>index.html
<form method=post action='test.php'>
<input type=file name=file><br>
<input type=submit value=DO>
</form>
>>test.php
$sql = file_get_contents($_FILES['file']);
$sql = trim($sql);
mysql_connect('localhost','root','');
mysql_select_db('test');
mysql_query($sql);
Just a note about the file upload. You should keep the file below the web root.