here is the problem:
$name = 'O\'brian';
PHP Code:
echo "<td>Leader:</td> <td><input type=text value='$name' name=leader></td><tr>";
Any ideas? Thanks.
So far I have tried:
\ escape symbol before the '
mysql_escape_string()
addslashes()
No success, the output is always Leader: O
everything after the ' will not print.
I was going to post this, but then a friend help me solved the problem so incase anyone is interested here is the modified code that works:
PHP Code:
echo '<td>Leader:</td> <td><input type=text value="'; echo$name; echo'" name=leader></td><tr>';
Bookmarks