Jump to content

sammysmee

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sammysmee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. works brilliantly, thankyou very much!! much appreciated!
  2. hmm, that modification stopped the script sending to the database
  3. sorry ive just noticed ive pasted the completley wrong code! ive been trying a few samples, sorry! the login script ive been given uses MD5 to sent a "forgotten password", i need this for the registration script, at the moment the script is sending the passwords to the db without encryption. the correct code for register is: <?php include "global.php"; layout(); echo " <form id=\"form1\" name=\"form1\" method=\"post\" action=\"\"> <p> Username: <input type=\"text\" name=\"username\"/> </p> <p> Password: <input name=\"password\" type=\"password\"/> </p> <p> Email: <input type=\"text\" name=\"email\" /> </p> <p> <input type=\"submit\" name=\"go\" value=\"Register!\" /> </p> </form> "; if (isset($_POST["go"])) { extract($_POST); $query = mysql_query("INSERT INTO user SET userid='',username='$username',password='$password',email='$email'"); } footer(); ?>
  4. hi there, i would like to add password encryption to my database but i don't know how to get it working. I tried a few things but nothing seems to work, i'm afraid to admit i'm a PHP noob, it has been frustrating me hour hours! here is the code: <?php include "global.php"; layout(); echo " <form action="register.php" method="post"> Pick a Username: <input type="text" name="username" size="20"><br> Pick a Password: <input type="password" name="password" size="20"><br> Email Address: <input type="text" name="email" size="20"><br> Real Name: <input type="text" name="realname" size="20"><br> Location: <input type="text" name="location" size="20"><br> <input type="submit" value="Sign Up"> </form> "; if (isset($_POST["go"])) { extract($_POST); $query = mysql_query("INSERT INTO user SET userid='',username='$username',password='$password',email='$email'"); } footer(); ?> if anyone would tell me where to put it and reccomend any other securities i could add, i would be very grateful! sammy
  5. sorry to bump, but its been months and i still need the help! thanks - sammy
  6. Hi there, i currently have a perfect gd code running on my stock art site, i have it so it renders the png with a watermark across it, however due to it being a png it puts a black background behind the thumbnail and the resized image, i would like to make this white, but i do not know GD (i was given the gd code) could any one help? I tried solving it but with no luck. the code is below.. //$filename should be a JPG and $watermark a PNG-24 with alpha transparency. $quality is 1-100 JPG quality on output. function watermark($srcfilename, $newname, $watermark, $quality) { $imageInfo = getimagesize($srcfilename); $width = $imageInfo[0]; $height = $imageInfo[1]; $logoinfo = getimagesize($watermark); $logowidth = $logoinfo[0]; $logoheight = $logoinfo[1]; $horizextra =$width - $logowidth; $vertextra =$height - $logoheight; $horizmargin = round($horizextra / 2); $vertmargin = round($vertextra / 2); $photoImage = ImageCreateFromPNG($srcfilename); ImageAlphaBlending($photoImage, true); $logoImage = ImageCreateFromPNG($watermark); $logoW = ImageSX($logoImage); $logoH = ImageSY($logoImage); ImageCopy($photoImage, $logoImage, $horizmargin, $vertmargin, 0, 0, $logoW, $logoH); //ImageJPEG($photoImage); // output to browser ImageJPEG($photoImage,$newname, $quality); ImageDestroy($photoImage); ImageDestroy($logoImage); } function createthumb($name,$filename,$new_w,$new_h) { $system=explode(".",$name); if (preg_match("/jpg|jpeg/",$system[1])){$src_img=imagecreatefromjpeg($name);} if (preg_match("/png/",$system[1])){$src_img=imagecreatefrompng($name);} if (preg_match("/gif/",$system[1])){$src_img=imagecreatefromgif($name);} if (preg_match("/bmp/",$system[1])){$src_img=imagecreatefromwbmp($name);} $old_x=imageSX($src_img); $old_y=imageSY($src_img); if ($old_x > $old_y) { $thumb_w=$new_w; //$thumb_h=$old_y*($new_h/$old_x); $thumb_h=$new_h; } if ($old_x < $old_y) { //$thumb_w=$old_x*($new_w/$old_y); $thumb_w=$new_w; $thumb_h=$new_h; } if ($old_x == $old_y) { $thumb_w=$new_w; $thumb_h=$new_h; } $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); if (preg_match("/png/",$system[1])) { imagepng($dst_img,$filename); } else if (preg_match("/jpg|jpeg/",$system[1])) { imagejpeg($dst_img,$filename); } else if (preg_match("/bmp/",$system[1])) { imagewbmp($dst_img,$filename); } else { imagegif($dst_img,$filename); } imagedestroy($dst_img); imagedestroy($src_img); }
  7. Dont worry! We've cracked it basically we resized the pngs (indexed ones) so they were 200 wide then we added image resize and had it autoresize to 120 wide this iliminates the 'sharp' edges!
  8. the pngs are jagged the only way around this is to resize the file which comes out blurry ><
  9. if you could show me what i'm meant to do by tweaking my code, that'd be very helpful! ^^
  10. that may be true but i wouldnt know where to put it/what to change ^^ (im a noob!)
  11. Hello there Me and my coder have been trying to fix this for at least 6 hours and our heads are ready to explode! we really need your help! basically, we are making 'custom' avatars for our RPG game, we have managed to make a code to layer PNGS using GD however we cannot manage 24-bit PNG transparency! We got as far as managing to get the 'bottom' layer Transparent, but thats as far as we can get. We've tried hundreds of codes and scrawled the net, with no avail! here is the code: and the result: http://sammystudio.co.uk/majv1/avatar3.php - somebody help! hehe! thanks for reading!!!
  12. ok where do i start. i am completly sdumb when it comes to anythign like this ive never done it before. i just just download MYSQL and it is installed. i now have a program running. however this is where im stuck i have no cluw what to do my aim is to install something that requires a datebase username and password. please could someone help me the manuals are ar far too complicated and i need someone who can tell me in simple english lol i know im dumb but im only little lol! HEEELP MEEEE
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.