Import images and resize

How can I make a form to import an image to a specific table and then display it in another page?

What id someone imports a huge JPG, and it has lots of resolution, like 300dpi. But since the JPG is only gonna be used to be displayed on the screen and not printed, we only need 72dpi resolution. Is there a way to lower the resolution and resize the JPG?

By using MySql and PHP.

thanks

Leo:hr:

I found a tutorial on uploading images to the database, I copied it and pasted it and doesn’t work. I try to solve the problem, but can’t figure it out. Any help?

GETFILES.php:

<input type=“text” name=“strDesc” size=“20” maxlength=“50”></td>

<tr> <td width=“15%” bgcolor="#FFE3BB">
<p style=“margin-left: 10”>
File Location:</td>
<td width=“85%” bgcolor="#FFE3BB">

<input type=“file” name=“fileUpload” size=“20”>
</td></tr> <tr>
<td width=“33%” bgcolor="#FFE3BB">
<p style=“margin-left: 10”>
 </td>
<td width=“67%” bgcolor="#FFE3BB">
<input type=“submit” value=“Upload this file” name=“cmdSubmit”>
</td></tr> </form>

GRABFILE.php:

<?php

global $strDesc;
global $fileUpload;
global $fileUpload_name;
global $fileUpload_size;
global $fileUpload_type;

if(empty($strDesc) || $fileUpload == “none”)

die(“You must enter both a description and file”);

I can’t get past that. I ALWAYS gives me this error message.