[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-db
Subject:    RE: [PHP-DB] Using apostrophe's within a text field
From:       "Bastien Koert" <bastien_k () hotmail ! com>
Date:       2007-03-28 11:18:16
Message-ID: BAY135-F5FD020F1808B040F2403F9D6D0 () phx ! gbl
[Download RAW message or body]

use

mysql_real_escape_string($_POST['field'] IN the query
use addslashes
use htmlspecialentities
use str_replace to switch it to an ascii equivalent

hth

bastien


>From: "Stephen Smith" <kd8con@bex.net>
>To: <php-db@lists.php.net>
>Subject: [PHP-DB] Using apostrophe's within a text field
>Date: Wed, 28 Mar 2007 00:15:03 -0400
>
>OK guys, here is my delima, which is probably very easy to solve, but I 
>can't seem to find it.  I am trying to get form fields to accept 
>apostrophes within the input and stop crashing on me.  I'm writing forms 
>into a mysql database and everything works great unless the user enters a 
>word like "won't" or "can't".  Them it crashes during the form submit.  
>What can I do to fix this stupid thing anyway?
>
>thanks in advance.
>
>Steve Smith

_________________________________________________________________
http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!420

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic