Re: probelem with quotes...need help...

From: Date: Mon, 23 Oct 2000 02:04:58 +0000
Subject: Re: probelem with quotes...need help...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21685@lists.php.net to get a copy of this message
On Sun, 22 Oct 2000, Shane McBride wrote: > > I am working with a form that interfaces with mysql to delete a record within mysql. > > The thing works great except when the variable value has quotes in it. > > Here's whats up: > > Page 1: > variable name from - <select name=\"sel_record\"> > This value my bsomething like: Aqua Relief Pad 6" x 12" > > Page 2: > $sql = "DELETE FROM featured WHERE title = \"$sel_record\""; > > I thinks it fails because the varaible value becomes: Aqua Relieg Pad 6, it stops at the first > quote. > How do I get the literal value. I tried to use single quotes around the variable name, but it > didn't work. Look at addslashes and stripslashes; $selrecord omn page 2 may well look like Aqua Relief Pad 6/" x 12/" -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#21685) next »