drisate
-
Posts
805 -
Joined
-
Last visited
Posts posted by drisate
-
-
How abbout starting to show us how the code is made
-
Hey guys i need to make a directory kind script but i have no idea how to make the script handdle unlimited categorys ... Ex
The problem i have is i don't get how to loop the listing when you have no idea how much loops you have to make...
The way i was thinking of making the table is
id (unique and auto increment
s_id (the unique id of the parent category)
name (the name of the category)
if s_id is equal to 0 it's a primary cat and for the rest it means they belog to an other one.
1
|__2
|__3
|__4
|__5
|__6
|__7
8
|__9
in this case i loop s_id = to 0 and it returns 1 and 8
Now in the 1 loop i have to loop everything using 1 as s_id and that returns 2 3 and 4
My script is going nowhere because it's limited to the number of times i check ... i need it to be able to have unlimited subcategorys and be able to list them with out any problems what ever number there is. Any idea, script exemple or what ever that could help me?
put swear filter where?
in PHP Coding Help
Posted
Well then you have to catch the message while it's being posted and replace the bad words.
If you make the replace everytime you open the page you might slow it down.
$_POST[message]= str_replace( $swears, '****', $_POST[message]);
$_POST[subject]= str_replace( $swears, '****', $_POST[subject]);
...
For the rest already posted make your self a loop programme that you will run only one time to replace all the bad stuff.