need help with a php script

hello the following script i am using to upload pictures to my site can anyone help me make it check if the image exists and if it does tell the user that the picture is already there.

[php]<?php
$uploaddir = ‘./’; //Uploading to same directory as PHP file

$file = basename($_FILES[‘userfile’][‘name’]);

$uploadFile = $file;
$randomNumber = rand(0, 9999999999999);

$newName = $uploadDir . $randomNumber . $uploadFile;

if (is_uploaded_file($_FILES[‘userfile’][‘tmp_name’])) {
echo “Temp file uploaded.”;
} else {
echo “Temp file not uploaded.”;
}

if (move_uploaded_file($_FILES[‘userfile’][‘tmp_name’], $newName)) {

}
?>[/php]

this is nice. i want php coding for first 10 messages one page next will be added, is automatically going to 2nd page. help me … for example the email are display 25 mails next will going to 2nd page…

Sponsor our Newsletter | Privacy Policy | Terms of Service