Split results by character

wachusfleish 08 Aug, 2008
Hi, I would like to know how can I pass the character selected by href (like [A] [B] [C]....)to the next form so that i can use it to look for names starting by that character in a txt file.
Thanks.
GreyHead 08 Aug, 2008
Hi wachusfleish,

The simple way is not to have two forms but to use some php in the form html to display a form that looks very different. Something like this:
<?php
if ( $letter == "" ) {
  // show the basic form
} else {
  include $letter."filename.txt";
  // show some other code
}
?>

You can use showForm($_POST) to redisplay the form.

Bob
wachusfleish 09 Aug, 2008
Is it possible to do it some way like this:
<a href="index.php?&option=com_chronocontact&chronoformname=desinstalapaquetes&letter=a">[ A ]</a>
Cause i don't really understand what you explained me before.
wachusfleish 09 Aug, 2008
By the way the code i posted before doesn't work
Max_admin 09 Aug, 2008
Hi wachusfleish,

Yes, I think there was some misunderstanding as there was not much explanation at the first post, your last solution should work ok🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
wachusfleish 10 Aug, 2008
But it doesn work.
I don't know where the problem is.
In the next form i just execute echo $letter; and this doesn´t work. have i missed something?
Thanks
Max_admin 10 Aug, 2008
<?php echo $_GET['letter']; ?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
wachusfleish 11 Aug, 2008
Thank you again for your help. All is working for now.
This topic is locked and no more replies can be posted.