RE: problem of transmiting variabl into another page?

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

 



<?php for ($j=ord('A'); $j <= ord('Z'); $j++) {
   echo "| <b><a href='alpha.php?artist=".chr($j)."'>".chr($j)."</a></b> ";

 } ?>

You need to use the ORD function to get the numerical ascii equivalent of the letter and the CHR function to go back the other way.

Bastien


From: Mohamed Yusuf <myainab@xxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  problem of transmiting variabl into another page?
Date: Fri, 2 Dec 2005 12:30:12 +0200

I am transmitting variable from one of my pages and I would like to match
that variable into mysql data. it won't return data.
my code is this.

<?php for ($j=A; $j <= Z; $j++) {
   echo "| <b><a href='alpha.php?artist=$j'>$j</a></b> |";
   if ($j == Z) {
   break;
  }
 } ?>
this code in my index page prints alphabetical letters from A-Z. and I woul
like to transmit that variable into my alpha.php page and select mysql
database what ever the value of $j is, but i have problem I can't figured
out what is wrong. can somebody help me.

--
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