RE: [PHP] stripslashes, within a string?
| From: | Ford, Mike [LSS] | Date: | Thu, 08 May 2003 09:41:07 +0000 |
| Subject: | RE: [PHP] stripslashes, within a string? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146812@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Tristan.Pretty@risk.sungard.com
> [mailto:Tristan.Pretty@risk.sungard.com]
> Sent: 08 May 2003 10:29
> To: php-general@lists.php.net
> Subject: [PHP] stripslashes, within a string?
>
>
> I wanna use a variable within a string.
> But I need to strip slashes first.
>
> I've used this, but it fails...?
>
> $email = addslashes($email); // variable from a previous form
>
> //Add $email to database
>
> $body = "The following E-mail address: " .
> stripslashes($email); . "Has
> been recieved";
>
> mail($mailto, $subject, $body);
>
> Line 3 give me an error... (Parse error: parse error.....)
>
> What monkey mistake am I making?
You've got a superfluous semicolon after the stripslashes() call.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211