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] |
|
|
[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:
- The table create, data insertion and modification scripts that need to be done first (der) script
- connect.php that has the username, db name and so on - something similar to this (code)
- list all tweets, arranged reverse chrono in alltweets.php (code)
- nominate a prattler by id (currently 0..4) someonetweet.php (code)
- dynamically generate a list of prats to pick their feed from someoneonlist.php (code)
- rudimentary authentication (user name and password) checklogin.php (code)
- authenticated details about a particular prat loginandshowstuff.php (code)
- say something (unauthenticated) saysomething.php (code) - this has been disabled to prevent spam, sorry
- Mess with session variables as a way to pass stuff from one form to another.
Aims:
(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
...to use this in prattler...
©2012 wonkoSOFT