Have two files like so:
PHP Code:
<?php
// add.php - adds data and checks user
// connect to database and such
// where ppd is a field in the database 'acronymed' to posts per day
$query = "SELECT ppd FROM user_table WHERE username='$username'";
$result = mysql_db_query("database",$query) or die("Failed query on line ".__LINE__);
$cl = mysql_fetch_object($result);
if ($cl->ppd >= 3) {
print "Sorry, you have exceded the limit for today.";
} else {
$query = "INSERT INTO table_name VALUES ('','','','')"; // add your values and all that stuff here
mysql_db_query("database",$query) or die("failed query on line ".__LINE__);
}
mysql_close();
?>
Now have a file that lets the user add the info into the database:
Code:
<form action="add.php" method="POST">
username <input type="text" name="username">
text <textarea cols=30 rows=10 name="post"></textarea>
<input type="submit">
</form>
Hope this helps.
-Vic