Slashes before Double Quote marks

Reply

Join Date: Oct 2004
Posts: 36
Reputation: stupidfly is an unknown quantity at this point 
Solved Threads: 0
stupidfly stupidfly is offline Offline
Light Poster

Slashes before Double Quote marks

 
0
  #1
Dec 23rd, 2004
I have made a form ( http://www.rhstrack.com/bio.htm ) that puts the information onto another page. The problem is that it puts a back slash ( / ) before any quote marks ( " ) - which are used because the form asks for a quote. How do I get around this?

Also, how might I go about allowing people to save the page they have created?
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Slashes before Double Quote marks

 
0
  #2
Dec 23rd, 2004
So the form adds the slashes for you? Well that's how it's supposed to be I believe, otherwise it would mess up with the " quotes around the entire thing

What you do is use this function: stripslashes(); to strip the slashes from the string.

Also, to allow people to save the pages, make a link to the page and then just tell them to right-click the link and then use the 'Save As' option to save the page.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 91
Reputation: Antonbomb22 is on a distinguished road 
Solved Threads: 0
Antonbomb22 Antonbomb22 is offline Offline
Junior Poster in Training

Re: Slashes before Double Quote marks

 
0
  #3
Dec 28th, 2004
instead of having them put quote marks for the quote just have them put the quote and on the next page use quotes around the provided text
My Site: Animation Talk is the best place to discuss animation.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 36
Reputation: stupidfly is an unknown quantity at this point 
Solved Threads: 0
stupidfly stupidfly is offline Offline
Light Poster

Re: Slashes before Double Quote marks

 
0
  #4
Dec 30th, 2004
Originally Posted by Gary
Also, to allow people to save the pages, make a link to the page and then just tell them to right-click the link and then use the 'Save As' option to save the page.
That doesn't work. I figure it doesn't work because it is a form so the content isn't really on the page?
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Slashes before Double Quote marks

 
0
  #5
Dec 30th, 2004
If you used GET instead of POST method for the form then it would work (but that might make URL extremely long.)

You could also simply tell the user how to use their 'Save Page As' feature in their browser
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 18
Reputation: demo is an unknown quantity at this point 
Solved Threads: 2
demo demo is offline Offline
Newbie Poster

Re: Slashes before Double Quote marks

 
0
  #6
Jan 3rd, 2005
Hi

Turn 'OFF' (magic_quotes_gpc, magic_quotes_runtime)

You should learn to handle incoming 'FORM DATA' in your script, one should never use php.ini setting if they can control it in the script!

If your own shared hosting, and are not allowed access to the php.ini, you can turn this off via 'htaccess' -> per directory

example...

htaccess file -> below this line
php_flag magic_quotes_runtime Off
htaccess file -> above this line

If you want to turn it Off in your script!

At the top of your script! (turn it off)

<?
set_magic_quotes_runtime(0);
?>

At the bottom of your script! (turn it back on)

<?
set_magic_quotes_runtime(get_magic_quotes_gpc());
?>


Then in your script handle each 'FORM DATA' being sent to your script!


J!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC