[Add New Contact]
 
Contacts: Source code for listContacts.mv:
<MIVA description         = "mysqlcommerce lib demo address book; listing page"
      author              = "Eric de Groot"
      authoremail         = "eric@justaskthem.com"
      standardoutputlevel = "html,text,compresswhitespace">
 
<MvASSIGN name  = "g.username"
          value = "****">
<MvASSIGN name  = "g.password"
          value = "****">
<MvASSIGN name  = "g.database"
          value = "mysqlcommerce_demo">
 
<b>[<a href="editContact.mv?contact=new">Add New Contact</a>]</b><br>
<br>
 
<b>Contacts:</b>
<ul>
 
<MvASSIGN name  = "l.sql"
          value = "select * from contacts">
<MvCOMMERCE metamethod = "mysqlcommerce"
            fields     = "username,password,database,sql">
    <MvIF expr = "{ mysql_error }">
         Error selecting records! (&[mysql_error];)[&[mysql_errno];]<br>
        <MvCOMMERCESTOP>
    <MvELSE>
        <li><a href="editContact.mv?contact=&[id];">&[firstName]; &[lastName];</a></li>
    </MvIF>
</MvCOMMERCE>
 
</ul>