jesseainskeep
11-30-2006, 12:47 PM
I'm stumped what to do on this, so I thought I would ask for help...
I've for a form that will update and insert into a database, the problem comes in with the ' and ".
I use the addslashes() and stripslashes() and have no problem with the database, it's when I'm trying to put the data back into the form so they can update something...
My source code generated by php is below.... You'll know what I mean.
<tr>
<td width="75px">Name:</td>
<td width="425px"><input type="text" size="30" id="frmName" name="frmName" value='O\'Reiley' /></td>
</tr>
<tr>
<td>Address:</td>
<td><input type="text" size="30" id="frmAddress" name="frmAddress" value="O\Reiley" ></td>
</tr>
<tr>
<td>City:</td>
<td><input type="text" size="15" id="frmCity" name="frmCity" value="O"Reiley" /></td>
</tr>
If I use " or ' for the value, and am trying to insert this, I've got a big problem...
What do you do when you need to put a ' and " in a text box?
I've for a form that will update and insert into a database, the problem comes in with the ' and ".
I use the addslashes() and stripslashes() and have no problem with the database, it's when I'm trying to put the data back into the form so they can update something...
My source code generated by php is below.... You'll know what I mean.
<tr>
<td width="75px">Name:</td>
<td width="425px"><input type="text" size="30" id="frmName" name="frmName" value='O\'Reiley' /></td>
</tr>
<tr>
<td>Address:</td>
<td><input type="text" size="30" id="frmAddress" name="frmAddress" value="O\Reiley" ></td>
</tr>
<tr>
<td>City:</td>
<td><input type="text" size="15" id="frmCity" name="frmCity" value="O"Reiley" /></td>
</tr>
If I use " or ' for the value, and am trying to insert this, I've got a big problem...
What do you do when you need to put a ' and " in a text box?