$subject = str_replace("\\", "\\\\", htmlspecialchars($_POST['subject'], ENT_QUOTES ));
$subject = str_replace("yahoo", " ", htmlspecialchars($_POST['subject'], ENT_QUOTES ));
$msgtext = str_replace(".yahoo", "google ", htmlspecialchars($_POST['msgtext'], ENT_QUOTES ));
$send_person = new User($to);
this works if yahoo is wrote in message box it changes to goolge. But want i want is to be able to add more. Like this:
$subject = str_replace("\\", "\\\\", htmlspecialchars($_POST['subject'], ENT_QUOTES ));
$subject = str_replace("yahoo", " ", htmlspecialchars($_POST['subject'], ENT_QUOTES ));
$msgtext = str_replace(".yahoo", "google ", htmlspecialchars($_POST['msgtext'], ENT_QUOTES ));
$msgtext = str_replace(".ebay", "google ", htmlspecialchars($_POST['msgtext'], ENT_QUOTES ));
$msgtext = str_replace(".coke", "google ", htmlspecialchars($_POST['msgtext'], ENT_QUOTES ));
$msgtext = str_replace(".green", "google ", htmlspecialchars($_POST['msgtext'], ENT_QUOTES ));
and when i add more like that it only does the bottom one not the others... so anybody know how i can write the code so i can have muiltiple words. Wats this does is it replace the first word and makes it google. these words are examples


Reply With Quote



Bookmarks