Dear Friends,
Help me to write a script for create dynamic list menus in php.
Simply, my need is retrieve value from URL & create list menus according to the value that we retrieved from URL.
Ex : site.com/text.php?no=4
Should be displayed 4 text boxes

Thank you friends.

Recommended Answers

Hello Shalomd,

If you can provide the code you have so far, that would be helpful so the members on this site can help you with the exact issue you are having.

What does "should be displayed in 4 text boxes mean"?

Jump to Post

All 3 Replies

Hello Shalomd,

If you can provide the code you have so far, that would be helpful so the members on this site can help you with the exact issue you are having.

What does "should be displayed in 4 text boxes mean"?

Hi JorgeM,
Still I am planning.
If the value is 4, I wants to display 4 text boxes

Member Avatar

here's a simple skeleton:

$output = '';
for($x=0;$x<$num;$x++))
{
    $output .= "whatever"; 
}

echo $output;

So $num is the number in the url. However if all your textboxes are the same (same name attribute), then you can do this:

echo str_repeat("whatever", $num);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.