I am trying to uplaod a picture via my artictles system I have in the back end.
I have the db set up as follows
id, date, title, summary, article, image, league, team1, team2
when i upload the pic i want it to resize to 480x285
here is the code i have so far, but cant get anything to input/upload
$UPLOADED_PHOTO ="";
$uploaddir = "./images/news/";
$uploadthumb = "./images/news/thumb/";
$uploadfile = $uploaddir . basename($_FILES['image']['name']);
$uploadthumbfile = $uploadthumb . basename($_FILES['image']['name']);
include('./includes/SimpleImage.php');
if (move_uploaded_file($_FILES['image']['tmp_name'], $uploadfile)) {
$image = new SimpleImage();
$image->load($uploadfile);
$image->resize(480,285);
$image->save($uploadfile);
$UPLOADED_PHOTO = basename($_FILES['image']['name']);
$thumb = new SimpleImage();
$thumb->load($uploadfile);
$thumb->resize(35,25);
$thumb->save($uploadthumbfile);
}else{
$UPLOADED_PHOTO = $_POST['PHOTO'];
}
any help on where to try next is appriciated or if you have another solution I am all game to try it out
thanks in advance