Jump to content

dig412

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dig412's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i'm using this query to retreive scores for a flash game: [code]SELECT * FROM fennec_game ORDER BY score DESC;[/code] for some reason, a score of 9 will appear above a score of 89, as single digits are orderd incorectly. is there a way to fix this? thanks in advance
  2. I originaly used post, but it causes problems when saving the image in firefox. the form doesn't need to be secure, as it just passes information to a gd script.
  3. i dont know much about .htaccess, but a blaggers way to do it would be to make a folder with the same name as the file. then put the file in and call it index.php. this will be fine with 1 or 2 file scripts, but anything more complex and its getting a bit tricky.
  4. I'm submitting a form using GET, but for some reason, when i submit, the value of the submit button is added on as well. i've never noticed this before, any ideas? [code] <form action="index.php" method="GET"> <input type="hidden" name="mode" value="img" /> <input type="text" name="usertxt" /><br> Shouting: <input type="radio" name="image" value="shout" checked="checked"/><br> Newsreader: <input type="radio" name="image" value="news" /><br> <input type="submit" value="Say It!" /> </form> [/code] produces: index.php?mode=img&usertxt=[whatever]&image=news&Submit=Say+It!
  5. just take out the <BR> or the code that generates it.
  6. I'm using this code to make a simple speech bubble generator, and so far its working fine. However, if you choose 'save image' in firefox, it will save the blank image without the added text. It saves properly in ie, so i dont know exactly whats wrong. [code]if (isset($_GET['mode'])){ if ($_GET['mode'] == "img") { header ("Content-type: image/jpeg"); header('Content-transfer-encoding: binary'); putenv('GDFONTPATH=' . realpath('.')); $image = $_POST['image']; if ($image == "shout") { $img_handle = @ImageCreateFromJPEG ("domotalk.jpg"); } else{ $img_handle = @ImageCreateFromJPEG ("domonews.jpg"); } $txt_color = ImageColorAllocate ($img_handle, 0, 0, 0); $text = $_POST['usertxt']; if ($image == "shout") { $newtext = wordwrap($text, 17, "\n", 1); } else { $newtext = wordwrap($text, 20, "\n", 1); } $font = 'arial'; if ($image == "shout") { ImageTTFText ($img_handle, 14, 0, 207, 62, $txt_color, $font,"$newtext"); } else { ImageTTFText ($img_handle, 14, 0, 280, 75, $txt_color, $font,"$newtext"); } ImageJPEG ($img_handle,'',95); } } [/code] I'm assuming that it's got something to do with the headers. Any ideas? EDIT: It seems it doesn;t work with IE anymore. hmm
×
×
  • 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.