I have used this uploader
<?php
// filename: imatges.php
// first let's set some variables
// make a note of the current working directory relative to root.
$directory_self = str_replace(basename($_SER
VER['PHP_S
ELF']), '', $_SERVER['PHP_SELF']);
// make a note of the location of the upload handler
$uploadHandler = '
http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'upload.processor1.php';
// make a note of the location of the upload handler
$uploadHandlerPT = '
http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'upload.processor2.php';
// set a max file size for the html upload form
$max_file_size = 3000000; // size in bytes
// now echo the html page
?><?php
if (!function_exists("GetSQLV
alueString
")) {
function GetSQLValueString($theValu
e, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_rea
l_escape_s
tring") ? mysql_real_escape_string($
theValue) : mysql_escape_string($theVa
lue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_inici = 13;
$pageNum_inici = 0;
if (isset($_GET['pageNum_inic
i'])) {
$pageNum_inici = $_GET['pageNum_inici'];
}
$startRow_inici = $pageNum_inici * $maxRows_inici;
mysql_select_db($database_
caadmoiane
s, $caadmoianes);
$query_inici = "SELECT nomID, nom, caracter FROM tblAnimals ORDER BY nomID DESC";
$query_limit_inici = sprintf("%s LIMIT %d, %d", $query_inici, $startRow_inici, $maxRows_inici);
$inici = mysql_query($query_limit_i
nici, $caadmoianes) or die(mysql_error());
$row_inici = mysql_fetch_assoc($inici);
if (isset($_GET['totalRows_in
ici'])) {
$totalRows_inici = $_GET['totalRows_inici'];
} else {
$all_inici = mysql_query($query_inici);
$totalRows_inici = mysql_num_rows($all_inici)
;}
$totalPages_inici = ceil($totalRows_inici/$max
Rows_inici
)-1;?>
and the files are uploades on the server but with 640 permission, so the do not display.
How can i cahnge the script.
Start Free Trial