hello

i have this in my code

$providers_offer=strip_html_tags($_POST['services_offer']);
mysql_query("UPDATE providers SET providers_offer='$providers_offer' WHERE user_name='$_SESSION[provider]' ") or die(mysql_error());

simple update on my data.

my problem is if i type a data in my services offer. with this kind of characters
( sample's ) i got a syntax error on updating or saving in my database.
the problem is this >> ' << its reads as s syntax in my sql statement.

pls help me how to resolve this,

thanx
happy new year :))

nevermind i got it

$text=htmlspecialchars($text, ENT_QUOTES));

thnks anyway . happy new year :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.