Kairu Posted December 19, 2006 Share Posted December 19, 2006 I am trying to create a dynamic image in PHP. I want to be able to input a background image, and at least one overlaying smaller image. I have very limited knowledge in PHP, having only self taught myself a few peices of code.I don't know how to add data to a database through PHP yet, though I have a database set up along with my server. I also do not know how to call the data.Basically what I want to do is be able to call the image by a URL (ex: "http://mainurl.com/imagedir/[image number here].jpeg" I have jpeg set as a php identifyer on my server.(Will edit shortly) Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/ Share on other sites More sharing options...
drifter Posted December 19, 2006 Share Posted December 19, 2006 start with the php manual and learn how to connect to the database - it is all there with examples Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-144592 Share on other sites More sharing options...
Kairu Posted December 19, 2006 Author Share Posted December 19, 2006 Yay for examples! I never could learn with out those. o.0 Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-144600 Share on other sites More sharing options...
Kairu Posted December 21, 2006 Author Share Posted December 21, 2006 Alright.... I have most of it down....One last question, however simple it may be, I cant seem to find the proper way to merge two strings into one variable..... I;ve been looking for an hour now... Mayhaps I just don't know how to search....I was thinking something similar to this? Though $query then becomes the value of 'id'.......$query = 'SELECT * FROM data WHERE id = ' + $_GET['id'];I guess I'll keep looking.Thanks! Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-145610 Share on other sites More sharing options...
Hypnos Posted December 21, 2006 Share Posted December 21, 2006 [quote author=Kairu link=topic=119265.msg489356#msg489356 date=1166669805]I cant seem to find the proper way to merge two strings into one variable..... I;ve been looking for an hour now...[/quote][code=php:0]$shortstringa = "This ";$shortstringb = "is how.";$longstring = $shortstringa . $shortstringb;[/code];[quote author=Kairu link=topic=119265.msg489356#msg489356 date=1166669805]I was thinking something similar to this? Though $query then becomes the value of 'id'.......$query = 'SELECT * FROM data WHERE id = ' + $_GET['id'];[/quote][code=php:0]$query = "SELECT * FROM data WHERE id = " . $_GET['id'];[/code] Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-145613 Share on other sites More sharing options...
Kairu Posted December 21, 2006 Author Share Posted December 21, 2006 Thank you! As I was reading it I remembered it.Topic solved.... for now. Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-145615 Share on other sites More sharing options...
trq Posted December 21, 2006 Share Posted December 21, 2006 I really don't understand what your first question has to do with databases.[quote]I want to be able to input a background image, and at least one overlaying smaller image.[/quote]Take a look at the [url=http://php.net/gd]gd[/url] extension. Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-145616 Share on other sites More sharing options...
trq Posted December 21, 2006 Share Posted December 21, 2006 [quote]Topic solved.... for now.[/quote]Good. Please mark it as so. Bottom left corner. Link to comment https://forums.phpfreaks.com/topic/31251-solved-dynamic-image-calling-database/#findComment-145618 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.