Gossamer Forum
Home : General : Perl Programming :

Help with select box

Quote Reply
Help with select box
Hi Guys, I havnt been in here for ages!! wow its good to be back

I have the following piece of code

Code:
$domainpc = 0;
$domain_pc = "";

while ($domainpc < 10){

$domainpc++;

$domain_pc .= "<option value='".$domainpc."'>".$domainpc."\n";

}

Which displays a select box in a fom with the values 1 - 10 however, i want it to display 0 - 10 how can i accomplish this?
Regards

Mark
http://www.host4.me.uk

No doubt i'll be back for more answers!
Quote Reply
Re: [mdj1] Help with select box In reply to
Hi Mark,

just adjust the condition as below

$domainpc <= 10

Hope that helps!

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Help with select box In reply to
He also needs to move:

$domainpc++

...below the second line of code =)

Last edited by:

Paul: Jul 21, 2003, 1:54 AM
Quote Reply
Re: [Paul] Help with select box In reply to
Yes, that's right. Thanks for correct that.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Help with select box In reply to
Thanks for that guys


I will give it a try!
Regards

Mark
http://www.host4.me.uk

No doubt i'll be back for more answers!