Page 2 of 2

Re: Replacing text with smilies! Getting some error!

Posted: Thu Jul 19, 2012 7:08 am
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

Re: Replacing text with smilies! Getting some error!

Posted: Thu Jul 19, 2012 11:21 pm
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.

Re: Replacing text with smilies! Getting some error!

Posted: Thu Jul 19, 2012 11:34 pm
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