I am making a guestbook script I'll be using combo, listboxes and paging for the entries can anyone give me some tricks on how to do this? thanks guys...

Dani AI

Generated

The original question from asked about combo/listboxes and paging for a guestbook. suggested a tutorial resource and pointed toward using a database. Building on that, a practical approach is to store each guestbook entry as a row with some metadata (timestamp, an auto-id, IP or moderation flag) and use a modern DB API (PDO or mysqli) with parameterized queries to avoid SQL injection; see the . Always set the connection charset to utf8mb4 and escape displayed text with htmlspecialchars to prevent XSS (htmlspecialchars).

For paging and listbox-driven filters, fetch only the rows needed rather than the whole table. Standard pagination uses LIMIT/OFFSET with a COUNT(*) for total pages; for very large tables consider keyset pagination (filter by a last-seen id) to avoid expensive OFFSET scans. Ensure a deterministic ORDER BY and index the column(s) used for ordering and filtering. Use GET for filter params so results are bookmarkable, validate filters server-side, and provide a clear way to reset filters. If using AJAX, preserve browser history with pushState so back/forward works.

Operational and security notes: avoid deprecated mysql_* APIs, add server-side validation and CSRF protection for write actions, and deploy simple anti-spam (rate limits, captcha, moderation queue). Profile slow queries and add indexes before complex rewrites. For security-focused references, consult OWASP’s XSS and SQL injection guides: and SQLi Prevention.

Recommended Answers

All 2 Replies

Go to w3schools.com this will help you

I'm using PHP MySQL and I'm not an expert but if I were in your position I'd first make a database for your messages with columns for email, name and message as basic variables at MySQL.

and using PHP I'd use the insert query for the messages then simply out put them, I'd also probably include a refresh in the form.

Be a part of the DaniWeb community

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