Hi
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); }else{ $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.
|