Hi Guy's im facing this problem in upload.php...you see when im clicking on upload,it's bringing me back to the same page again..nothing is even being uploaded to the tables aswell...here's the code...
<?php include("../core.php"); include("../config.php"); connectdb(); $uip = getip(); $action = ($_GET["action"]); $sid = ($_GET["sid"]); $uid = getuid_sid($sid); $sid = ($_GET["sid"]); $site = ($_GET["site"]); $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'")); $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'")); $sitename = $sitename[0]; if($action != "") { if(!islogged($sid)) { echo "<head>"; echo "<title>Error!!!</title>"; echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />"; echo "</head>"; echo "<body>"; echo " "; echo "You are not logged in "; echo "Or Your session has been expired "; echo "<a href=\"index.php\">Login</a>"; echo " "; echo "</body>"; echo "</html>"; exit(); } } echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html"/> <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>'; echo "<title>$site_name Upload Files</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/$theme[0]\">"; echo "</head>"; echo "<body>"; //include("../web/header.php"); echo ""; echo "**Fileshare uploader**"; echo ""; if ($upload="upload"&&$superdat_name){ if (!eregi("\.(gif|mid|midi|3gp|mpeg|mpg|mp4|mp3|wav|jar|jad|jpeg|jpg|sis|sisx|amr|zip|rar|thm)$",$superdat_name)){ print "**Unsupported File Extention!**"; }else{ $superdat_name = preg_replace( '/[^a-zA-Z0-9\.\$\%\'\`\-\@\{\}\~\!\#\(\)\&\_\^]/' ,'',str_replace(array(' ','%20',"'"),array('_','_', ""),$superdat_name)); if(strlen($superdat_name)>50){ print "**File Name Is Too Long!**"; }else{ if (empty($superdat)) { print "**No input file specified!!!**"; }else{ copy("$superdat", "files/$superdat_name") or die("Couldn't copy file."); $date= time(); $type = $_POST["dir"]; $text2 = $_POST["name2"]; $fsize=round($superdat_size/1024,1); $text = "&&$superdat_name&&$fsize KB&&$date&&$REMOTE_ADDR&&"; $fz = "$fsize KB"; if("$text"!="$check[1]"){ $mysql=mysql_query("INSERT INTO ibwf_uploads2 SET uid='".$uid."', filename='".$superdat_name."', filename2='".$text2."', dir='".$type."', descrip='".$name."', filesize='".$fsize." KB', date='".$date."', date2='".date("l")."', uip='".$REMOTE_ADDR."'"); echo mysql_error(); } echo "**$superdat_name** has successfully been uploaded to our uploader"; } } } } ?> <?php $post = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$uid."'")); if($post[0]<30) { echo "You Need **100 plusses** and **30 Post** to upload your files! "; } else { echo "<FORM align=\"left\" ACTION=\"upload.php?sid=$sid&site=$site\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">"; echo "Category: <select name=\"dir\" value=\"$dir[0]\">"; if($dir[0]=="1"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"1\"$selected>Applications</option>"; if($dir[0]=="2"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"2\"$selected>Games</option>"; if($dir[0]=="3"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"3\"$selected>Ringtones / Musics</option>"; if($dir[0]=="4"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"4\"$selected>Pictures</option>"; if($dir[0]=="5"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"5\"$selected>Themes</option>"; if($dir[0]=="6"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"6\"$selected>Videos</option>"; if($dir[0]=="7"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"7\"$selected>Zip Archives</option>"; if($dir[0]=="8"){$selected=" selected=\"selected\"";}else{$selected="";} echo "<option value=\"8\"$selected>other</option>"; echo "</select> "; echo "Filename: <input type=\"text\" name=\"name2\" size=\"20\" maxlength=\"200\"/> "; echo "Description: <input type=\"text\" name=\"name\" size=\"20\" maxlength=\"200\"/> "; echo "File: <input type=\"file\" name=\"superdat\" size=\"20\"/> "; echo "<input type=\"submit\" value=\"Upload!\"/></form>"; echo "P/s:*Please select file category to upload or your files will be deleted!* "; echo "P/s:*Filename must be less then 50* "; echo " **Attentions** Only File .gif .mid .midi .3gp .mpg .mp4 .mp3 .wav .jar .jad .jpg .sis .sisx .amr .zip .thm are Allow "; if($site=="wap"){ echo " <a href=\"../fshare.php?action=main&sid=$sid\">Uploaded Files</a> "; }else{ echo " <a href=\"../fshare.php?action=main&sid=$sid\">Uploaded Files</a> "; } } if($site=="wap"){ echo "<a href=\"../index.php?action=main&sid=$sid\"><img src=\"/images/home.gif\" alt=\"\"/>Home</a>"; }else{ echo "<a href=\"../index.php?action=main&sid=$sid\"><img src=\"/images/home.gif\" alt=\"\"/>Home</a>"; } echo ""; //include("../web/footer.php"); ?> </body> </html>Sometimes im wondering if the $site = ($_GET["site"]); is causing this..how can i change it?...thanks