Re: [PHP] '&' Sign in _GET Parameter

2003-08-24 Thread AciD
Try this :
$link = $row[company];
echo ("");
--
www.cpm-fr.com


Thanks for the link,
$link = $row['company'];\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] bug in code - can't find it!

2003-08-14 Thread AciD
just a little point; u can replace

by 
which is better imho.

AciD


On Wed, 6 Aug 2003 14:57:23 -0700, Jennifer Goodie 
<[EMAIL PROTECTED]> wrote:


Ok, here is my query and the bit of code I can't figure out:

$query = "SELECT * from apt_user_t a, apt_company_t b ";
$query .= "WHERE a.user_cd = b.user_cd ";
$query .= "ORDER BY a.username";
$search_results = mysql_query($query) or die("Select
Failed!");
while ($search_result2 = mysql_fetch_array($search_results))
{

TYPE="checkbox"
NAME=""
SIZE="20"
MAXLENGTH="50"
VALUE="
1){?>CHECKED"> 
}
Nothing shows up with the echo or the value.  I only included this
checkbox, but all of the other values show up fine.  Can someone give me 
a
hint?
Mysql does not prefix returned columns with table_name., so there's 
probably
no "a.retired_flag" index in your array.  A simple way to check this 
would
be to print_r($search_result2).  If you have a column named retired_flag 
in
both table a and table b and you specifically want the one from table a 
in
your result set you are going to have to alias it to a different name in
your query, i.e. "SELECT *, a.retired_flag as r_flag"





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


[PHP] Re: suggestion on php-editor?

2003-08-10 Thread AciD
I use PHPed from nusphere (www.nusphere.com),
it's a very good editor which can work under windows or linux.
On Fri, 8 Aug 2003 09:57:45 +0200, Rush <[EMAIL PROTECTED]> wrote:

"Louie Miranda" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
But i was wondering if you guys have any other suggestions?
For the extensive list see Keith's listof editors:

http://linuxbackup.co.uk/

rush
--
http://www.templatetamer.com/





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