RE: [PHP-DB] Escaping &

From: Date: Fri, 13 Jul 2001 03:33:24 +0000
Subject: RE: [PHP-DB] Escaping &
Groups: php.db 
Request: Send a blank email to php-db+get-10367@lists.php.net to get a copy of this message
dynamic link, i think he means something like echo "<a href=\"customer_details.php?customer=$customer\">Customer</a>\n"; or whatever, and as for making it so that you can include a "&" in the $customer variable in the example above, try this; echo "<a href=\"customer_details.php?customer=" . urlencode($customer) . "\">Customer</a>\n"; </beau> // -----Original Message----- // From: Ken Sommers [mailto:mrsql.php@worldnet.att.net] // Sent: Friday, 13 July 2001 11:27 AM // To: Rankin, Randy; php-db@lists.php.net // Subject: Re: [PHP-DB] Escaping & // // // Please explain the dynamic link . // is that in the documentation somewhere>? // // Kne // ----- Original Message ----- // From: "Rankin, Randy" <randy.rankin@invensys.com> // To: <php-db@lists.php.net> // Sent: Thursday, July 12, 2001 8:18 AM // Subject: [PHP-DB] Escaping & // // // > Hello, // > // > I have a table in a MySQL DB (RH Linux/Apache) with a field called // > customer_name. Some of the customer names have an // ampersand in them (ie; X // & // > X Supply). I am performing a select statement on this // table to create a // > sales summary with customer name and total sales. // > // > This works fine; however, I am also creating a dynamic link on the // customer // > name so that the user can click on it to get a detailed // report of sales to // > that customer. This works great EXCEPT for the customers // with ampersands // in // > thier names. The result of clicking on these customers // indicates a "No // > Records found for X" where X is the letter immediately // preceding the // > ampersand. // > // > Does anyone know how to get around this? // > // > TIA, // > // > Randy Rankin // > // > -- // > PHP Database Mailing List (http://www.php.net/) // > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net // > For additional commands, e-mail: php-db-help@lists.php.net // > To contact the list administrators, e-mail: // php-list-admin@lists.php.net // > // // // -- // PHP Database Mailing List (http://www.php.net/) // To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net // For additional commands, e-mail: php-db-help@lists.php.net // To contact the list administrators, e-mail: // php-list-admin@lists.php.net //

« previous php.db (#10367) next »