Gorotsuki Tenshi (aekiy) wrote,
Gorotsuki Tenshi

  • Mood:

Webby stuffs

So, in my curiosity to learn more about PHP and SQL, and how they can function together, have begun writing a chat program. It's very simple so far, basic stuff. My main influence is of course IMC, that being the role playing chat site have been going to for a few years now.  (^*^);

So far, this much is stored in the database:
Users (account number, user name, password)
Posts (account number, handle, time, date, type, post number)
Handles (account number, handle, tag line, image URL)

First, you log in. The code checks entered user and pass against entries in the database, and either logs you in, or says no. If the user/pass are valid, it sets a cookie for access to posting, storing your username and account number (not password, of course).

Once you're logged in, you can post. The first thing the page does (if no specific action is being taken), is print up the last seven posts in the database. (All posts are numbered.)

The next thing it does is give you the interface: It pulls up all entires in the handles table matching the currently logged in account number. It displays those in a drop-down option list. Then it gives you another option list for posting type: In Character, or Out of Character. Out of Character is the default, since most people start out that way; saying hello, discussing characters, etc. Plus, figure it's better to accidentally post OOC than IC, so mya.

Next, we have a blank text area for entering a post. No biggy. It can fit a bunch in there. Am not even sure how much. More than you need, ee. After that, is the Scroll back option. You can scroll back as many posts as you like, depending on how many are actually available. Right now, it only displays posts made the same day. This'll be tweaked later.

Then, of course, there's the Send / Update button. If you don't type anything in the "Post" box, all it will do is reload the page, showing the most recent X posts (again, seven by default; more if the Scroll back option is changed). This is a good way to check if there are new posts without posting anything. If you do post, of course, the system will add your post to the database, giving it a number once higher than the last post before it. (It actually assigns a value equal to the amount of posts already in the database; since the first post is labeled as 0, the amount of posts will always be one number higher than the last entry.)

When displaying posts, it cycles through a list, pulling out entries to be displayed. It first picks up all the post data (including number of the account it was posted by, handle that was used by that account, the time of the post, the date of the post, the type of post [ic / ooc], and the post number). After that, it checks the user list for a matching account number, and pulls up the user name for that account. The first line of each post displays that user name on the left side, and the date, time, and post number on the right side.

After this, it picks up the tag line and image URL that match that post's handle and account number, and on the next line displays the handle name of the left column, and the tag line in the right column. The next line contains the image (if any) on the left column, and the post itself on the right. After that, is a horizontal line to separate posts from each other.

Technically speaking, SQL being the wonderful little language that it is, the post, user, and handle data are actually all picked up at the same time.  (^*^);  They're only used and printed out sequentially, hee.

So far, that's about it. Nothing for signing up for accounts, adding handles, or editing image URLs and tag lines. Those are yet to come.  (^*^)  If anyone's curious though, the page can be accessed using the guest account. Both user and password are: guest ( http://www.miniverse.nu/chattest.php )


Anyways.. today was pretty cool.  (^*^)  Nothing spectacular, ah guess. But nothing horrible! Which is great, ee. My belly hasn't been bothering me as much (been having crampy things), and the veggie burger for breakfast really hit the spot.  (^*^)  hee.

Havin' fun talkin' with aska_langley.. she been so chipper lately, even though she sick.  (^*^)  Is always good to have fun and get along. Never mind the comments about vampiric buns.. ee, oof

Been spendin' more time outside. This is good. Sunlight is a healthy thing. In Florida, you can't escape it. In New Jersey, you have to go outside and catch it, and hope it doesn't catch you back. (New Jersey's atmosphere acts like something of a microwave: gotta love those fertile industries, makin' all them little noxious babies.)

A little bit of exercise, walkin' around, doin' push ups, stuff like that. Need to make a regular habit of goin' out with gloves and a bag to collect trash with. So much litter and junk the just floats on the wind, mya.


There's a whole other discussion, ee. It's so wonderful watching how the world has all these processes that work together to help recycle things, and keep things in balance. It doesn't always work all that efficiently, mainly because we humans have the ability to screw it up faster than it can fix itself. Just like we do to ourselves. People drink / smoke / etc., and gradually that sorta thing can surpass your body's natural ability to correct itself.

If it weren't for humans, the world'd probably be fine. The problem is probably in how fast we move forward. Ah mean, considering the span of human history, all this pollution junk is pretty darn recent. Only in the past few generations, mya? The world seems to like to work more slowly, for the most part. We humans say "Must move fast, must move fast: Go, go, go!" And then we go and complain about the stress, and how everything's moving to fast.  (^*^);  :giggle:

There was a special on NJN, ah didn't get to catch all of it.. it was on a couple of months ago, and ah don't remember what it was called, or who it was that put it together.  (^*^);  Some doctor of something-or-other, I think.. ee

It was a four- part show about the natural world. About how seamlessly everything runs together, and how beautiful it can be, when you really look at it. And mostly, about how the world it self is a living thing. The planet we live on, in its entirety, is a living organism. We're all just a part of it. It's not just that we breath the air, and walk on the ground, and drink the water. We are the air we breathe, the water we drink, the ground we walk on, the trees we live in.. Or well, okay, maybe we don't all live in trees.  (^*^);  But you get the idea!

It was a wonderful show.. sad that ah missed it. Aa well. Still, it is so wonderfully interesting to see how the world works. There are just so many processes that together work toward recycling the environment, and making things more hospitable. We don't even necessarily have to stop polluting for the world to be okay. We just have to slow down quite a bit, so that we don't turn this whole world into a toxic ball of ew.

It is really sad that we don't even bother to change to the much more efficient, and less pollutant technologies that are readily available. Ah mean, why? There is no sensible reason. Greed, blah-di-blah. If we were both greedy and intelligent, we'd realize that changing over to the better things would help make a better, happier world for all of us, and we could bask in the betterness of it. Rar.. but it's become somewhat apparent that people don't actually want to be happy. They want to be miserable, and fat. What's that all about? Sheesh.


Well, enough of my rambling for tonight.  (^*^)  Am just sort of catching up on a lot of non-posting, s'pose. ee.. We'll see how this continues later, ee. G'night!

  • (no subject)

    Our precious kitty Clarissa is having some serious health problems, but we don't have enough money right now to get the blood tests she needs.…

  • On fantasy characters:

    If you had to distill fantasy character archetypes into just a few key terms (warrior/soldier, mystic/shaman, wizard/scholar, what have you), what…

  • First Day of NaNoWriMo

    Crawled out of bed an hour ago. Just finished eating breakfast and watching an episode of R.O.D -THE TV-. So much sneezing. No progress so far.

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.