drop down box - shoutbox

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
friet
Forum Newbie
Posts: 2
Joined: Wed Mar 31, 2004 7:26 am

drop down box - shoutbox

Post 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?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post 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.
friet
Forum Newbie
Posts: 2
Joined: Wed Mar 31, 2004 7:26 am

Post by friet »

Thnx, do you have an example from such a form and the test? (/me kinda real noob :)
Post Reply