
cmgmyr
-
Posts
1,278 -
Joined
-
Last visited
Never
Posts posted by cmgmyr
-
-
When it comes time for paycheck it is our money...unless it is her paycheck then it is her money.
Her: "What's mine is mine and what's yours is mine" ... not the other way around though
-
it would be for the user
so when user 1 enters zip 13903 and reloads the page 5 times...it only enters it once
now user 2 goes and enters 13903...now since it it s different user...it gets inserted
-
if you have a user id in the table that is associated with the zip before you do the insert you can see if there are any records where the user and the zip are the same as that wants to do the insert.
So:
1. Do select statement
2. count rows
3.
if($count == 0){
//Insert statement
}
And you are done. So they can reload the page as much as they want and it will only insert once
-
1. (and only one) when you think you have learned something about them they change...and you are wrong again.
-
yeah i actually did that last night and thought it was pretty funny
-
haha nice
-
-
I just made a new thumb code with a few less things and it worked...o well
-
re-uploaded a few images to a smaller file size...still nothing
-
thanks for the help and thank about the site
-
hmm...i'll resize them in photoshop and re-upload them with a lower file size and see if it works...
-
I had it out before and that's what froze it up
-
yes i already change it to _get and it still didn't work...I copied the whole code over again and it still didn't work
-
i just updated it...still didn't work
-
-
hmmm, the gd library looks like it's working...any other ideas?
-
...yes
It's something like this: <img src="thumb.php?src=images/cms_images/<?php echo $image ?>" />
The script works in php4 and not php5
-
if you are using a database you can do something like:
SELECT max(price) as highest, min(price) as lowest FROM table
-
Hey Guys,
This is my script that I use for image resizing. I have a client on php5 and now i'm just getting those little red x's. He does have GD library and it is running. What do I need to change in order for it to work?
<?php header("Content-type: image/jpeg"); $source = imagecreatefromjpeg($src); $orig_w=imagesx($source); $orig_h=imagesy($source); //See if there is a different height and width if(!$_GET['wmax']){ $wmax=100; } if(!$_GET['hmax']){ $hmax=100; } $quality=90; $bgcol=000000; if ($orig_w>$wmax || $orig_h>$hmax) { $thumb_w=$wmax; $thumb_h=$hmax; if ($thumb_w/$orig_w*$orig_h>$thumb_h) $thumb_w=round($thumb_h*$orig_w/$orig_h); else $thumb_h=round($thumb_w*$orig_h/$orig_w); } else { $thumb_w=$orig_w; $thumb_h=$orig_h; } if (!@$bgcol) { $thumb=imagecreatetruecolor($thumb_w,$thumb_h); imagecopyresampled($thumb,$source, 0,0,0,0,$thumb_w,$thumb_h,$orig_w,$orig_h); } else { $thumb=imagecreatetruecolor($wmax,$hmax); imagefilledrectangle($thumb,0,0,$wmax-1,$hmax-1,intval($bgcol,16)); imagecopyresampled($thumb,$source, round(($wmax-$thumb_w)/2),round(($hmax-$thumb_h)/2), 0,0,$thumb_w,$thumb_h,$orig_w,$orig_h); } if (!@$quality) $quality=90; imagejpeg($thumb,"",$quality); imagedestroy($thumb); ?>
Thanks,
-Chris
-
Yes, for internal stuff like that you need to use padding...not margin (like lando said)
-
Hey guys, thanks for the help. What I did is just at another statement for php5 ... to do nothing. When I uploaded it everything worked great. Here it is:
<?php $phpver = phpversion(); if ($phpver < '4.1.0') { $_GET = $HTTP_GET_VARS; $_POST = $HTTP_POST_VARS; $_SERVER = $HTTP_SERVER_VARS; } if($phpver > '5.0'){ //Do nothing } else if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) { if (extension_loaded('zlib')) { ob_end_clean(); ob_start('ob_gzhandler'); } } else if ($phpver > '4.0') { if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { if (extension_loaded('zlib')) { $do_gzip_compress = TRUE; ob_start(array('ob_gzhandler',5)); ob_implicit_flush(0); } } } $phpver = explode(".", $phpver); $phpver = "$phpver[0]$phpver[1]"; if ($phpver >= 41) { $PHP_SELF = $_SERVER['PHP_SELF']; } if (!ini_get("register_globals")) { import_request_variables('GPC'); } ?>
Is this right? (it works
)
-
*bump* anyone?
-
Ok here is what I have right now:
<?php $phpver = phpversion(); if ($phpver < '4.1.0') { $_GET = $HTTP_GET_VARS; $_POST = $HTTP_POST_VARS; $_SERVER = $HTTP_SERVER_VARS; } if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) { if (extension_loaded('zlib')) { ob_end_clean(); ob_start('ob_gzhandler'); } } else if ($phpver > '4.0') { if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) { if (extension_loaded('zlib')) { $do_gzip_compress = TRUE; ob_start(array('ob_gzhandler',5)); ob_implicit_flush(0); } } } $phpver = explode(".", $phpver); $phpver = "$phpver[0]$phpver[1]"; if ($phpver >= 41) { $PHP_SELF = $_SERVER['PHP_SELF']; } if (!ini_get("register_globals")) { import_request_variables('GPC'); } ?>
Right now I have a client with php 5.1.6 and currently this script makes it freeze up. How can I make this compatable with PHP 5?
Thanks,
-Chris
-
*bump* anyone?
Need Help
in PHP Coding Help
Posted
you have to offset and limit your query.
Also what does this have to do with OOP?