Does anyone know...

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

Post Reply
Shiro
Forum Newbie
Posts: 12
Joined: Sat Aug 09, 2003 7:08 am

Does anyone know...

Post by Shiro »

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 »

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

thanks

Post by Shiro »

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 :D
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Sorry mate I've just changed it... check it now. I've put the stripslashes() function into it :D
Shiro
Forum Newbie
Posts: 12
Joined: Sat Aug 09, 2003 7:08 am

:D

Post by Shiro »

*Refreshes* :lol: *sees nothing :0(*
Shiro
Forum Newbie
Posts: 12
Joined: Sat Aug 09, 2003 7:08 am

ooo

Post by Shiro »

oo gotcha :D
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

<?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

Thanks

Post by Shiro »

Thanks A bunch :D
Post Reply