 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
PsxMeUP
Joined: 26 Sep 2009
Posts: 1
|
| Posted: Sat Sep 26, 2009 4:19 am Commas and quotes changing to \\\" |
|
|
Hi, I have a site where commas and quotes change to \" once the article is posted.
Some have proposed that it's because magic_quotes are set to on (and they are because I checked using <?php phpinfo(); ?>). I checked my php.ini file and it doesn't have that code, meaning it's probably set up on my hosting provider's side. So shat are my options? Should I turn them off somehow? Isn't it better to have them on? Is there some code I can add to fix this problem? The site lets users post game reviews, and the last thing I want is a note saying "Warning, you must type your text in Word first," cause it would look lame, and I definitely want the site to be perfectly optimized. |
|
|
gary.newelluk
Joined: 12 May 2005
Posts: 552
Location: Inverurie, Scotland
|
| Posted: Sun Sep 27, 2009 1:05 pm Removing magic quotes |
|
|
Hi there,
If magic quotes are turned on use stripslashes to remove the extra slash as follows:
Code:
<?php
echo "Removed Slashes: ";
// Remove those slashes
if(get_magic_quotes_gpc())
echo stripslashes($_POST['question']);
else
echo $_POST['question'];
?>
<form method='post'>
Question: <input type='text' name='question'/><br />
<input type='submit'>
</form>
Visit http://www.tizag.com/phpT/php-magic-quotes.php for a full explanation. |
|
|
stoyv
Joined: 06 Jan 2010
Posts: 6
|
| Posted: Sat Jan 16, 2010 8:01 am Php Form, Web form Builder, HTML Forms, Email forms |
|
|
| Please look up here this site http://phpforms.net/tutorial.html where you can find the answer to your question. |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|