Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 47160 | Replies: 16
![]() |
Are you sure you really want to do that? I think that for most applications you will be better off storing the image in a folder on your webserver and adding the location/details of the image to the database.
•
•
Join Date: Jan 2006
Posts: 29
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
Originally Posted by DanceInstructor
Are you sure you really want to do that? I think that for most applications you will be better off storing the image in a folder on your webserver and adding the location/details of the image to the database.
Okey, thinks for your advice, but how can I do that, are there any configuration to be done in the server, could you give me a script for this?
Thank you.
Roland
I haven't tried this myself, but there is a brief tutorial here:
http://hockinson.com/index.php?s=37
Good luck.
http://hockinson.com/index.php?s=37
Good luck.
•
•
Join Date: Apr 2004
Location: Virginia Beach
Posts: 113
Reputation:
Rep Power: 5
Solved Threads: 2
•
•
Join Date: Mar 2006
Location: Florence Ky
Posts: 31
Reputation:
Rep Power: 3
Solved Threads: 3
I will agree that it is rare that you would want to do that outside of a data hosting site like that. Otherwise you can just store the url and output it however you want by calling it with php and tellting using the following code
echo '<img src ="'.$imgurl.'">';
That will output it as the image itself. Naturally you can add the formating to it. But I find that method INCREADIBY effective.
echo '<img src ="'.$imgurl.'">';
That will output it as the image itself. Naturally you can add the formating to it. But I find that method INCREADIBY effective.
http://img.photobucket.com/albums/v6.../dgstudios.jpg
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
•
•
Join Date: Mar 2006
Location: Florence Ky
Posts: 31
Reputation:
Rep Power: 3
Solved Threads: 3
I store things in it using full text
I store it using a variable like so
$value = '<b><center><fontcolor= "blue">This is the formated text</b></center></font>';
$query = "instert into table ('$value')";
mysql_query($query);
I use formated text alot for my forum.
Also it is possible to simply output it the text using concatenated strings with php. Its up to what you're using the text for.
I store it using a variable like so
$value = '<b><center><fontcolor= "blue">This is the formated text</b></center></font>';
$query = "instert into table ('$value')";
mysql_query($query);
I use formated text alot for my forum.
Also it is possible to simply output it the text using concatenated strings with php. Its up to what you're using the text for.
http://img.photobucket.com/albums/v6.../dgstudios.jpg
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
When all that is becomes one. That is the anomoly. That is... Death's Gate Studios (c) 2005
•
•
Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 225
Reputation:
Rep Power: 3
Solved Threads: 22
•
•
•
•
I store things in it using full text
I store it using a variable like so
$value = '<b><center><fontcolor= "blue">This is the formated text</b></center></font>';
$query = "instert into table ('$value')";
mysql_query($query);
I use formated text alot for my forum.
Also it is possible to simply output it the text using concatenated strings with php. Its up to what you're using the text for.
This is one way, however you will be unable to use this value in another place with another color settings. Instead I would recommend you store plain text data into your database and use some simple CSS rules where you need the text to be in different color.
You can make the following:
1. Store value $formatted_text = This is the text to be returned in red.
2. Retrieve it in your php page like this: [php]echo '<p style="color: red">'.$formatted_text.'</p>'; [/php]and you will get it right

if you want you can use a class for this statement and add a lot of other formatting stored in an external file.
In case however you have some text and you want to store only one word with formatting, you better do the following:
[php] $formatted_text = 'This is the text with <span style="color: red;">red words</span> in the middle.';[/php]
When you retrieve it in your php like this:
[php]echo '<p>'.$formatted_text.'</p>';[/php]
you will have a paragraph with "red words" being the only red words inside the text.
If you are not familiar with CSS go to http://www.w3schools.com/ and learn it for free from the W3C. Good luck!
Last edited by Rhyan : Oct 19th, 2006 at 10:10 am. Reason: A bit of additional info added
•
•
Join Date: Oct 2006
Posts: 10
Reputation:
Rep Power: 3
Solved Threads: 1
All u do is, use ASP. The database that I've chosen is Microsoft Access database. I could have explained it on Microsoft SQL server but I chose Access because it is inexpensive and widely available. Transition form Access to SQL Server is painless.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode