bobinindia
Members-
Posts
122 -
Joined
-
Last visited
Never
Everything posted by bobinindia
-
I want to be able to drag some text, which has been put in a text field by the user, over an image and then save the drop point so I can then place the on the image and know where it was placed. Can this be done in javascript? I had a look at walterzorn's site but i don't have enough experience to find the drop location in his code. I expect it is in there. Help much appreciated.
-
on the page processing the form you can put $_session['whatever'] = $_POST['whatever']; Then when you went back you could echo $_session['whatever']; Why might you want to do that?? ???
-
i'm using firefox but it needs to work in ie aswell. The original png works in ie6. Thanks for the tip but i think it's my code.
-
I am trying to resize a png that was mage by gd. When i resize it some of the bacground transparency seems to be lost. <?php $src_img = imagecreatefrompng($im); $dst_img = imagecreatetruecolor($dest_x, $dest_y); $tpc = imagecolorallocate($dst_img, 255,255,255); imagecolortransparent($dst_img,$tpc); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_x, $dest_y, $width, $height); $im is the png created by gd earlier.
-
[SOLVED] same file remote and local different results
bobinindia replied to bobinindia's topic in PHP Coding Help
database user didn't have delete permission!! -
I have simple call to a database that is working localyy but not remotely.? <?php include('../../../externals/mysql_connect.php'); $thumb_id = $_GET['thumb_id']; $query = "DELETE FROM image_thumbs WHERE thumb_id = '$thumb_id' LIMIT 1"; $result = mysql_query($query); header('Location: myimages.php'); ?> called by a file that just read the contents of the database creating rows of images with links to delete themselves : $query = "SELECT thumb_id, upload_id, thumb_url FROM image_thumbs WHERE user_id = '$user_id' ORDER BY thumb_id LIMIT 5"; $result = mysql_query($query); if($result){ ?> <h3 align="center">Click on one of your images to put it on a coin.</h3> <table><tr><td> <?php while ($row = mysql_fetch_array($result)) { echo "<a href=\"choosecoin.php?upload_id="; echo $row['upload_id']; echo '"><img src="'; echo $row['thumb_url']; echo '"/></a>'; echo '<br />'; echo "<a href=\"deleteimage.php?thumb_id="; echo $row['thumb_id']; echo '">DELETE</>'; echo '</td><td>'; } ?> Can anyone give me a clue. Locally you click the link and you are back on the same page minus one thumb. Remote nothing. Viewing the source shows the links are correct.
-
Does anyone know of a color picker that doesn't mess up ajax calls to the server? i have tried a couple of the free ones and the included javascript stops some values being sent. I need a very basic color picker that gives a value to a form. ??? ??? Help much appreciated
-
how would the cookie trigger the script?
-
I am uploading images and then resampling them using GD. If someone uploads a 5mb image it takes a while to be resampled. I want the upload script to trigger the resampling script and then complete itself while the resampling is still going on. User doesn't have to wait. Possible??
-
php4 and php5 show different results via phpinfo() if you open the phpini file and do a Find for memory it is the first result Anyway it won't be the problem for 10k images
-
if you upload a large image and try to do some image functions on it you need to change the max amount of memory a script can use in the phpini. Default is 8M. I had to change to 64M to cover my problems.
-
[SOLVED] find out the time that a session was set?
bobinindia replied to bobinindia's topic in PHP Coding Help
Thank you both. That is fine for my needs. -
Is it possible to find out what time a session was set? My intention is to use a different session value depending upon which one was set most recently.
-
<?php $size = getimagesize($yourimage); $uploadx = $size[0]; $uploady = $size[1]; if (($uploadx > 800) || ($uploady > 800)) { //execute your resizing code } else{ //don't } ?>
-
that is not it then. you will have to wait for a better mind than mine.
-
What version of the gd library is shown in phpinfo() GIF wasn't supported earlier i believe.
-
need more info than that. Can you post the code?
-
What was your query?
-
I have this script that merges two images. The really.png was created using a transparent white background. That means that any pixel with 255,255,255 becomes transparent. I wanted to limit it to the edges of the image. I think i am hopeful. When merging in the code below holes apppear where there is were white pixels in really.png. Any way around this? <?php $image = imagecreatefromjpeg($coin_url['template_url']); $insert = imagecreatefrompng("really.png"); $image = image_overlap($image, $insert); function image_overlap($background, $foreground){ $insertWidth = imagesx($foreground); $insertHeight = imagesy($foreground); $imageWidth = imagesx($background); $imageHeight = imagesy($background); $halfx = ($imageWidth-$insertWidth)/2; $halfy = ($imageHeight-$insertHeight)/2; $overlapX = $imageWidth-$insertWidth-$halfx; $overlapY = $imageHeight-$insertHeight-$halfy; imagecolortransparent($foreground,imagecolorat($foreground,0,0)); imagecopymerge($background,$foreground,$overlapX,$overlapY,0,0,$insertWidth,$insertHeight,100); return $background; } imagejpeg($image, 'output.jpg'); ?>
-
Where are you defining your variables? eg $strEmail; Coming from a database is more likely to be <?php echo $row['columnName']; ?> to show the value
-
Can I use mysql_insert_id() to get the id of something but only the mysql_insert_id() of a particular user. I am making the call a bit later using a nother script.
-
I want to limit my mysql insert id request to a particular user as there will be a gap and actually a different script calling it. Any ideas?
-
mail() works sometimes to some email addresses
bobinindia replied to bobinindia's topic in PHP Coding Help
i have used various from addresses. Also left it blank so it goes from the default which ends up being my name as the owner of the computer -
Put ob_start(); at the top of your page. Then header('Location: whereever.php'); on the form processing page. Then ob_flush(); to let it go. Good Luck
-
mail() works sometimes to some email addresses
bobinindia replied to bobinindia's topic in PHP Coding Help
No not junk User registration. <?php $body = "Thank you for registering at the site.\n To activate your account, please click on this link:\n\n"; $body .= "http://localhost:8888/activate.php?x=" . mysql_insert_id()."&y=$a"; mail($_POST['email'], 'Registration Confirmation', $body, 'From: $fromemail'); ?> What is also odd is that the '&y' goes missing from the link i am providing to the user.