-
problem in my code php
in my code
simple code (I beginner) :cool:
-------------- test.php -----------
<?
echo $code;
?>
-------------- test.php -----------
OK
if write in browser
http://127.0.0.1/test.php?code=sorry I know not good speak English
this will return:
sorry I know not good speak English
but the problem if write " or ' look :
http://127.0.0.1/test.php?code=hi guy I'm swaa
or
http://127.0.0.1/test.php?code=I%27m swaa
%27 = '
this will return:
I\'m swaa
OoOh MY GOD what is this :mad:
note : php add \ :mad: :confused:
how to write in browser without add \
any help
-
Is the code being submitted by an HTML form? If so, just change it from GET to POST. Ie, in your <form> tag, make sure you have method="post".
-
oh, wait! I understand what you mean now. Change your code to this:
Code:
<?php
echo stripslashes($code);
?>
The stripslashes() function does just that: strips the slashes.
-
Oh yeh, so he does
Thanks for responding The Hobo,,