Re: Re: problem with form values

From: Date: Wed, 12 Sep 2001 09:46:31 +0000
Subject: Re: Re: problem with form values
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-67027@lists.php.net to get a copy of this message
i would say do this.... urlencode the string (it should use %22 or something for the quote marks) then un encode on the recieving page ---------- one thing you might try is this.... $sql = 'SELECT * FROM whatever WHERE'; while ( $quotes = explode('"', $Keywords) ) { $q = 0; $s = 0; if ($q *= 2) { }else { if ($q == 0) { $or = ' '; } else { $or=' or' } $sql = $sql . $or . ' Keywords=/'' . $quotes[$q] . '/ ' ; $q++; } }else{ if ($s == 0) { $or = ''; } else { $or=' or'; $s = 0; while ( $spaces = explode(' ', $quotes[$q] ) { $sql = $sql . ' Keyword=/''. $spaces[$s] . '/'; $s++ } } this is most defnitly wrong in many ways, but i'm not gonna spend another hour thinking up what's wrong with it and bug hunt. this gives an idea. heh, you were probably just woundering about urlencode or stripslashes... oh well just a thought. maybe a pro could step in and say something useful. -A

« previous php.general (#67027) next »