Jump to content

jomok

New Members
  • Posts

    2
  • Joined

  • Last visited

jomok's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can somebody help me out with a beginners PHP Quiz for School? "Use the information below to finish the input form. The user should be able to add a new name and email record into the account table and display the 10 newest records below the form." I have caught the increment typo and I think I got the form action. Is there anything I am missing? How do I get the 10 newest records to show below the form? Thanks 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 increment $row['name']; //varchar(50) $row['email']; //varchar(50) $row['timestamp']; //varchar(15) } } } <htm|> <body> <div> <form action='#'> <form action="#" method="post"> name: <input type='text' name='account_name'> email:<input type='text' id='account_email'> <input type="button" value="submit"> </form> </div> <div style="border:solid 1px #F6O;"> Last 10 entry: </div> <div style="border:solid 1px #OOO;"> <?php echo "id: ".$account->id;?> <?php echo "name: ".$account->name;?> <?php echo "email: ".$account->email;?> </div> </body> </htm|> php_test.pdf
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.