Replacing text with smilies! Getting some error!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Replacing text with smilies! Getting some error!

Post by Benjamin »

Forum Rules wrote: 11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
You may also want to read:
  1. General Posting Guidelines
  2. Posting Code in the Forums
  3. PHP Manual
  4. PHP Tutorials
User avatar
TildeHash
Forum Commoner
Posts: 43
Joined: Fri Jul 16, 2010 7:17 am
Location: Apple Valley, California

Re: Replacing text with smilies! Getting some error!

Post by TildeHash »

pHp_n0ob wrote:plz also xplain ?
Conditional variable value.

Code: Select all

$variable = (condition) ? condition met : condition not met;
Like:

Code: Select all

$variable = (5 > 4) ? 'yes' : 'no';
pHp_n0ob wrote:and striplashes...thanx for ur help anyway :)
stripslashes does what it's named. It removes backslashes from "POST" and "GET" data. If, for example, you post the following message:
[text]This is a "test" message.[/text]

Without stripslashes, PHP will echo that text as:
[text]This is a \"test\" message.[/text]

This is called "escaping special characters". I have no idea why PHP does it though.
User avatar
TildeHash
Forum Commoner
Posts: 43
Joined: Fri Jul 16, 2010 7:17 am
Location: Apple Valley, California

Re: Replacing text with smilies! Getting some error!

Post by TildeHash »

pHp_n0ob wrote:
TildeHash wrote: Sorry, I don't use databases (especially not MySQL.) 8)
8O
TildeHash wrote:If it's one's own content for one's own site, then any form of separated file storage isn't called for. I do use flat files, but I don't store other people's content or information very often so there is no need for me to use a database nor flat files very often, either. :)
and what if you'l have to store data...say u have to make a forum...then what? Where you'l store the data?
Most forums do use a database to store the posts, but it's not at all required:
http://sourceforge.net/projects/flatfileforum/
http://www.myupb.com/sf_news/
http://code.google.com/p/smartbb-forum/
http://www.razorcms.co.uk/

I myself am writing a comment system called "HashOver" which uses individual XML files instead of any kind of database.
http://www.tildehash.com/comments.html
Post Reply