Prattler logo

Prattler LIVE (and in code)

The following showcases bits of the webapp - click on the PHP to RUN the script, click on the CODE to see what is happening underneath.

I did the whole phpmyadmin thing to create the tables, then ensured there was enough data in the tables to actually test what I was doing BEFORE fiddling around with interface.

I made some nav and used a bit of html to control it before embedding php containers amongst it - seemed tidier.

[branding], [authentication stuff]
[space to say what is on your mind]

then this bit repeats

  [the actual prattle goes here]  
They said
[icon] [name] said this on [date] at [time]

for as many prattles as there are

I used tables (see the code) because, well, I could - nested tables inside tables lets me conditionally surround bits of the structure with php also, which is kinda nifty

I stole an icon set for users and we are well on the way to a functional app.

Component Parts:

  1. The table create, data insertion and modification scripts that need to be done first (der) script

  2. connect.php that has the username, db name and so on - something similar to this (code)

  3. list all tweets, arranged reverse chrono in alltweets.php (code)

  4. nominate a prattler by id (currently 0..4) someonetweet.php (code)

  5. dynamically generate a list of prats to pick their feed from someoneonlist.php (code)

  6. rudimentary authentication (user name and password) checklogin.php (code)

  7. authenticated details about a particular prat loginandshowstuff.php (code)

  8. say something (unauthenticated) saysomething.php (code) - this has been disabled to prevent spam, sorry

  9. Mess with session variables as a way to pass stuff from one form to another.
    (1) collect name, rank and serial number of a soldier using a form and storting the posted values in session variables, verify the details have been "posted" sess1play.php (code) then
    (2) jump to a separate page and have those values retreived from the session sess2play.php (code) then
    (3) provide the user opportunity to throw away stored data sess3play.php (code)

    Some rudimentary checking that something was posted (by checking if a session variable was actually stored), second page makes NO reference to POST values, which is nice. the 3rd page provides a "logout" facility, sort of, by optionally destroying stored session variables use this in prattler...


©2012 wonkoSOFT