[PHP] PHP help Quotations, Quotations, Quotations
Hello, I am having a small issue with posting from forms; It goes like such: I have a form in which a user can type in a message and in a hidden text field a link is sent, then in the page the form goes to it sends and email to a mailing list with the message and a link underneath bottom. However when I submit a hyperlink in a form like http://localhost/knewsl/" > It is received in the next page with a "\" before every " " " for example: http://localhost/knewsl/file.pdf\";>Click here to view newsletter - Which obviously doesn't work. I would be most grateful if anyone could help. Cheers, Simon
RE: [PHP] PHP help Quotations, Quotations, Quotations
Thanks a lot for that, I am really grateful, now it sends along the link properly, which is great, however it is now having trouble converting spaces to %20 and it does it for some and not others, eg It does this: http://localhost/knewsl/NewsletterName.pdf When it should be: http://localhost/knewsl/Newsletter%20Name.pdf Cheers, Simon -Original Message- From: Stephen Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, 11 March 2005 1:32 PM To: stg Cc: php-general@lists.php.net Subject: Re: [PHP] PHP help Quotations, Quotations, Quotations http://www.php.net/stripslashes On Mar 10, 2005, at 9:17 PM, stg wrote: > Hello, > > > > I am having a small issue with posting from forms; > > > > It goes like such: > > > > I have a form in which a user can type in a message and in a hidden > text > field a link is sent, then in the page the form goes to it sends and > email > to a mailing list with the message and a link underneath bottom. > > > > However when I submit a hyperlink in a form like > > href="http://localhost/knewsl/" > > > > > It is received in the next page with a "\" before every " " " for > example: > > http://localhost/knewsl/file.pdf\";>Click here to view > newsletter - Which obviously doesn't work. > > > > I would be most grateful if anyone could help. > > > > Cheers, > > Simon > > * Stephen Johnson [EMAIL PROTECTED] http://www.thelonecoder.com --continuing the struggle against bad code-- * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailing List
Hi I have two pages 1) A form with a rich text box and a submit button. 2) A page which receives the value from the rich text box and emails out to addresses in a column in a table For the rich text box its default value is a message saying: "Click the link below to download the latest newsletter" and a link which get the file path from a table in the db. Users can then add a message above the link to the newsletter. Now this all works fine except for the link, (and any other links I make using the rich text box), firstly when the form is posted a \ is placed before the ", ie Link which renders the link useless. Someone suggested stripslashes, which I put on the second page where it receives the variable; $_POST['msg'], this did remove the slashes however I then had a problem with spaces in the file path for the newsletter, ie; url.com/testfile.pdf would be sent instead of url.com/test file.pdf which it should be. Then someone suggested urlencode however that encoded the entire message, so they got Click%20the%20link%20below.. If anyone could help I would be most grateful, I want to be able to send these default links from the rich text box as well as allow users to add links in the rich text box. Cheers, Simon