Re: [PHP-WIN] Looking for code for an alphabetic menu in php

2009-05-22 Thread Joseph LeBlanc
Make sure you filter $letter before using it in the query. Replace $letter = $_GET["letter"] with this: preg_match('/^[A-Z]/', $_GET["letter"], $matches); $letter = $matches[0]; If you don't do this, someone could insert malicious SQL into the $letter variable. This regular expression will m

Re: [PHP-WIN] Looking for code for an alphabetic menu in php

2009-05-22 Thread Richard Quadling
2009/5/22 James Crow : > Bill Mudry wrote: >> >> With the botanical wood tree that I have been working on, the number of >> records for >> genera and for species can get quite large and unwieldy. Presently I have >> over 6,000 >> species records that takes a while to load let alone try to browse >>

Re: [PHP-WIN] Looking for code for an alphabetic menu in php

2009-05-22 Thread James Crow
Bill Mudry wrote: With the botanical wood tree that I have been working on, the number of records for genera and for species can get quite large and unwieldy. Presently I have over 6,000 species records that takes a while to load let alone try to browse through. I need to chop this up into qu

Re: [PHP-WIN] Looking for code for an alphabetic menu in php

2009-05-22 Thread Sascha Meyer
Hi Bill, I don't know if I got you right but I hope this will help: [CODE] $baseLink = "index.php?letter="; // Assuming your file name is "index.php"; set up the base link for all pages //alphabetical links for($a=65;$a<(65+26);$a++){ print "".chr($a)."\n"; } if (isset($_GET["letter"]) &&

Re: [PHP-WIN] Looking for code for an alphabetic menu in php

2009-05-21 Thread Lester Caine
Bill Mudry wrote: With the botanical wood tree that I have been working on, the number of records for genera and for species can get quite large and unwieldy. Presently I have over 6,000 species records that takes a while to load let alone try to browse through. I need to chop this up into que