Here is sample function that creates thumbnail of source JPEG file. Thumbnail wil be in square form [with and height are the same], and original image cropped to fit in.
Parameters:
$p_thumb_file - name of the file [including path] where thumb should be saved to
$p_photo_file - nam of the source JPEG file [including path] thatthumbnail should be created of
$p_max_size - with and height [they will be the same] in pixels for thumbnail image
________số 8
function photoCreateCropThumb [$p_thumb_file, $p_photo_file, $p_max_size, $p_quality = 75] {
display image
Here in your form and text