forms question [PHP]
- BORKOYz
-
BORKOYz
- Member since: Aug. 13, 2004
- Offline.
-
- Forum Stats
- Member
- Level 22
- Blank Slate
I have a textfield, you can write stuff in it and u can submit it and it will show what you wrote on another page + it will create a file of wat you wrote, but when you type in a php script like
<?php
echo "YO Yo YO";
?>
it shows
<?php
echo \"YO Yo YO\";
?>
how do you make it so whateva you type in the textfield will show you exactly how you wrote.
Thanx
- elbekko
-
elbekko
- Member since: Jul. 23, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
Put this at the top of your script:
set_magic_quotes_runtime(0);
"My software never has bugs. It just develops random features. " - Unknown
[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]
- BORKOYz
-
BORKOYz
- Member since: Aug. 13, 2004
- Offline.
-
- Forum Stats
- Member
- Level 22
- Blank Slate
At 12/5/06 09:51 AM, elbekko wrote: Put this at the top of your script:
set_magic_quotes_runtime(0);
nah sorry i cant get it to work
also same problem, if i write
<div align='left'>YO Wats up<br /><br /></div> it actually writes "YO Wats up" its not just the quotes
- Loccie
-
Loccie
- Member since: Feb. 27, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 12/5/06 10:11 AM, BORKOYz wrote: also same problem, if i write
<div align='left'>YO Wats up<br /><br /></div> it actually writes "YO Wats up" its not just the quotes
echo '<div align="left">YO Wats up<br /><br /></div>';
If you want php to convert < to < and > to > you can use $newtext = htmlspecialchars($text);
- henke37
-
henke37
- Member since: Sep. 10, 2004
- Offline.
-
- Forum Stats
- Member
- Level 30
- Blank Slate
Learn about:
html vs display
magic quotes and how they suck
Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.
- DFox
-
DFox
- Member since: Aug. 9, 2003
- Offline.
-
- Forum Stats
- Member
- Level 30
- Blank Slate
Either turn magic quotes gpc off, or use stripslashes()


