PHP problem...?

 
Post new topic   Reply to topic    Web Design Forum :: PHP Development
View previous topic :: View next topic  
Author Message
preet



Joined: 04 Oct 2007
Posts: 2

PostPosted: Mon Oct 08, 2007 9:14 am    Post subject: PHP problem...? Reply with quote
I am using PHP to make a Full-Size Image display page. I'm not using any fancy PHP call up script because everything I have is integrated with SQL. I'm using SQL to just simply execute nothing but the URL of the image that is requested by using WHERE id= and then a GET command for "id" in the address bar.

Thus, in the end, how this would work is the script executes the URL of the image, and then I have on a separate php page, the tags for <img src="<?php include ("something.php"); ?>"> That would work right? And be since the something.php only executes the image URL?

I get the error that there was an unexpected {curly bracket in the area of my while ($row) fetch blah stuff is. I have discussed my PHP problem with a my friend who is working PHP programmer in a reputed web site design company . He said there must be a problem with syntax. I know the syntax is right, so no need to include that code. Anyone know what the problem is there?
Back to top
View user's profile Send private message
kkeim



Joined: 03 Feb 2008
Posts: 6

PostPosted: Thu Feb 07, 2008 1:16 pm    Post subject: Reply with quote
You cannot include the image this way. include function directly sends the code to the output buffer.

It should be src="something.php" and add header in something.php depending upon your image type.
_________________
From WebsiteIngredients.com Team

www.websiteingredients.com : place where best of web resides.
Back to top
View user's profile Send private message
adaseral



Joined: 02 Jun 2006
Posts: 5

PostPosted: Fri Aug 20, 2010 8:46 am    Post subject: Reply with quote
This function can be used

<img src="<? variable; ?>">

and store image in variable
_________________
Web Design
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Web Design Forum :: PHP Development All times are GMT
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpbb