rsammy Posted December 28, 2006 Share Posted December 28, 2006 i am entering data in a field on screen. i update patients info on a screen. i enter Jay's restaurant in one of the fields. the next screen is a confirmation screen that shows Jay\'s as the value entered for this field. however, in the database, it is stored properly. when i do a qeury and pull this patient up the next time, it shows up as Jay's!!!how do i prevent it from showing Jay\'s on the confirmation screen? Quote Link to comment https://forums.phpfreaks.com/topic/32076-solved-problem-with-apostrophe/ Share on other sites More sharing options...
bljepp69 Posted December 28, 2006 Share Posted December 28, 2006 stripslashes() Quote Link to comment https://forums.phpfreaks.com/topic/32076-solved-problem-with-apostrophe/#findComment-148862 Share on other sites More sharing options...
wildteen88 Posted December 28, 2006 Share Posted December 28, 2006 you may have a setting called magic_quotes_gpc enabled which causes this. You can either disable this or do what bljepp69 suggested. Quote Link to comment https://forums.phpfreaks.com/topic/32076-solved-problem-with-apostrophe/#findComment-148865 Share on other sites More sharing options...
rsammy Posted December 28, 2006 Author Share Posted December 28, 2006 thanx for replying guys!this is what i'm doing in the confirmation page...$PatientEmployer=$_POST["PatientEmployer"];shud i change this to...$PatientEmployer=$_POST["PatientEmployer"];i tried that but, it gives a my_sql error. it shows up correctly on the confirmation page as Jay's - but does not store it in the database!!!how do i disable magic_quotes_gpc ??? Quote Link to comment https://forums.phpfreaks.com/topic/32076-solved-problem-with-apostrophe/#findComment-148889 Share on other sites More sharing options...
ted_chou12 Posted December 28, 2006 Share Posted December 28, 2006 rsammy, I cant differentiate between this:$PatientEmployer=$_POST["PatientEmployer"];and this:$PatientEmployer=$_POST["PatientEmployer"];oh, and dont use stripslashes() with mysql database, because it automatically strips the slashes, so there will be a syntax error if there arent any slashes before " ' ", so you should stripslashes() in the confirmation page where you are trying to show your users their entries instead of using them to store data into mysql.you might be able to find the magic thingy in your user control panel your host provides you.Ted. Quote Link to comment https://forums.phpfreaks.com/topic/32076-solved-problem-with-apostrophe/#findComment-148897 Share on other sites More sharing options...
rsammy Posted December 28, 2006 Author Share Posted December 28, 2006 than you!!! Quote Link to comment https://forums.phpfreaks.com/topic/32076-solved-problem-with-apostrophe/#findComment-149002 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.