Re: [PHP] url string being split

2012-04-27 Thread Chris Stinemetz
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

2012-04-27 Thread Shawn McKenzie
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

2012-04-27 Thread Tim Streater
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

2012-04-27 Thread Chris Stinemetz
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

2012-04-26 Thread Chris Stinemetz
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

2012-04-26 Thread Vikash Kumar
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

2012-04-26 Thread Jim Giner
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

2012-04-26 Thread Stuart Dallas
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



[PHP] URL String

2004-08-10 Thread Stephen Craton
Hello,

I'm working on a site that cannot use PHP exactly, so I'm trying to work
around that limitation with remotely hosted scripting by tricking the server
into thinking the PHP content is actually javascript.

I've been able to do this before, but this time I'm having a few issues. I
need to be able to pass all the variables in the URL and POST variables to
the external script, but it seems it won't work this way unless I directly
pass them in the src attribute of the script tag.

Does anyone know a way to get the POST and GET variables to still pass to
the external script? I was thinking there was a way with JavaScript but I'm
not that great with it.

Thanks,
Stephen Craton
http://www.melchior.us
http://php.melchior.us
http://www.chatness.us


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] url string

2002-06-10 Thread Kris Vose

I am looking for a way to pass two variables in a url string to a php script.  I 
originally was using java script to acomplish this because once the user is redirected 
they can not press the back button to get back to the original page.  It looks like 
this:
?
script window.location = somefile.php?user=?username?pass=?userpass?/script
?

I have also tried it this way:

echo script window.location = 
'somefile.php?user=$usernamepass=$userpass'/script;

Unfortunately both ways do not work.  In the first instance the script jumps to the 
window location but does not pass php variables into the url string.  In the second 
instances the java script does not even compile.

Is there a way to do this with php?...html?...javascript?

...I think that window.location does not except url string variables or something.  
Anyway if anyone can help it would be appreciated.  Thanks.


Kris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] url string

2002-06-10 Thread Leotta, Natalie (NCI/IMS)

Instead of window.location, try document.formName.target = file.php?params
- that's how I have mine set up and it works well.
You need to follow that with document.formName.submit()

-Natalie

-Original Message-
From: Kris Vose [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 10, 2002 4:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] url string


I am looking for a way to pass two variables in a url string to a php
script.  I originally was using java script to acomplish this because once
the user is redirected they can not press the back button to get back to the
original page.  It looks like this: ? script window.location =
somefile.php?user=?username?pass=?userpass?/script
?

I have also tried it this way:

echo script window.location =
'somefile.php?user=$usernamepass=$userpass'/script;

Unfortunately both ways do not work.  In the first instance the script jumps
to the window location but does not pass php variables into the url string.
In the second instances the java script does not even compile.

Is there a way to do this with php?...html?...javascript?

...I think that window.location does not except url string variables or
something.  Anyway if anyone can help it would be appreciated.  Thanks.


Kris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php