Date: 09/28/00
- Next message: Mai Truong: "[PHP] Problems with time calculation"
- Previous message: Joseph Blythe: "[PHP] addslashes"
- In reply to: Joseph Blythe: "[PHP] addslashes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Gday,
show us your insert statment?
I always use " in my insert statments like this:
insert into table (blah) values ("$blah");
or
$SQL = "insert into table (blah) values (\"$blah\")";
from within PHP
Matta
Joseph Blythe wrote:
>
> Hey,
>
> Now that I can't use the htmlspecialchars() etc.. I am forced to use
> addslashes() until I upgrade, and I want to wait until php 4.03 is
> officially out.
>
> My problem is that when I use:
>
> $Name = "O'Connell";
>
> $Name = addslashes($Name);
>
> Then try and do a mysql_insert it spits the dummy as the ' has not been
> escaped.
>
> Does anyone know why this isn't working, I have used this before with no
> problem?
>
> I really don't wnat to do an ereg_replace on the insert, and again for
> viewing.
>
> Also magic_quotes_runtime is on, so I shouldn't need to do this at all
> should I hmmm...
>
> I may be forced to upgrade yet :-)
>
> Regards,
>
> Joseph
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
-- Matt Allen Linux/PHP eCommerce Solutions Linux Worx Linux Networking www.linuxworx.com.au Consulting matt <email protected> 0413 777 771-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Mai Truong: "[PHP] Problems with time calculation"
- Previous message: Joseph Blythe: "[PHP] addslashes"
- In reply to: Joseph Blythe: "[PHP] addslashes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

