Page 1 of 1

drop down box - shoutbox

Posted: Wed Mar 31, 2004 7:26 am
by friet
Hi,

little question.

I have a shoutbox on my site wich shows the last 20 entries.

$shoutbox->listlimit = "20";

How can let the users choose how many they want to see? With a drop down menu or something?

Posted: Wed Mar 31, 2004 7:28 am
by kettle_drum
Put in a drop down box in a form, probably wants to use GET. Then just do:

$shoutbox->listlimit = some_data_check($_GET[value]);

Make sure to check the value for various things so you dont expose XSS or allow somebody to call the last million posts and kill your server.

Posted: Wed Mar 31, 2004 8:09 am
by friet
Thnx, do you have an example from such a form and the test? (/me kinda real noob :)