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
Shiro
Forum Newbie
Posts: 12 Joined: Sat Aug 09, 2003 7:08 am
Post
by Shiro » Sat Aug 09, 2003 7:08 am
Does anyone know why whenever i print something with a ' in it it changes the ' into a '' For instance if i were to do this
Code: Select all
$Message = "Hey I'm Shiro."
mail("$To,$subject,$Message,$extra");
That would print out like
Hey I''m Shiro.
Help :0(
Gen-ik
DevNet Resident
Posts: 1059 Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.
Post
by Gen-ik » Sat Aug 09, 2003 7:11 am
See if this works..
Code: Select all
<?php
$Message = "Hey I'm Shiro."
mail($To,$subject,stripslashes($Message),$extra);
?>
..sorry if it doesn't work but I've just woke up and my brains still in 1st gear!
Last edited by
Gen-ik on Sat Aug 09, 2003 7:13 am, edited 1 time in total.
Shiro
Forum Newbie
Posts: 12 Joined: Sat Aug 09, 2003 7:08 am
Post
by Shiro » Sat Aug 09, 2003 7:13 am
well its sorta a form so when people write like the word don't or couldn't anything with the ' that wont help X(
Thanks though
Gen-ik
DevNet Resident
Posts: 1059 Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.
Post
by Gen-ik » Sat Aug 09, 2003 7:14 am
Sorry mate I've just changed it... check it now. I've put the stripslashes() function into it
Shiro
Forum Newbie
Posts: 12 Joined: Sat Aug 09, 2003 7:08 am
Post
by Shiro » Sat Aug 09, 2003 7:15 am
*Refreshes*
*sees nothing :0(*
Shiro
Forum Newbie
Posts: 12 Joined: Sat Aug 09, 2003 7:08 am
Post
by Shiro » Sat Aug 09, 2003 7:16 am
oo gotcha
Gen-ik
DevNet Resident
Posts: 1059 Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.
Post
by Gen-ik » Sat Aug 09, 2003 7:16 am
<?php
$Message = "Hey I'm Shiro."
mail($To,$subject,stripslashes($Message),$extra);
?>
Shiro
Forum Newbie
Posts: 12 Joined: Sat Aug 09, 2003 7:08 am
Post
by Shiro » Sat Aug 09, 2003 7:16 am
Thanks A bunch