Re: [PHP] url string being split
On Thu, Apr 26, 2012 at 12:58 PM, Stuart Dallas stu...@3ft9.com wrote: On 26 Apr 2012, at 18:37, Jim Giner wrote: Im no expert, but why would you expose a query to the world thru the use of a GET? Why not just collect the params and build the string in your code? That is how people hack into your database - via a re-formed query. You're giving someone an open invitation. A query string has nothing to do with databases. -Stuart I still haven't been able to find a solution. Is there anyone out there that knows how to keep the query string intact? Thank you, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url string being split
On 04/27/2012 10:56 AM, Chris Stinemetz wrote: I still haven't been able to find a solution. Is there anyone out there that knows how to keep the query string intact? Thank you, Chris urlencode($storerow['store_subject']) -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url string being split
On 27 Apr 2012 at 16:56, Chris Stinemetz chrisstinem...@gmail.com wrote: On Thu, Apr 26, 2012 at 12:58 PM, Stuart Dallas stu...@3ft9.com wrote: On 26 Apr 2012, at 18:37, Jim Giner wrote: Im no expert, but why would you expose a query to the world thru the use of a GET? Why not just collect the params and build the string in your code? That is how people hack into your database - via a re-formed query. You're giving someone an open invitation. A query string has nothing to do with databases. I still haven't been able to find a solution. Is there anyone out there that knows how to keep the query string intact? As was posted previously, you need to encode the query string. If you have: http://westeng/forum/store.php?id=Wiser Communication, LLC - - Sprague Ave that is going to be split in two unless you encode the Wiser Communication, LLC - - Sprague Ave portion. I would do that with JavaScript on the html page. This is not a PHP question. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url string being split
On Fri, Apr 27, 2012 at 11:09 AM, Shawn McKenzie nos...@mckenzies.net wrote: On 04/27/2012 10:56 AM, Chris Stinemetz wrote: I still haven't been able to find a solution. Is there anyone out there that knows how to keep the query string intact? Thank you, Chris urlencode($storerow['store_subject']) -- Thanks! -Shawn http://www.spidean.com Thank you. That is what I was looking for. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] url string being split
Hello list, I'm trying to pass a query string through $_GET but for some reason the array is being split on ''. How may I avoid this so it stays intacted? user selection portion: while($storerow = mysql_fetch_assoc($storesresult)) echo 'h4a href=store.php?id=' . $storerow['store_subject'] . '' . $storerow['store_subject'] . '/a/h4 at ' . date('m-d-Y h:i:s A', strtotime($storerow['real_time_date'])); produces url string: http://westeng/forum/store.php?id=Wiser Communication, LLC - - Sprague Ave print(pre.print_r($_GET,true)./pre); ## results below Array ( [id] = Wiser Communication, LLC - [-_Sprague_Ave] = ) How do I make it so the string isn't split into two elements in the array? I want it to stay instact. Thank you, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url string being split
On 26 April 2012 22:27, Chris Stinemetz chrisstinem...@gmail.com wrote: Hello list, I'm trying to pass a query string through $_GET but for some reason the array is being split on ''. How may I avoid this so it stays intacted? user selection portion: while($storerow = mysql_fetch_assoc($storesresult)) echo 'h4a href=store.php?id=' . $storerow['store_subject'] . '' . $storerow['store_subject'] . '/a/h4 at ' . date('m-d-Y h:i:s A', strtotime($storerow['real_time_date'])); produces url string: http://westeng/forum/store.php?id=Wiser Communication, LLC - - Sprague Ave print(pre.print_r($_GET,true)./pre); ## results below Array ( [id] = Wiser Communication, LLC - [-_Sprague_Ave] = ) How do I make it so the string isn't split into two elements in the array? I want it to stay instact. You should urlencode the query parameter. Thank you, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url string being split
Im no expert, but why would you expose a query to the world thru the use of a GET? Why not just collect the params and build the string in your code? That is how people hack into your database - via a re-formed query. You're giving someone an open invitation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url string being split
On 26 Apr 2012, at 18:37, Jim Giner wrote: Im no expert, but why would you expose a query to the world thru the use of a GET? Why not just collect the params and build the string in your code? That is how people hack into your database - via a re-formed query. You're giving someone an open invitation. A query string has nothing to do with databases. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php