Hello,
im trying to make a filter for words inputted in to my website but i want to store the swear word and the replacement for that word in a mysql db i have developed the code below;
<?php
include("config.php");
$str = 'how are you have you got any money';
$result = mysql_query("SELECT * FROM table")
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$words = array($row['word'],);
$filter = array($row['translated_word'],);
}
echo str_replace($words, $german, $str);
?>
but it just dose not return the filters how i need it to it will only list it as it returns them like
wordwordwordwordword
but i need it to return them like
word,word,word,word,word
how would i do this? please help me =] thanks
Simpler method of getting variables from mysql
Hi Guys,I'm trying to streamline my CMS's code and as I was writing a new page it occured to me that there might be an easier way to get variables from a mysql query and that if anyone knew how to do
explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searches for the second word. For example: if I typed london zoo , it will only search for zoo.Is this
retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell the images are stored but getting them out seems to be the problem. when i try to go to the page on
value not going in data base
hello friends.... i am having a working javascript....when i am selecting any designation and refresh/validation problem the form is resetting the designation value and the
php multiple action on submit
I have a form which says:<form enctype='multipart/form-data' method='post' action='process.php' target='_blank'>I need to call process.php on submit or on clicking submit button. Now
apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?
question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or should i always put a die() function underneath the header() function?
PHP login form help (Done Most of It)
Hi i am having a problem, when i try logging in it is always saying "Invalid Login" im not sure what is going wrong, a week ago i had it working. I cant remember the change i did but i know
This is driving me nuts!
This insert query looks to be alright, however I get this error:QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
Call Screen statement Error
Dear Experts,