I’m working with a client and setting up this form for them. I’m trying to have the user be able to add a new name and email record into the account table. Once they submit it should display the 10 newest records below the form. Appreciate any help.
class account{
function account(){
$this->id = ’ ‘;
$this->name = ‘’;
$this->email = ‘’;
}
function find_account($id){
$sql="select id
from account
where id
=’".$id."’";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)){
$row[‘id’]; //int pk auto incerment
$row[‘name’]; //varchar(50)
$row[‘email’]; //varchar(50)
$row[‘timestamp’]; //varchar(15)
}
}
}
name:
email:
Last 10 entry:
<?php echo "id: ".$account->id;?>
<?php echo "name: ".$account->name;?>
<?php echo "email: ".$account->email;?>