Hi again fellers
I managed to sort out the issues with the folder,
Final hurdle is this:
Code: function ResizeJPEG($filename, $width, $height){
list($width_orig, $height_orig) = getimagesize($filename);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig) {
$width = $height*$ratio_orig;
} else {
$height = $width/$ratio_orig;
}
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename); //JPEG
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
return imagejpeg($image_p, $filename, 100); //JPEG
}
Code: ResizeJPEG($target, 500, 500);
If i upload a file that is larger than 500 x 500 then sure that resizes it down too 500
But if i upload a file that is smaller than 500 x 500 then it upsizes the image too 500
How can i leave images smaller than 500 alone?
Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related coding to the handlers option is found on the handlers.php page which includes a list of handlers with a
Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on this side:Code: <html> <head>
Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages. The form is submitted using the POST method. Here is a code snippet:Code: <form action =
Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does anyone know of any examples or tutorails on how I can achieve this, as I have tried searching without
retrieving policy name inside the function called by this particular policy
Hi there,
Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this:
function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the function just to see what the output is, and it sems to work. However, upon returning the function
Using Windows message as a Handle
Hi,
How to validate from 2 possible answers
Hi I hope somebody can help me with what will probably be really simple, I'm pulling my hair trying to get my head round it.I've got a contact form and I would like to add to it a couple of simple
Extracting Long text from message class with parameters
Hi,