Re: [PHP] '' Sign in _GET Parameter
Try this : $link = $row[company]; echo (a href='full_profile_1.php?name=.urlencode($link).'); -- www.cpm-fr.com Thanks for the link, $link = $row['company'];\00\00 a href=\full_profile_1.php?name=', urlencode($link),' \\00\00 However this does not seem to work / what am I missing ? Thanks -Pushpinder On Friday, August 22, 2003, at 03:23 PM, CPT John W. Holmes wrote: From: Pushpinder Singh Garcha [EMAIL PROTECTED] I am using an application where I retrieve user profile from a MySQL DB using the Company Name . I pass the name of the company to the PHP script as a '$_GET' parameter. e.g. when the name of the company is 'IBM'. , the URL with the query string would look like : http://masterstream.com/CRM/full_profile_1.php?name=IBM Now one of the records had a name : PSG Inc. , in this case the URL with the query string would look like http://masterstream.com/CRM/full_profile_1.php?name=PSG%20%20Inc. However in the case of the latter I am not able to pull out any records from the MySQL database. It says that no records with the name were found. I went ahead and tweaked the name of the company, to remove the sign in 'PSG Inc.' Now the query works fine. Can some one throw some light here. I am sure something minor is to be done when passing the name of the company in the parent script. The character separates variables in the query string, so it must be encoded if it appears in the data. Take a look at http://us2.php.net/urlencode ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] '' Sign in _GET Parameter
On Fri, 2003-08-22 at 12:05, Pushpinder Singh Garcha wrote: Hello All, I am using an application where I retrieve user profile from a MySQL DB using the Company Name . I pass the name of the company to the PHP script as a '$_GET' parameter. e.g. when the name of the company is 'IBM'. , the URL with the query string would look like : http://masterstream.com/CRM/full_profile_1.php?name=IBM Now one of the records had a name : PSG Inc. , in this case the URL with the query string would look like http://masterstream.com/CRM/full_profile_1.php?name=PSG%20%20Inc no, this is not how it should look... the '' in the above query string is saying the variable 'name' ends and a new variable follows. If you are submitting this in a form using method=get... it should look something like: ?name=PSG+%26+Inc if you are really passing this in a form using method=get, then this should be handled automatically. how are you accessing the passed variable? $_GET['name'] ?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] '' Sign in _GET Parameter
From: Pushpinder Singh Garcha [EMAIL PROTECTED] I am using an application where I retrieve user profile from a MySQL DB using the Company Name . I pass the name of the company to the PHP script as a '$_GET' parameter. e.g. when the name of the company is 'IBM'. , the URL with the query string would look like : http://masterstream.com/CRM/full_profile_1.php?name=IBM Now one of the records had a name : PSG Inc. , in this case the URL with the query string would look like http://masterstream.com/CRM/full_profile_1.php?name=PSG%20%20Inc. However in the case of the latter I am not able to pull out any records from the MySQL database. It says that no records with the name were found. I went ahead and tweaked the name of the company, to remove the sign in 'PSG Inc.' Now the query works fine. Can some one throw some light here. I am sure something minor is to be done when passing the name of the company in the parent script. The character separates variables in the query string, so it must be encoded if it appears in the data. Take a look at http://us2.php.net/urlencode ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] '' Sign in _GET Parameter
Thanks for the link, $link = $row['company']; a href=\full_profile_1.php?name=', urlencode($link),' \ However this does not seem to work / what am I missing ? Thanks -Pushpinder On Friday, August 22, 2003, at 03:23 PM, CPT John W. Holmes wrote: From: Pushpinder Singh Garcha [EMAIL PROTECTED] I am using an application where I retrieve user profile from a MySQL DB using the Company Name . I pass the name of the company to the PHP script as a '$_GET' parameter. e.g. when the name of the company is 'IBM'. , the URL with the query string would look like : http://masterstream.com/CRM/full_profile_1.php?name=IBM Now one of the records had a name : PSG Inc. , in this case the URL with the query string would look like http://masterstream.com/CRM/full_profile_1.php?name=PSG%20%20Inc. However in the case of the latter I am not able to pull out any records from the MySQL database. It says that no records with the name were found. I went ahead and tweaked the name of the company, to remove the sign in 'PSG Inc.' Now the query works fine. Can some one throw some light here. I am sure something minor is to be done when passing the name of the company in the parent script. The character separates variables in the query string, so it must be encoded if it appears in the data. Take a look at http://us2.php.net/urlencode ---John Holmes... -- 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