• 0

[PHP] File upload script


Question

I have a PHP file upload script working but i want to customize it slightly... Right now after upload it gives you this output to screen:

File Upload Successful!

Successfully Sent: mp3test.exe , a 214528 byte file with the extension type of application/octet-stream

I want it to give you the www url of the file you uploaded. So you could just click on a link given and it would take you right to the file. I dunno how to do this though. I hope someone can give me the php to do this. THanks

Link to comment
https://www.neowin.net/forum/topic/112621-php-file-upload-script/
Share on other sites

10 answers to this question

Recommended Posts

  • 0
<?php

if ($img1_name != "") {
        
        @copy("$img1" , "/home/imation/public_html/upload/files/$img1_name")
               
                or die("Couldn't Upload Your File.");


} else {

       die("No File Specified");

}

?>

<HTML>
<HEAD>
<TITLE>File Upload Successful</TITLE>
</HEAD>

<BODY>

<H1>File Upload Successful!</H1>

<P>Successfully Sent: <?php echo "$img1_name"; ?> , a <?php echo "$img1_size"; ?> byte file with the extension type of <?php echo "$img1_type"; ?> </P>

</BODY>

</HTML>

  • 0
<?php

if ($img1_name != "") {
        
        @copy("$img1" , "/home/imation/public_html/upload/files/$img1_name")
               
                or die("Couldn't Upload Your File.");


} else {

       die("No File Specified");

}

?>

<HTML>
<HEAD>
<TITLE>File Upload Successful</TITLE>
</HEAD>

<BODY>

<H1>File Upload Successful!</H1>

<P>Successfully Sent: <?php echo "$img1_name"; ?> , a <?php echo "$img1_size"; ?> byte file with the extension type of <?php echo "$img1_type"; ?> </P>

&lt;A HREF="http://www.YOURSERVER.com/upload/files/<?=$img1_name ?&gt;" Target=_blank&gt;&lt;?=$img1_name ?&gt;&lt;/A&gt;

&lt;/BODY&gt;

&lt;/HTML&gt;

  • 0

What kind of file upload script do you need? I made something called CollegeBast*rd while back that gives you a listing of uploaded files, and allows you upload and delete files, etc.

This is from when I didn't know that much about PHP ;)

&lt;?php
set_time_limit(1000);
?&gt;
&lt;body text="#000000" link="#3366CC" vlink="#3333CC" alink="#3333CC"&gt;
&lt;div align="left"&gt;
  &lt;p align="center"&gt;&lt;font size="5" face="Verdana, Arial, Helvetica, sans-serif"&gt;University&lt;strong&gt;****** 
    &lt;font size="2"&gt;0.94b&lt;br&gt;
    The ****** that brings files from j00r home to college, and vice-versa!&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
  &lt;p align="left"&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt; 
    &lt;?php

	function zonechange ($current, $target) {
	$current = +5 * $current;
	$zonedate = mktime(date('G'), date('i'), date('s'), date('n'), date('j'), date('Y'), 1) + (($current + $target) * 3600);
	return $zonedate;
	}
    
	$db = mysql_connect("localhost", "n/a", "n/a");
	if($db) {
  $db = mysql_select_db("college******", $db);
  if (($HTTP_GET_VARS['username']) &amp;&amp; ($HTTP_GET_VARS['password'])) {
 	 $username = trim($HTTP_GET_VARS['username']);
 	 $password = trim($HTTP_GET_VARS['password']);
 	 if ($users = mysql_fetch_row(mysql_query("SELECT * FROM users WHERE username='$username' AND 

password='$password'"))) {
    ?&gt;
     	 Welcome to College&lt;strong&gt;******&lt;/strong&gt;, &lt;?php echo $users[1] ?&gt;.&lt;/font&gt; 
      &lt;/p&gt;
      &lt;/div&gt;
    
&lt;?php 
if (isset($HTTP_GET_VARS['delete'])) {
	$deleteid = $HTTP_GET_VARS['delete'];
	$delfilesql = mysql_query("SELECT * FROM files WHERE id='$deleteid'");
	if ($delfile = mysql_fetch_row($delfilesql)) {
  if ($delfile[5] == $users[0]) {
 	 echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The file has been 

verified to belong to you.&lt;/font&gt;&lt;/strong&gt;';
 	 ?&gt;&lt;BR /&gt;&lt;?php
 	 $file = 'downloads/'.$username.'/'.$delfile[1];
 	 if (unlink($file)) {
    echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The file has 

been successfully deleted from the server.&lt;/font&gt;&lt;/strong&gt;';	
 	 } else {
    echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;There was a 

problem in deleting the file from the server!&lt;/font&gt;&lt;/strong&gt;';
 	 }
 	 ?&gt;&lt;BR /&gt;&lt;?php
 	 mysql_query("DELETE FROM files WHERE id=$deleteid");
 	 if (!mysql_result(mysql_query("SELECT * FROM files WHERE id='$deleteid'"),0)) {
    echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The file 

linkage was successfully deleted from the database.&lt;/font&gt;&lt;/strong&gt;';
 	 } else {
    echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;The file linkage 

could not be removed from the database! It has possibly been deleted already.&lt;/font&gt;&lt;/strong&gt;';
 	 }	
  } else {
 	 echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;You do not own this file, 

and so therefore you cannot delete it.&lt;/font&gt;&lt;/strong&gt;';
  }
	} else {
  echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;This file does not exist in the 

database.&lt;/font&gt;&lt;/strong&gt;';
	} 	 
} else if ($FrmBtn == 'Upload') {
	if ($file = $HTTP_POST_FILES['userfile']['name']) {
	echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The filename has been retrieved from 

the file that is going to be uploaded.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';
  if(is_dir('downloads/'.$username)) {
 	 echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The directory that the 

file will be moved to already exists.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';
  } else {
 	 echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;The directory that the 

file will be moved to does not exist! Attempting to create directory now.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';
 	 if (mkdir('downloads/'.$username)) {
    echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The directory 

was created successfully.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';
 	 }
  }
  if(is_dir('downloads/'.$username)) {
  echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The directory that the file 

will be moved to has been verified to exist.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';  
 	 if (!file_exists('downloads/'.$username.'/'.$file)) {
    echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The directory 

that the file will be moved to does not contain a file with the same name.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';
    if(is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
   	 echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The 

file was uploaded to the temporary directory successfully.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';
   	 $filesize = $HTTP_POST_FILES['userfile']['size'];
   	 $max_id = mysql_result(mysql_query("SELECT MAX(id) FROM files"), 0)+1;
   	 if (copy($HTTP_POST_FILES['userfile']['tmp_name'],"downloads/".$username.'/'.$file)) {
      echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;The file was moved from the temporary directory to the final directory successfully.&lt;/font&gt;&lt;/strong&gt;&lt;BR /&gt;';	
      $dateuploaded = date('d/m/Y');
      echo '&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="green"&gt;&lt;b&gt;The 

upload date was aqquired successfully : '.$dateuploaded.'.&lt;BR /&gt;';
      $description = trim(nl2br(htmlspecialchars($description)));
      $path_parts = pathinfo($file);
      $extension = $path_parts["extension"];
      if (mysql_query("INSERT INTO files 

(id,name,extension,size,category,userid,description,dateuploaded) VALUES ('$max_id','$file','$extension', 

'$filesize','$category','$users[0]','$description','$dateuploaded')")) {
     	 echo '&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2" 

color="green"&gt;&lt;b&gt;The file details were entered into the database correctly.&lt;BR /&gt;';
     	 echo '&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2" 

color="green"&gt;&lt;b&gt;The file was uploaded successfully. (/downloads/'.$username.'/'.$file.'&lt;/font&gt;&lt;/b&gt;)';
      } else {
     	 echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;The details of the file could not be entered into the database.&lt;/font&gt;&lt;/strong&gt;';
      }
   	 } else {
      echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;The file could not be moved from the temporary directory to the final directory.&lt;/font&gt;&lt;/strong&gt;';
   	 }
    } else {
   	 echo '&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="red"&gt;&lt;b&gt;The file could 

not be uploaded for some reason.&lt;/font&gt;&lt;/b&gt;&lt;BR /&gt;';
    }
 	 } else {
    echo '&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="red"&gt;&lt;b&gt;The file already 

exists on the server, or a different file under the same filename. Please rename the file to avoid the conflict, and then try 

again.&lt;/font&gt;&lt;/b&gt;';  
 	 }
  } else {
 	 echo '&lt;strong&gt;&lt;font size="2" color="green" face="Verdana, Arial, Helvetica, sans-serif"&gt;The directory was 

created successfully.&lt;/font&gt;&lt;/strong&gt;';
  }
	} else {
  echo '&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="red"&gt;&lt;b&gt;The filename could not be retrieved 

from the file that is going to be uploaded.&lt;/font&gt;&lt;/b&gt;';  
	}
}

?&gt;

&lt;table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#FFFFFF"&gt;
  &lt;tr align="center" bgcolor="#CCCCCC"&gt; 
    &lt;td width="10%" height="18" nowrap&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;id 
      (&lt;a href="?username=&lt;?php echo $users[1] ?&gt;&amp;password=&lt;?php echo $users[2] ?&gt;&amp;order=id&amp;sort=
&lt;?php
  if ($HTTP_GET_VARS['order'] == 'id') {
 	 if ($HTTP_GET_VARS['sort'] == 'ASC') {
      echo 'DESC';
 	 } else {
    echo 'ASC';
 	 }
  } else {
 	 echo 'ASC';
  }
  ?&gt;"&gt;order by&lt;/a&gt;) &lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
    &lt;td width="20%" height="18" nowrap bgcolor="#999999"&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;filename 
      (&lt;a href="?username=&lt;?php echo $users[1] ?&gt;&amp;password=&lt;?php echo $users[2] ?&gt;&amp;order=name&amp;sort=
&lt;?php
  if ($HTTP_GET_VARS['order'] == 'name') {
 	 if ($HTTP_GET_VARS['sort'] == 'ASC') {
      echo 'DESC';
 	 } else {
    echo 'ASC';
 	 }
  } else {
 	 echo 'ASC';
  }
  ?&gt;"&gt;order by&lt;/a&gt;)&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
    &lt;td width="20%" nowrap bgcolor="#CCCCCC"&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;description 
      (&lt;a href="?username=&lt;?php echo $users[1] ?&gt;&amp;password=&lt;?php echo $users[2] ?&gt;&amp;order=description&amp;sort=
&lt;?php
  if ($HTTP_GET_VARS['order'] == 'description') {
 	 if ($HTTP_GET_VARS['sort'] == 'ASC') {
      echo 'DESC';
 	 } else {
    echo 'ASC';
 	 }
  } else {
 	 echo 'ASC';
  }
  ?&gt;"&gt;order by&lt;/a&gt;)&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
    &lt;td width="10%" height="18" nowrap bgcolor="#999999"&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;extension 
      (&lt;a href="?username=&lt;?php echo $users[1] ?&gt;&amp;password=&lt;?php echo $users[2] ?&gt;&amp;order=extension&amp;sort=
&lt;?php
  if ($HTTP_GET_VARS['order'] == 'extension') {
 	 if ($HTTP_GET_VARS['sort'] == 'ASC') {
      echo 'DESC';
 	 } else {
    echo 'ASC';
 	 }
  } else {
 	 echo 'ASC';
  }
  ?&gt;"&gt;order by&lt;/a&gt;)&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
    &lt;td width="10%" height="18" nowrap bgcolor="#CCCCCC"&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;size 
      (&lt;a href="?username=&lt;?php echo $users[1] ?&gt;&amp;password=&lt;?php echo $users[2] ?&gt;&amp;order=size&amp;sort=
&lt;?php
  if ($HTTP_GET_VARS['order'] == 'size') {
 	 if ($HTTP_GET_VARS['sort'] == 'ASC') {
      echo 'DESC';
 	 } else {
    echo 'ASC';
 	 }
  } else {
 	 echo 'ASC';
  }
  ?&gt;"&gt;order by&lt;/a&gt;)&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
    &lt;td width="10%" height="18" nowrap bgcolor="#999999"&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;category 
      (&lt;a href="?username=&lt;?php echo $users[1] ?&gt;&amp;password=&lt;?php echo $users[2] ?&gt;&amp;order=category&amp;sort=
&lt;?php
  if ($HTTP_GET_VARS['order'] == 'size') {
 	 if ($HTTP_GET_VARS['sort'] == 'ASC') {
      echo 'DESC';
 	 } else {
    echo 'ASC';
 	 }
  } else {
 	 echo 'ASC';
  }
  ?&gt;"&gt;order by&lt;/a&gt;)&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td width="10%" nowrap bgcolor="#CCCCCC"&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;upload 

date&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
  
    &lt;td width="10%" nowrap bgcolor="#999999"&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;&lt;strong&gt;delete?&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php
    if ($HTTP_GET_VARS['order']) {
   	 $order = $HTTP_GET_VARS['order'];
    } else {
   	 $order = 'id';
    }
    
    if ($HTTP_GET_VARS['sort']) {
   	 $sort = $HTTP_GET_VARS['sort'];
    } else {
   	 $sort = 'ASC';
    }
   	 
    $sqlx = 'SELECT * FROM files WHERE userid='.$users[0].' ORDER BY '.$order.' '.$sort;
    $sql = mysql_query($sqlx);
    
    $sizecounter = 0;
  
    while ($files = mysql_fetch_row($sql)) {
   	 if (!$files[6]) {
      $files[6] = 'A description is not yet available.';
   	 }
   	 
   	 $catssql = mysql_query("SELECT * FROM categories WHERE id='$files[4]' ORDER BY id");
   	 $cats = mysql_fetch_row($catssql);
   	 if ($cats) {
      $files[4] = $cats[1];	
   	 } else {
      $files[4] = 'N/A';
   	 }
   	 
   	 if (!$files[7]) {
      $files[7] = 'N/A';
   	 }
   	 
   	 $sizecounter = ($sizecounter + $files[3]);
    
   	 $ext2 = array("B","KB","MB","GB","TB");
   	 while ($files[3] &gt;= pow(1024,$j)) ++$j;
      $files[3] = round($files[3] / pow(1024,$j-1) * 100) / 100 . $ext2[$j-1];
   	 
   	 print &lt;&lt;&lt;EOT
   	 &lt;tr bgcolor="#CCCCCC" align="center"&gt; 
   	 &lt;td&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;$files[0]&lt;/font&gt;&lt;/td&gt;
   	 &lt;td&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;a 

href="downloads/$username/$files[1]"&gt;&lt;b&gt;$files[1]&lt;/b&gt;&lt;/a&gt;&lt;BR /&gt;&lt;font size="1"&gt;[&lt;a href="downloads/$username/$files[1]?!"&gt;bypass 

proxy&lt;/a&gt;]&lt;/BR&gt;[ &lt;a href="?username=$users[1]&amp;password=$users[2]&amp;modify=$files[0]&amp;order=$order&amp;sort=$sort"&gt;modify&lt;/a&gt; 

]&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;
   	 &lt;td align="left"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;$files[6]&lt;/font&gt;&lt;/td&gt;
   	 &lt;td&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;$files[2]&lt;/font&gt;&lt;/td&gt;
   	 &lt;td&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;$files[3]&lt;/font&gt;&lt;/td&gt;
   	 &lt;td&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;$files[4]&lt;/font&gt;&lt;/td&gt;
   	 &lt;td&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;$files[7]&lt;/font&gt;&lt;/td&gt;
   	 &lt;td&gt;&lt;font size="1" face="Verdana, Arial, Helvetica, sans-serif"&gt;[ &lt;a 

href="?username=$users[1]&amp;password=$users[2]&amp;delete=$files[0]&amp;order=$order&amp;sort=$sort"&gt;Delete&lt;/a&gt; ]&lt;/font&gt;&lt;/td&gt;
   	 &lt;/tr&gt;
EOT;
   	 $count++;
    }
    if (!$count) {
   	 ?&gt;
  &lt;tr bgcolor="#000000"&gt; 
    &lt;td colspan="8" align="center"&gt;&lt;strong&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#33FF00"&gt;** 
      No files uploaded yet. **&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php
    } else {
   	 $ext2 = array("B","KB","MB","GB","TB");
   	 while ($sizecounter &gt;= pow(1024,$j)) ++$j;
      $sizecounter = round($sizecounter / pow(1024,$j-1) * 100) / 100 . $ext2[$j-1];
   	 ?&gt;
   	 &lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;You currently have &lt;?php echo 

$sizecounter ?&gt; of files stored.&lt;/font&gt;
    &lt;?php
    }
    ?&gt;
  &lt;tr bgcolor="#999999"&gt; 
    &lt;td height="17" colspan="8" align="right"&gt;&lt;font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;College&lt;strong&gt;******&lt;/strong&gt; 
      &lt;font color="#33FF00"&gt;&gt;&gt;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
    
&lt;form name="upload" enctype="multipart/form-data" method="post" action="index.php?username=<?php echo $users[1] ?&gt;&amp;password=&lt;?php echo 

$users[2] ?&gt;&amp;order=&lt;?php echo $order ?&gt;&amp;sort=&lt;?php echo $sort ?&gt;"&gt;
  &lt;table width="400" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#3366CC"&gt;
    &lt;tr&gt; 
      &lt;td bgcolor="#3366CC"&gt; &lt;div align="center"&gt;&lt;font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, 

sans-serif"&gt;&lt;strong&gt;Uploader&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td bgcolor="#CCCCCC"&gt; &lt;p&gt;&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;File 
          to upload:&lt;/strong&gt;&lt;br /&gt;
          &lt;input name="userfile" type="file" size="40" /&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;strong&gt;Description:&lt;/strong&gt;&lt;br /&gt;
          &lt;textarea name="description" cols="40" rows="6" id="description"&gt;&lt;/textarea&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;strong&gt;Category:&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;
    &lt;select name="category" id="category"&gt;
   	 &lt;?php
 	 $catssql = mysql_query("SELECT * FROM categories ORDER BY id");	
 	 while ($cats = mysql_fetch_row($catssql)) {
    if ($cats[0] == 0) {
   	 echo '&lt;option value="'.$cats[0].'" $selected&gt;['.$cats[0].'] - '.$cats[1].'&lt;/option&gt;';
    } else {
   	 echo '&lt;option value="'.$cats[0].'"&gt;['.$cats[0].'] - '.$cats[1].'&lt;/option&gt;';
    }	
 	 }
 	 ?&gt;
          &lt;/select&gt;
        &lt;/p&gt;
        &lt;p align="center"&gt; 
          &lt;input name="FrmBtn" type="submit" id="FrmBtn" value="Upload" /&gt;
        &lt;/p&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/form&gt;
  &lt;?php
 	 } else {
    echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;The username and 

password entered is invalid.&lt;/font&gt;&lt;/strong&gt;';
 	 }
  } else {
 	 echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;You did not specify a 

username and password!&lt;/font&gt;&lt;/strong&gt;';
  }   	 
	} else if(!$db) {
  echo '&lt;strong&gt;&lt;font size="2" color="red" face="Verdana, Arial, Helvetica, sans-serif"&gt;Could not connect to the MySQL 

database!&lt;/font&gt;&lt;/strong&gt;';
	}

?&gt;

  • 0

WEll, heres what i am trying to do. I have a guest user name & pass in order to access upload privalges. But when you get access your able to also delete files. Is there anyway i can maybe add a admin user name that only has those "delete" prviagles? Thanks if you can tell me the code i neeed.

################## configurations ####################

# header &amp; title of this file
$title = "File Upload Manager";

# individual file size limit - in bytes (102400 bytes = 100KB)
$file_size_ind = "1024000";

# the upload store directory (chmod 777)
$dir_store= "store";

# the images directory
$dir_img= "img";

# the style-sheet file to use (located in the "img" directory, excluding .css)
$style = "style-def";

# the file type extensions allowed to be uploaded
$file_ext_allow = array("gif","jpg","jpeg","png","txt","nfo","doc","rtf","htm","dmg","zip","rar","gz","exe");

# option to display the file list
# to enable/disable, enter '1' to ENABLE or '0' to DISABLE (without quotes)
$file_list_allow = 1;

# option to allow file deletion
# to enable/disable, enter '1' to ENABLE or '0' to DISABLE (without quotes)
$file_del_allow = 1;

# option to password-protect this script [-part1]
# to enable/disable, enter '1' to ENABLE or '0' to DISABLE (without quotes)
$auth_ReqPass = 1;

# option to password-protect this script [-part2]
# if "$auth_ReqPass" is enabled you must set the username and password
$auth_usern = "uploader";
$auth_passw = "upload";

################ end of configurations ###############


# DO NOT ALTER OR EDIT BELOW THIS LINE UNLESS YOU ARE AN ADVANCED PHP PROGRAMMER

?&gt;
&lt;?
if (@phpversion() &lt; '4.1.0') {
    $_FILE = $HTTP_POST_FILES;
    $_GET = $HTTP_GET_VARS;
    $_POST = $HTTP_POST_VARS;
}
clearstatcache();
error_reporting(E_ALL &amp; ~E_NOTICE);
$fum_vers = "1.3"; # do not edit this line, the script will not work!!!
$fum_info_full = "File Upload Manager v$fum_vers";

function authDo($auth_userToCheck, $auth_passToCheck) 
{
	global $auth_usern, $auth_passw;
	$auth_encodedPass = md5($auth_passw);

	if ($auth_userToCheck == $auth_usern &amp;&amp; $auth_passToCheck == $auth_encodedPass) {
	$auth_check = TRUE;
	} else {
	$auth_check = FALSE;
	} 
	return $auth_check;
	}

	if (isset($logout)) {
	setcookie ('fum_user', "",time()-3600); 
	setcookie ('fum_pass', "",time()-3600);
	}
  
	if (isset($login)) {
	$auth_password_en = md5($auth_formPass); 
	$auth_username_en = $auth_formUser;

	if (authDo($auth_username_en, $auth_password_en)) { 
	setcookie ('fum_user', $auth_username_en,time()+3600); 
	setcookie ('fum_pass', $auth_password_en,time()+3600); 
	$auth_msg = "&lt;b&gt;Authentication successful!&lt;/b&gt; The cookies have been set.&lt;br&gt;&lt;br&gt;".
	$auth_msg . "Your password (MD5 encrypted) is: $auth_password_en";
	} else { 
	$auth_msg = "&lt;b&gt;Authentication error!&lt;/b&gt;";
	}
}

if (($_GET[act]=="dl")&amp;&amp;$_GET[file]) 
{
	if ($auth_ReqPass != 1 || ($auth_ReqPass == 1 &amp;&amp; isset($fum_user) &amp;&amp; !isset($logout))) { 
	if ($auth_ReqPass != 1 || ($auth_ReqPass == 1 &amp;&amp; authDo($fum_user, $fum_pass))) {

	$value_de=base64_decode($_GET[file]);
	$dl_full=$dir_store."/".$value_de;
	$dl_name=$value_de;

	if (!file_exists($dl_full))
	{ 
	echo"ERROR: Cannot download file, it does not exist.&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";  
	exit();
	} 

	header("Content-Type: application/octet-stream");
	header("Content-Disposition: attachment; filename=$dl_name");
	header("Content-Length: ".filesize($dl_full));
	header("Accept-Ranges: bytes");
	header("Pragma: no-cache");
	header("Expires: 0");
	header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
	header("Content-transfer-encoding: binary");
 	 
	@readfile($dl_full);

	exit();

	}
	}
}

function getlast($toget)
{
	$pos=strrpos($toget,".");
	$lastext=substr($toget,$pos+1);

	return $lastext;
}

function replace($o)
{
	$o=str_replace("/","",$o);
	$o=str_replace("\\","",$o);
	$o=str_replace(":","",$o);
	$o=str_replace("*","",$o);
	$o=str_replace("?","",$o);
	$o=str_replace("&lt;","",$o);
	$o=str_replace("&gt;","",$o);
	$o=str_replace("\"","",$o);
	$o=str_replace("|","",$o);

	return $o;
}

?&gt;
&lt;!-- &lt;?=$fum_info_full?&gt; --&gt;

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;? echo ($title) ? ($title) : ("File Upload Manager"); ?&gt;&lt;/title&gt;
&lt;link rel="stylesheet" href="&lt;?=$dir_img?&gt;/&lt;?=$style?&gt;.css" type="text/css"&gt;
&lt;?
	if ($auth_ReqPass == 1) 
	{ 
  if (isset($login) || isset($logout)) {
 	 echo("&lt;meta http-equiv='refresh' content='2;url=$_SERVER[PHP_SELF]'&gt;");
  }
	}
?&gt;
&lt;/head&gt;
&lt;body bgcolor="#F7F7F7"&gt;&lt;br&gt;&lt;br&gt;
&lt;center&gt;
&lt;?	
	if ($auth_ReqPass != 1 || ($auth_ReqPass == 1 &amp;&amp; isset($fum_user) &amp;&amp; !isset($logout))) { 
	if ($auth_ReqPass != 1 || ($auth_ReqPass == 1 &amp;&amp; authDo($fum_user, $fum_pass))) {
?&gt;
&lt;table width="560" cellspacing="0" cellpadding="0" border="0"&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;font size="3"&gt;&lt;b&gt;&lt;i&gt;&lt;? echo ($title) ? ($title) : ("File Upload Manager"); ?&gt;&lt;/i&gt;&lt;/b&gt;&lt;/font&gt; &lt;font style="text-decoration: bold; font-size: 9px;"&gt;v&lt;?=$fum_vers?&gt;&lt;/font&gt; 
&lt;? 
	#--Please do not remove my link/copyright as it is unfair and a breach of the license--#
	echo"&lt;a href=\"http://www.mtnpeak.net\" style=\"text-decoration: none; color: #C0C0C0; font-size: 9px; cursor: default\";&gt;© thepeak&lt;/a&gt;"; 
?&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
&lt;?
	if (!eregi("777",decoct(fileperms($dir_store))))
	{
  echo"&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;h4&gt;&lt;font color=\"FF0000\"&gt;ERROR: cannot access the upload store file directory. please chmod the \"$dir_store\" directory with value 0777 (xrw-xrw-xrw)!&lt;/h4&gt;&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;refresh&lt;/a&gt;";
	}
	else
	{
  if (!$_FILES[fileupload])
  {
?&gt;
&lt;table width="560" cellspacing="0" cellpadding="0" border="0" class="table_decoration" style="padding-top:5px;padding-left=5px;padding-bottom:5px;padding-right:5px"&gt;
  &lt;form method="post" enctype="multipart/form-data"&gt;
  &lt;tr&gt;
    &lt;td&gt;file:&lt;/td&gt;&lt;td&gt;&lt;input type="file" name="fileupload" class="textfield" size="30"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;rename to:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="rename" class="textfield" size="46"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;file types allowed:&lt;/td&gt;&lt;td&gt;
	&lt;?
	for($i=0;$i&lt;count($file_ext_allow);$i++)
	{
  if (($i&lt;&gt;count($file_ext_allow)-1))$commas=", ";else $commas="";
  list($key,$value)=each($file_ext_allow);
  echo $value.$commas;
	}
	?&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;file size limit:&lt;/td&gt;
	&lt;td&gt;
  &lt;b&gt;&lt;?
 	 if ($file_size_ind &gt;= 1048576) 
 	 {
    $file_size_ind_rnd = round(($file_size_ind/1024000),3) . " MB";
 	 } 
 	 elseif ($file_size_ind &gt;= 1024) 
 	 {	
    $file_size_ind_rnd = round(($file_size_ind/1024),2) . " KB";
 	 } 
 	 elseif ($file_size_ind &gt;= 0) 
 	 {
    $file_size_ind_rnd = $file_size_ind . " bytes";
 	 } 
 	 else 
 	 {
    $file_size_ind_rnd = "0 bytes";
 	 }
 	 
 	 echo "$file_size_ind_rnd";
  ?&gt;&lt;/b&gt;
	&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td colspan="2"&gt;&lt;input type="submit" value="upload" class="button"&gt; &lt;input type="reset" value="clear" class="button"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/form&gt;
&lt;/table&gt;
&lt;?
  if ((!$_GET[act]||!$_GET[file])&amp;&amp;$_GET[act]!="delall")
  {
 	 $opendir = @opendir($dir_store);

 	 while ($readdir = @readdir($opendir))
 	 {
    if ($readdir&lt;&gt;"." &amp;&amp; $readdir&lt;&gt;".." &amp;&amp; $readdir != "index.html")
    {
   	 $filearr[] = $readdir;
    }
    $sort=array();
    for($i=1;$i&lt;=count($filearr);$i++)
    {
   	 $key = sizeof($filearr)-$i;
   	 $file = $filearr[$key];

   	 $sort[$i]=$file;
    }
    asort($sort);
 	 }
?&gt;
&lt;br&gt;
&lt;table width="560" cellspacing="0" cellpadding="0" border="0" class="table_decoration" style="padding-left:5px"&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;b&gt;admin tools:&lt;/b&gt;
&lt;? 
	if ($file_del_allow != 1 &amp;&amp; $auth_ReqPass != 1)
	{
  echo"&lt;i&gt;none&lt;/i&gt;";
	}

	if ($file_del_allow == 1 &amp;&amp; $file_list_allow == 1 &amp;&amp; (count($filearr) &gt;= 1)) 
	{ 
  echo"&lt;a href=\"javascript:;\" onClick=\"cf=confirm('Are you sure you want to delete ALL FILES?');if (cf)window.location='?act=delall'; return false;\" style=\"font-size: 9px;\"&gt;&lt;delete all files&gt;&lt;/a&gt;";
	}

	if ($auth_ReqPass == 1) 
	{ 
  echo" &lt;a href=\"$_SERVER[PHP_SELF]?logout=1\" style=\"font-size: 9px;\"&gt;&lt;log-out&gt;&lt;a&gt;";
	}
?&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;?	
 	 if ($file_list_allow == 1 &amp;&amp; (count($filearr) &gt;= 1)) 
 	 {
?&gt;
&lt;table width="560" cellspacing="0" cellpadding="0" border="0" class="table_decoration" style="padding-left:6px"&gt;
  &lt;tr bgcolor="#DBDBDB"&gt;
    &lt;td align="left" width="46%"&gt;FILE NAME&lt;/td&gt;
    &lt;td align="center" width="12%"&gt;FILE TYPE&lt;/td&gt;
    &lt;td align="center" width="12%"&gt;FILE SIZE&lt;/td&gt;
    &lt;td align="center" width="30%"&gt;FUNCTIONS&lt;/td&gt;
  &lt;/tr&gt;
&lt;?
    for($i=1;$i&lt;=count($sort);$i++)
    {
   	 list($key,$value)=each($sort);

   	 if ($value)
   	 {
      $value_en = base64_encode($value);
      $value_view=$value;
      
     	 if (strlen($value) &gt;= 48) 
     	 { 
        $value_view = substr($value_view, 0, 45) . '...';
     	 }
?&gt;
&lt;tr&gt;
    &lt;td width="30%"&gt;&lt;?="&lt;a href=\"?act=view&amp;file=$value_en\"&gt;$value_view&lt;/a&gt;"?&gt;&lt;/td&gt;
    &lt;td align="center" width="5%"&gt;&lt;? echo strtoupper(getlast($value)); ?&gt;&lt;/td&gt;
    &lt;td align="center" width="5%"&gt;&lt;?

   	 $value_full = $dir_store."/".$value;
   	 $file_size = filesize($value_full);
  
  if ($file_size &gt;= 1048576) 
  {
 	 $show_filesize = number_format(($file_size / 1048576),2) . " MB";
  } 
  elseif ($file_size &gt;= 1024) 
  {
 	 $show_filesize = number_format(($file_size / 1024),2) . " KB";
  } 
  elseif ($file_size &gt;= 0) 
  {
 	 $show_filesize = $file_size . " bytes";
  } 
  else 
  {
 	 $show_filesize = "0 bytes";
  }

  echo "$show_filesize";
  
?&gt;&lt;/td&gt;
    &lt;td align="center" width="5%"&gt;&lt;?="&lt;a title=\"View File\" href=\"?act=view&amp;file=$value_en\"&gt;&lt;view&gt;&lt;/a&gt;"?&gt; | 
&lt;?
	if ($file_del_allow == 1) 
	{ 
  echo"&lt;a title=\"Download file\" href=\"?act=dl&amp;file=$value_en\"&gt;&lt;dl&gt;&lt;/a&gt;";
  } 
	else 
	{ 
  echo"&lt;a title=\"Download file\" href=\"?act=dl&amp;file=$value_en\"&gt;&lt;download&gt;&lt;/a&gt;"; 
	} 

	if ($file_del_allow == 1) 
	{ 
  echo" | &lt;a title=\"Delete file\" href=\"javascript:;\" onClick=\"cf=confirm('Are you sure you want to delete this file?');if (cf)window.location='?act=del&amp;file=$value_en'; return false;\"&gt;&lt;delete&gt;&lt;/a&gt;";
	} 
	else 
	{ 
  echo" "; 
	} 
?&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;?
    }
    else
    {
   	 echo"&lt;br&gt;";
    }
    }
?&gt;
&lt;/table&gt;&lt;/center&gt;
&lt;?
 	 }
  }
  elseif (($_GET[act]=="view")&amp;&amp;$_GET[file])
  {
 	 $value_de = base64_decode($_GET[file]);
 	 echo"&lt;script language=\"javascript\"&gt;\nViewPopup = window.open(\"$dir_store/$value_de"fum_viewfile\", \"toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,location=no,width=640,height=480\")\nViewPopup.document.bgColor=\"#F7F7F7\"\nViewPopup.document.close()\n</script>;";
 	 echo"&lt;br&gt;&lt;img src=\"$dir_img/info.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;file opened!&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If the file did not display, you must &lt;b&gt;disable&lt;/b&gt; your popup manager, or enable javascript in your browser.";
  }
  elseif (($_GET[act]=="del")&amp;&amp;$_GET[file])
  {
 	 $value_de = base64_decode($_GET[file]);
 	 @unlink($dir_store."/$value_de");
 	 echo"&lt;br&gt;&lt;img src=\"$dir_img/info.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;file has been deleted!&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
  }
  if ($_GET[act]=="delall")
  {
 	 $handle = opendir($dir_store);
 	 while($file=readdir($handle))
 	 if (($file != ".")&amp;&amp;($file != ".."))
 	 @unlink($dir_store."/".$file);
 	 closedir($handle);

 	 echo"&lt;br&gt;&lt;img src=\"$dir_img/info.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;all files have been deleted!&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
  }

	}
	else
	{
  echo"&lt;br&gt;&lt;br&gt;";
  $uploadpath=$dir_store."/";
  $source=$_FILES[fileupload][tmp_name];
  $fileupload_name=$_FILES[fileupload][name];
  $weight=$_FILES[fileupload][size];

  for($i=0;$i&lt;count($file_ext_allow);$i++)
  {
 	 if (getlast($fileupload_name)!=$file_ext_allow[$i])
    $test.="~~";
  }
  $exp=explode("~~",$test);

  if (count($exp)==(count($file_ext_allow)+1))
  {
 	 echo"&lt;br&gt;&lt;img src=\"$dir_img/error.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;ERROR: your file type is not allowed (".getlast($fileupload_name).")&lt;/font&gt;, or you didn't specify a file to upload.&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
  }
  else
  {

 	 if ($weight&gt;$file_size_ind)
 	 {
    echo"&lt;br&gt;&lt;img src=\"$dir_img/error.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;ERROR: please get the file size less than ".$file_size_ind." BYTES  (".round(($file_size_ind/1024),2)." KB)&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
 	 }
 	 else
 	 {

    foreach($_FILES[fileupload] as $key=&gt;$value)
    {
   	 echo"&lt;font color=\"#3399FF\"&gt;$key&lt;/font&gt; : $value &lt;br&gt;";
    }

    echo "&lt;br&gt;";

    $dest = ''; 

    if (($source != 'none') &amp;&amp; ($source != '' ))
    {
   	 $dest=$uploadpath.$fileupload_name;
   	 if ($dest != '')
   	 {
      if (file_exists($uploadpath.$fileupload_name))
      {
     	 echo"&lt;br&gt;&lt;img src=\"$dir_img/error.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;ERROR: that file has already been uploaded before, please choose another file&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
      }
      else
      {
     	 if (copy($source,$dest))
     	 {
        if ($_POST[rename])
        {
       	 $_POST[rename]=replace($_POST[rename]);
       	 $exfile=explode(".",$fileupload_name);
       	 
       	 if (@rename("$dir_store/$fileupload_name","$dir_store/$_POST[rename].".getlast($fileupload_name))) 
       	 {
          echo"&lt;br&gt;&lt;img src=\"$dir_img/info.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;file has been renamed to $_POST[rename].".getlast($fileupload_name)."!&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;";
       	 }
        }
        echo"&lt;br&gt;&lt;img src=\"$dir_img/info.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;file has been uploaded!&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
     	 }
     	 else
     	 {
        echo"&lt;br&gt;&lt;img src=\"$dir_img/error.gif\" width=\"15\" height=\"15\"&gt; &lt;b&gt;&lt;font size=\"2\"&gt;ERROR: cannot upload, please chmod the dir to 777&lt;/font&gt;&lt;/b&gt;&lt;br&gt;?&lt;a href=\"$_SERVER[PHP_SELF]\"&gt;back&lt;/a&gt;";
     	 }
      }
   	 }
    }
 	 }
  }
	}
}

#/# end of main script, start authentication code IF user not logged in IF $auth_ReqPass is enabled

	} 
	else 
	{
  echo("&lt;p&gt;&lt;img src=\"$dir_img/error.gif\" width=\"15\" height=\"15\"&gt; Authentication error&lt;/p&gt;" .
"&lt;p&gt;&lt;a href='$_SERVER[PHP_SELF]?logout=1'&gt;Delete cookies and login again&lt;a&gt;&lt;/p&gt;");
	}
	} 
	else 
	{

	if (!isset($login) || isset($relogin)) {
?&gt;
&lt;font size="3"&gt;&lt;b&gt;&lt;i&gt;&lt;? echo ($title) ? ($title) : ("File Upload Manager"); ?&gt;&lt;/i&gt; - Authentication&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;
&lt;table class="table_auth"&gt;&lt;tr&gt;&lt;td&gt;&lt;center&gt;
Please enter the username and password to enter the restricted area.&lt;br&gt;
You must have cookies enabled in your browser to continue.
&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;form action="&lt;?=$_SERVER[PHP_SELF]?&gt;?login=1" method="POST"&gt;&lt;p&gt;
Username: &lt;input type="text" name="auth_formUser" size="20"&gt;&lt;br&gt;
Password: &lt;input type="password" name="auth_formPass" size="20"&gt;
&lt;p&gt;&lt;input type="submit" name="submit" class="button" value="Log-In"&gt;&lt;/p&gt;
&lt;/form&gt;&lt;/center&gt;
&lt;?
	} 
	elseif (isset($login)) 
	{
  echo("&lt;p&gt;$auth_msg&lt;/p&gt;" . "&lt;p&gt;You'll be redirected in 2 seconds!&lt;/p&gt;");
	}
	}
?&gt;
&lt;/body&gt;
&lt;/html&gt;

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Yeah, I totally get your point, which is possible it could happen. I just hope there is a few people around him who are similar to where if they took over things would run pretty much the same. if not, then yeah, it could start to decline rapidly etc. but I figure something that's been around for a longer period of time with a decent backing, and probably more users than most Linux distro's (which I would 'imagine' Mint is one of the more used Linux desktop distro's by volume of people who use it), is less likely to just disappear. but like you said, nothing is guaranteed. but I do think you are probably right in that Clem is probably the core of what keeps Mint, Mint. I like how it tends to stay pretty much the same with some slight tweaks here and there (but is largely the same) instead of that crap some people go for with change for the sake of change trying to create a overly fancy interface and other unnecessary stuff etc. I also feel Mint keeps a nice balance of things out-of-the-box where it's not too bloated, nor too striped down. p.s. but I see Mint as a better Ubuntu basically. but I get your point like if it was more of a really serious choice of needing a 'safe bet' to use long term, then yeah something like official Ubuntu would be one of the better choices for sure given what you said with it being backed by an actual company which makes it a safer bet than Mint which is smaller and 'could' potentially be more fragile.
    • It’s in development so hopefully it’s improved upon before release.
    • For the 10th iteration they could have bothered with some design changes rather than just carrying over the 9's
    • So this requires hardware to be setup in the area you want to listen to music in? And it requires hardware for each user? So useless for me when I'm out walking my dog? Or when I'm at the gym and want to listen to my podcasts rather than the music the gym is broadcasting? Heck, will it even work in my own home and allow me to walk around from room to room, or even within a room? Yeah, these won't be replacing headphones anytime soon.
  • Recent Achievements

    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
    • One Month Later
      Ian_ earned a badge
      One Month Later
    • Dedicated
      MacDaddyAz earned a badge
      Dedicated
    • Explorer
      cekicen went up a rank
      Explorer
  • Popular Contributors

    1. 1
      +primortal
      504
    2. 2
      ATLien_0
      211
    3. 3
      Michael Scrip
      200
    4. 4
      Xenon
      147
    5. 5
      +FloatingFatMan
      122
  • Tell a friend

    Love Neowin? Tell a friend!