delphidestructor
Programmer
- Oct 20, 2000
- 67
I’m new to php so keep that in mind when you read my question(s).
What, if any, is the difference between;
$myvar = “Joe Blow”;
$outputstr = “The user is $myvar”; ,
$outputstr = “The user is “.$myvar; ,
and
$outputstr = “The user is “;
$outputstr .= $myvar;
?
Another question I have that is related, is about the html text areas and text boxes. How do you handle all the single and double quotes that a user might enter? I have a field defined as text in my database, which I plan on storing input from text areas in. I can see how this would work ok if you add all the necessary backslashes before the insert call and remove them when the data is retrieved, although I have not tried this yet and I’m not sure how to do it. But my big question is I have a user feedback page that user may email me their comments from. When I get the email the body contains backslashes in front of any quotes. How do you get around this? I cannot think of a way to do this. How do you format the text so php does not throw any errors but the end result in the email does not have the special formatting characters? I hope all this made sense to someone. I really need some help with this. Thanks in advance, Mike.
Mike
What, if any, is the difference between;
$myvar = “Joe Blow”;
$outputstr = “The user is $myvar”; ,
$outputstr = “The user is “.$myvar; ,
and
$outputstr = “The user is “;
$outputstr .= $myvar;
?
Another question I have that is related, is about the html text areas and text boxes. How do you handle all the single and double quotes that a user might enter? I have a field defined as text in my database, which I plan on storing input from text areas in. I can see how this would work ok if you add all the necessary backslashes before the insert call and remove them when the data is retrieved, although I have not tried this yet and I’m not sure how to do it. But my big question is I have a user feedback page that user may email me their comments from. When I get the email the body contains backslashes in front of any quotes. How do you get around this? I cannot think of a way to do this. How do you format the text so php does not throw any errors but the end result in the email does not have the special formatting characters? I hope all this made sense to someone. I really need some help with this. Thanks in advance, Mike.
Mike