okay, it sounded as if you were just asking somone to write the whole script for you... that usually makes me just ignore the post.. but what the hey, I'll give you all the meet
step one : Create a mysql table
CREATE TABLE task_list
(
task_list_unique_id INT NOT NULL AUTO_INCREMENT,
email CHAR( 40 ) NOT NULL ,
tasks_completed SMALLINT NOT NULL ,
PRIMARY KEY ( `task_list_unique_id` )
);
Then :
<?
//PUT YOUR MYSQL LOG IN STUFF HERE
if($form_submitted)
{
$sql = "
INSERT INTO
task_list
(
email,
tasks_completed
)
VALUES
(
'$email',
'$tasks_just_completed'
)
";
mysql_query($sql);
$message_start = "Now that you have added <B>$tasks_just_completed</B> tasks, ";
}
$sql = "
SELECT
SUM(tasks_completed) as tasks_completed
FROM
task_list
";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$tasks_completed = $row['tasks_completed'];
echo "$message_start","There have been a total of <B>$tasks_completed</B> tasks_completed
Enter More tasks?
<FORM METHOD=POST ACTION=this_php_script.php><INPUT TYPE=hidden NAME=form_submitted VALUE=1>
<TABLE>
<TR>
<TD>Your Email Address</TD>
<TD>Tasks You Have completed</TD>
</TR>
<TR>
<TD><INPUT TYPE=TEXT NAME=email></TD>
<TD><INPUT TYPE=TEXT NAME=tasks_just_completed></TD>
</TR>
<TR>
<TD COLSPAN=2 ALIGN=right><INPUT TYPE=SUBMIT VALUE='Add Tasks'></TD>
</TR>
</TABLE>
";
?>
this of course was just written of of the top of my head and is not just a copy/past solution (I didn't test a single line of it)