resolving a problem with the caracter -> ' <- ????
Posted: Mon Sep 20, 2004 10:18 am
hy
i need to alow the forms to POST data with the caracter -> ' <- it works fine in some cases like POST data in to the database he put it...
but when i use a variable with that caracter and try to update the database will not work fine, maybe becouse of
if the variable x is -> I'Myname <- this will afect the query to the database, becouse the variable $x have the caracter ' ...
how do hy, resolve this problem ??
tanks[/b]
i need to alow the forms to POST data with the caracter -> ' <- it works fine in some cases like POST data in to the database he put it...
but when i use a variable with that caracter and try to update the database will not work fine, maybe becouse of
Code: Select all
<?php
$sql = "select name from table where name='$x' ";
?>how do hy, resolve this problem ??
tanks[/b]