Re: [PHP] php help probably basic (used stripslashes but probably not the right way to do it)

2001-09-10 Thread David Robley

On Tue, 11 Sep 2001 14:20, Lance Rochelle wrote:
> I am having the following problem.
> I have a database that is setup as follows
>
> CREATE TABLE test (
>   id tinyint(4) NOT NULL auto_increment,
>   text text NOT NULL ,
>   PRIMARY KEY  (id)
> ) TYPE=MyISAM;
>
> I have a page after a form that confirms all data to be entered the
> html is as follows
>
> text=\"test \'ve\"
> id=1
> 
> 

If this isn't in an echo statement you shouldn't be escaping the double 
quotes here. That should look more like



other wise what is seen is


> 
> 
> 
>
> however in the next page I am doing a print of the insert statement for
> testing and all I get is the following
> insert into test (id,text) values ('1','\')
>
> I have tried the following
> $test = stripslashes($test);
>
>  but it just gets worse any ideas would be helpful
>
> I am using php 4.0.6, apache 1.3.20, mysql 3.23.42, and Linux kernel
> 2.4.3
>
>
> Lance Rochelle
> [EMAIL PROTECTED]
> http://ulands.idlegames.com
> (607) 775-2681
> ---
> Being a Systems Administrator is like
> hitting yourself in the bead with a brick.
> After a while you don't feel the pain.
> 

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Not a real tagline, but an incredible soy substitute.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php help probably basic (used stripslashes but probably not the right way to do it)

2001-09-10 Thread Lance Rochelle

I am having the following problem.
I have a database that is setup as follows

CREATE TABLE test (
  id tinyint(4) NOT NULL auto_increment,
  text text NOT NULL ,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

I have a page after a form that confirms all data to be entered the html is
as follows

text=\"test \'ve\"
id=1






however in the next page I am doing a print of the insert statement for
testing and all I get is the following
insert into test (id,text) values ('1','\')

I have tried the following
$test = stripslashes($test);

 but it just gets worse any ideas would be helpful

I am using php 4.0.6, apache 1.3.20, mysql 3.23.42, and Linux kernel 2.4.3


Lance Rochelle
[EMAIL PROTECTED]
http://ulands.idlegames.com
(607) 775-2681
---
Being a Systems Administrator is like
hitting yourself in the bead with a brick.
After a while you don't feel the pain.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]