Forum Moderators: coopster

Message Too Old, No Replies

Please Help with Simple PHP

         

bzprod

11:00 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



Hello,

I am using Advanced Guestbook to allow my users to submit quotes. Everything is working great, however, I need a bit of customization. Here goes.

- I would like to display a random entry (from book_data, Comment) on a seperate page on my site.

In other words, my guestbook is located on one page, and on another page I would like to add a random entry (only the entry part, not name, email, etc).

Can anyone tell me how to do this? I imagine it is pretty simple for someone that knows what they are doing.

I would think that I simply need to connect to the database, grab a random entry, and display it on a page.

If anyone can help, I would be very thankful.

-Patrick

mincklerstraat

11:26 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're probably going to have to get to know some php or find someone to help you in a more formal capacity, this isn't really a 'go write some code for me' sort of forum. What you need to do is exactly how you explain it - and since we don't know your database structure, so it'll be difficult to determine how to grab that random entry. See the forum charter. If you want to do it yourself, have fun learning php (it can be tremendously fun), and come back with more specific questions when you get stuck.

hiker_jjw

11:38 pm on Sep 20, 2004 (gmt 0)



If you pull all the data entries from the database, you can usually use the shuffle() function to mix things up a bit. Your question is a bit more detailed than that, but I hope that helps some.