For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > January 2008 > Re: [PHP-DB] Another new PHP programmer question...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Another new PHP programmer question...
Chris

2008-01-03, 7:00 pm

Ben Stones wrote:
> Hello,
>
> Thank you for your help previously everyone, I was able to fix that problem.
> The thing now, is that I want to add smileys to the messages; i.e. :) would
> equal to a smiley image when posting a message.


Assuming you have images/smiley.gif on your server, it's pretty simple:

echo '<img src="images/smiley.gif">';

at the right place.

> else {
> mysql_query("INSERT INTO `comments`(`messages`) VALUES ('$post')") or
> die(mysql_error());
> }


You're still not escaping your data and you will run into problems
unless you start doing it.

--
Postgresql & php tutorials
http://www.designmagick.com/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com