I have what is probably an extremely stupid question. I haven't had any luck finding a solution so here I am back at my favorite forum pleading yes pleading for some help. My problem is with escaped characters. Specifically, apostrophes. I am using Php 4.3 and MySQL. I am using a form in which the user enters a name. After entering the name and submitting the form. the name is passed to a second form as a Session variable. My problem? When the name contains an apostrophe such as O'Brien A / gets inserted imediately before the apostrophe i.e. O/'Brien. This screws up all my subsequent forms that use this session variable. How can I get rid of the (^*2&%$ slash. Many thanks
This is the field that captures the name
input name="CLNAME" type="text" value="<?if (isset($CLNAME)) print $CLNAME;?>"
This is where I assign it to a session variable
$_SESSION['CLNAME'] = $CLNAME;
And this is where it appears on the second form
<input type="text" name="CLNAME" value="<? echo $_SESSION['CLNAME'];?>"
I know this must be doable with stripslashes or addslashes I just don't know how and where to implement that. Any and all suggestions are really appreciated! Have a Great Day!