TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 1,186
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 614
  • Total: 614

Custom php

Started by handoyo, December 08, 2009, 03:44:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

handoyo

Hi all,i'm new to tiny portal..I'm wondering suppose for eample i want to display random words of the day on the left block.What should i do?I know a little php mysql..Where can i start?Thanks a lot guys...

Lesmond

Welcome to Tinyportal handoyo

You could search for "Random Word Generator"

handoyo

Is it on http://www.tinyportal.net/index.php?topic=23876.msg192556#msg192556 ? Should i just paste the code on the php block?Thanks Lesmond

Lesmond

yeah thats the one, php block is correct, there is about 3 versions in that topic :)

handoyo

Ok,by the way,what if i'm intending to use database to hold the data an get the words from it?Are there any tutorial about it with tp/smf?Thanks...

Lesmond

Will have to wait for someone else to answer that one, me and databases dont get on   :o :tickedoff:

handoyo

Ok,thanks Lesmond.God Bless You..  ;D

JPDeni

You'd have to give more information about how you want your database set up to be. But it would be easier to just keep it in the code if you're just putting out a random word.

If you want to keep the same word for every person for a whole day, that's a whole different concept than displaying a random word. So I need you to fully explain what you want to do before I write any new code.

handoyo

Hi JPDeni,actually i'm intending to put random bible verse.. The database structre should be like i.e.

id     name       verse                                          text
1     matthew   6:10    Thy kingdom come, Thy will be done in earth, as it is in heaven.

It will be shown once in a day and shown for every person....On the next day,it will be radomized again..Thanks...



JPDeni

Okay. I think I can do that. It would be easier if you just set which verse would be the verse of the day or if it was a new random one every time the page is reloaded, but I can probably find a place to store what the random verse is for the day. I'll take a look at where the best place would be to store it.

This website is proudly hosted on Crocweb Cloud Website Hosting.