I’m using the remote method used in jQuery Validation.
I’m referring to a PHP file shown below:
<?php
$title = mysql_real_escape_string($right_form_url);
$size = getimagesize($title);
$size[3] = $width;
if ($width > 1000) {
$output = false;
} else {
$output = true;
}
echo json_encode($output);
?>
It never returns anything no matter how I put the $output variables. I’ve tried other PHP files that I know work in validation, so I think it has something to do with my IF statement, although I’m fairly certain the width is being declared correctly.
You code is invalid. You are setting
$size[3] = $width;which sould be$width = $size[0];Two mistakes:
1. You were setting
$size[3]to$width, but should set$widthto$size[3]2.
$size[3]containts string valu t use with html image tag(height=”yyy” width=”xxx”),$size[0]conatins numeric value of width