JimM
02-25-2008, 07:37 AM
Having some problems working with variables below.
$max_size2 works fine but $max_size1 doesn't work at all (get a file size error when I try and upload a file). I've printed out $max_size1 and it prints out 600 * 600. Also gave a try at using (int) thinking it might do the trick, but it doesn't work echo's out 600. I could set the parm_val at 360000 but I have to set it up for folks to enter 600 * 600 (as in 600 width x 600 height) as max rather then 360000 for file size.
I'm not sure why $max_size1 doesn't work so if some one wouldn't mind explaining that would be appreciated and is there a solution? (other then going to two fields and multiplying prior to using)
Yes I have some difficult folks I work with and I know that would allow them to upload a file 800x400 all I'm really worried about right now is actual file size but head-shed wants them to be able to enter as 600 * 600. The parm table is a name value pair table and I really don't want to change single size parm into two size parms one for width and one for height at this time, just looking for a quick solution.
define($ParmData[$i]['parm_name'], $ParmData[$i]['parm_val']);
parm_name = imagesize
parm_val = 600 * 600
(both from mysql text fields)
$max_size1 = imagesize;
$max_size2 = 600*600; // This line works fine
<form name="form1" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input name="tmp_filedel" type="hidden" value= "" id="tmp_filedel" />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_size; ?>">
echo (int) (imagesize);
Thanks
Jim
$max_size2 works fine but $max_size1 doesn't work at all (get a file size error when I try and upload a file). I've printed out $max_size1 and it prints out 600 * 600. Also gave a try at using (int) thinking it might do the trick, but it doesn't work echo's out 600. I could set the parm_val at 360000 but I have to set it up for folks to enter 600 * 600 (as in 600 width x 600 height) as max rather then 360000 for file size.
I'm not sure why $max_size1 doesn't work so if some one wouldn't mind explaining that would be appreciated and is there a solution? (other then going to two fields and multiplying prior to using)
Yes I have some difficult folks I work with and I know that would allow them to upload a file 800x400 all I'm really worried about right now is actual file size but head-shed wants them to be able to enter as 600 * 600. The parm table is a name value pair table and I really don't want to change single size parm into two size parms one for width and one for height at this time, just looking for a quick solution.
define($ParmData[$i]['parm_name'], $ParmData[$i]['parm_val']);
parm_name = imagesize
parm_val = 600 * 600
(both from mysql text fields)
$max_size1 = imagesize;
$max_size2 = 600*600; // This line works fine
<form name="form1" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input name="tmp_filedel" type="hidden" value= "" id="tmp_filedel" />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_size; ?>">
echo (int) (imagesize);
Thanks
Jim