I seem to be having a problem getting my file names to be shortened down from the file path. Take this simple code for example:
<?
mysql_connect("localhost");
mysql_select_db("db");
$doaction=$_GET["action"];
?>
<form action=<?print("miniupload.php?action=1\n")?> method=POST enctype="multipart/form-data">
File:<input type=file name=newfile><br>
<input type=submit value="Upload"></form>
<?
if($doaction=1)
{
echo "Uploading file $newfile.<br>Short Name: $newfile_name<br>";
}
?>
The problem is when I used $newfile_name to shorten down the file name to just the file from the path. It sits forever in the browser loading and eventually times out. Otherwise, if i comment out the part using $newfile_name, it works fine. Any ideas what could be causing this?
Thanks alot!