Jump to content

[SOLVED] Dynamic image calling database.


Kairu

Recommended Posts

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

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!
[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]

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.