My issue lies with inserting a value from the database into a value for an input field - as so:
<tr><td>Last Name:</td><td><input type='text' value='<?php echo $rows['lname']; ?>' name='lnameEDIT'/></td></tr>
The issue is that when I am obtaining a value from the database that includes a ' character, it cuts off the value right there. If I echo the value to the page, it comes out correctly (as in o'neil), but if I try to put the value of the input field as (o'neil), it just get (o)... effectively disregarding everything after the ' character.
I cannot find out how to output the field value with this character, tried using addslashes, but it adds a slash, but still cuts off everything from ' onwards.
Has anyone got any suggestions/work arounds. I think its with the input field not taking a ' in a value, not php itself - just looking for a solution!