[suspicious - maybe spam] How to deal with " ...?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm working in a database of products.  Until now I'm able to do
search, retrieve data for display, etc... but my problem is with
products that use " .... example:

(This is the way the data is stored in de DB)

Esmerilador manual 5" - 6"
Sierra de mano 7" - 8"
Sierra portatil 10" - 16"
Sierra de banco 10" - 24"
Sierra gasolina 12" - 14"
Taller Industrial 6" - 12"

I'm retrieving the data with mysql_fetch_array... What I need to do is
to present the name of the product as a link to a form for quotation
purposes...but, here is the result (i'm passing other variables too):

- - - - - - - - - - PHP CODE
while ( $row = mysql_fetch_array($resultado03) ) {
echo("codigo:". $row['codigo'] ." | familia: <strong><a
href=\"".$_SERVER['PHP_SELF']."?familia03=".$row['familia']."&cat02=$cat02&cat03=$cat03&cat04=$cuadro04\">".
$row['familia']."</a></strong><br> \n");

- - - - - - - - - - -HTML RESULT - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
<a href="/beta1/bd_backup_02.php?familia03=Esmerilador manual 5" -
6&cat02=3&cat03=32&cat04=322">

but the first " broke my link into two diferent strings, so, i'm not
able to pass the whole string and the other variables (cat02, cat03,
cat04) to the quotation page.

I'd tried addslashes, but I think isn't what I need. I tried also
replacing the " with ' in my PHP code, but it didn't work.

Any advice would be apreciated.

PS- Sorry for my english, but isn't my natural language.

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux