| | |
Slashes before Double Quote marks
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2004
Posts: 36
Reputation:
Solved Threads: 0
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?
Also, how might I go about allowing people to save the page they have created?
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.

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.
•
•
Join Date: Jun 2004
Posts: 91
Reputation:
Solved Threads: 0
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.
•
•
Join Date: Oct 2004
Posts: 36
Reputation:
Solved Threads: 0
•
•
•
•
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.
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
You could also simply tell the user how to use their 'Save Page As' feature in their browser
•
•
Join Date: Jan 2005
Posts: 18
Reputation:
Solved Threads: 2
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!
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!
![]() |
Similar Threads
- problem moving code from Unix to IIS (PHP)
- help with BNF (Computer Science)
- Different quote marks (MySQL)
- .bat file (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: How can i call c++ functions in php?
- Next Thread: Converting from VB6 - php XOR Problem
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





