Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2006
    Thanked 0 Times in 0 Posts

    Can you check my short code snippet please?


    I want users to be able to create an image from either an image template on my site (labelled $im) or by entering in a url.I think i've worked it out, but my php is not very good so can you tell me where i'm going wrong with it please?

    I realised that the

    PHP Code:
    $im imagecreatefromjpeg($im
    doesn't have to point to a variable, it can also point to a url i.e

    PHP Code:
    $im imagecreatefromjpeg(http://www.address.com/image.jpeg) 
    YEY- This works, however when i try adding a tick box to the html form that the user checks when they want to specify an address i get the url coming up instead of the image.

    This is the code that i have put in the php file...

    PHP Code:
    if($link== 'y'){
    $im imagecreatefromjpeg($useraddress);
    $im imagecreatefromjpeg($im);

    The checkbox is called link and the textbox for the address is called useraddress.

    If you want to see for yourself what its doing go to www.gamesigs.co.uk/test.php

    Cheers and i hope to hear from you soon.
    Visit Gamesigs.co.ukto create your own personalised signature using our generator,

  2. #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Thanked 637 Times in 625 Posts
    Do you have register_globals turned on? $useraddress won't be set if you don't. You shouldn't be relying on register_globals in any case-- just use $_POST['useraddress'] instead.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts