Hmmmm Something Nifty

  • Thread starter Thread starter Jon
  • 10 comments
  • 349 views

Jon

(Banned)
Messages
4,925
This is one of those LoudMusic suggestions. It wouldn't be much just to be something cool to see. If you could write a code or find one that would tell you how many times people used to quick express or actually hit the new reply button. It would be interesting to see.
 
Yeah, it would be interesting, but I don't know if it would be interesting enough to do all of the work to get it working! :)
 
Originally posted by Jordan
Yeah, it would be interesting, but I don't know if it would be interesting enough to do all of the work to get it working! :)

Meh, that would be quite easy! Assuming that both ways use the same form handler to actually write the post:

Create a new table "Posttracker" in MySQL:
Express: Bigint
Post: Bigint
Notrack: Bigint

Then put a hidden field in each form:

<input type="hidden" name="replytype" value="express">

or

<input type="hidden" name="replytype" value="post">

Then in the form handler:

PHP:
if($replytype == "express")
{
    $typetracked = mysql_query("UPDATE Posttracker SET Express = Express +1");
}
elseif($replytype == "post")
{
    $typetracked = mysql_query("UPDATE Posttracker SET Post = Post +1");
}
else
{
    $typetracked = mysql_query("UPDATE Posttracker SET Notrack = Notrack +1");
}

If different form handlers are used, you wouldn't need to worry about the if...elseif...else system, you'd just do the if...else to test for the relevant method for the form handler.

I do this sort of thing quite often for usage tracking.
 
You're quite a developer, Giles! :)
 
Originally posted by GilesGuthrie
Meh, that would be quite easy! Assuming that both ways use the same form handler to actually write the post:

Create a new table "Posttracker" in MySQL:
Express: Bigint
Post: Bigint
Notrack: Bigint

Then put a hidden field in each form:

<input type="hidden" name="replytype" value="express">

or

<input type="hidden" name="replytype" value="post">

Then in the form handler:

PHP:
if($replytype == "express")
{
    $typetracked = mysql_query("UPDATE Posttracker SET Express = Express +1");
}
elseif($replytype == "post")
{
    $typetracked = mysql_query("UPDATE Posttracker SET Post = Post +1");
}
else
{
    $typetracked = mysql_query("UPDATE Posttracker SET Notrack = Notrack +1");
}

If different form handlers are used, you wouldn't need to worry about the if...elseif...else system, you'd just do the if...else to test for the relevant method for the form handler.

I do this sort of thing quite often for usage tracking.
Unbelievable....

I would even know where to start with PHP and MySQL.
 
uhm...not yet...I had one...I still have it...an AOL site...I just need to lay it out really well...the AOL site builder sucks cause you can't overlap stuff...
 
Back