converting DURING upload before saving on server png/gif to jpg
So I have an image upload script. It uploads the image and saves it to the space on the server. What I can't seem to get my head around is say, when the user uploads a .png, by the time it saves on my server i want it to be a jpg. Can anyone help with this, and please don't just direct me to another question as I havent had anything work yet. Here is an example of my code. $name = addslashes($_FILES['image']['name']); $ext = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION); $size = $_FILES['image']['size']; $temp = $_FILES ['image']['tmp_name']; $error = $_FILES ['image']['error']; if (