The point of this script (which is from this site, thanks a lot!) is to upload an image to a directory, call a function to thumbnail it, then upload the thumbnail and the image into a mysql database. Unfortunetely, I can't get past the uploading part. Here is the code I have for the file that uploads the image:

PHP Code:
<?php
session_start
();
header("Cache-control: private");
include(
"header.php");
include(
"thumbnailer.php");

if (
$_SESSION['status'] != && $_SESSION['status'] != 2) {
echo
"<div align=\"center\"><strong>You are not permitted to access this area.</strong></div>";
} else {

include(
"config.php");
$connection mysql_connect"localhost"$db_user$db_pass );
$db mysql_select_db$db_db$connection );

// Do this process if user has browse the file and click the submit button
if ($_FILES) {
  
$image_types = Array ("image/bmp",
                        
"image/jpeg",
                        
"image/pjpeg",
                        
"image/gif",
                        
"image/x-png");
  if (
is_uploaded_file($userfile)) {
  
move_uploaded_file($userfile"images/");
  
$basefile "images/" $userfile;
  }
  
$userfile  addslashes (fread (fopen ($_FILES["userfile"]["tmp_name"], "r"), filesize ($_FILES["userfile"]["tmp_name"])));
  
makeThumb($basefile);
  
$file_name $_FILES["userfile"]["name"];
  
$file_size $_FILES["userfile"]["size"];
  
$file_type $_FILES["userfile"]["type"];
  
$category $_POST['category'];
  
$description $_POST['description'];
  
  if (
in_array (strtolower ($file_type), $image_types)) {
    
$sql "INSERT INTO images (image_type, image, image_size, image_name, image_date, category, description, image_thumb) ";
    
$sql.= "VALUES (";
    
$sql.= "'{$file_type}', '{$userfile}', '{$file_size}', '{$file_name}', NOW(), '{$category}', '{$description}', '{$thumb}')";
    @
mysql_query ($sql);
    
ImageDestroy($thumb);
    echo
"Done.";
    exit();
  }
}

// Do this process of user has click a file name to view or remove
if ($_GET) {
  
$iid $_GET["iid"];
  
$act $_GET["act"];
  switch (
$act) {
    case 
rem:
      
$sql "DELETE FROM images WHERE image_id=$iid";
      @
mysql_query ($sql);

      exit();
      break;
    default:
      print 
"<img src=\"image.php?iid=$iid\">";
      break;
  }
}

?>


<form method="post" enctype="multipart/form-data">
  <p>&nbsp;</p>
  <table width="451" border="1" align="center" cellpadding="0">
    <tr>
      <td width="125"><strong>Select Image File:</strong></td>
      <td width="314"><input type="file" name="userfile"  size="40"></td>
    </tr>
    <tr>
      <td height="21"><strong>Select Category: </strong></td>
      <td><select name="category" id="category">
        <option value="friends">Friends</option>
        <option value="family">Family</option>
        <option value="us">Us</option>
      </select></td>
    </tr>
    <tr>
      <td><strong>Description:</strong></td>
      <td><input name="description" type="text" id="description" size="53" maxlength="100"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input name="submit" type="submit" id="submit2" value="Submit"></td>
    </tr>
  </table>
</form>
<?php
  $sql 
"SELECT * FROM images ORDER BY image_date DESC";
  
$result mysql_query ($sql);
  if (
mysql_num_rows($result)>0) {
    while (
$row mysql_fetch_array($resultMYSQL_ASSOC)) {
      
$i++;
      
$str .= $i.". ";
      
$str .= "<a href=\"gallery.php?iid=".$row["image_id"]."\">".$row["image_name"]."</a> ";
      
$str .= "[".$row["image_date"]."] ";
      
$str .= "[".$row["image_size"]."] ";
      
$str .= "[<a href=\"gallery.php?act=rem&iid=".$row["image_id"]."\">Remove</a>]<br>";
    }
    print 
$str;
  }
}
  include(
"footer.php");
?>
What kind of path should I be using on lines 23 and 24? I'm executing the script from within the "admin" directory.