Home    Cart    Free Download    Manual

Installation:
  Free Downloads
  The H2O Family
  Install Notes

Programming:
  Prerequisites
  H2O Whitepaper
  Online Manual
  Code Examples
  H2O Free Support


What's H2O?
H2O is programming made for the web.

What's it like?
H2O is English-like. If you know some Perl, VB, ASP, or PhP you'll be immediately productive in H2O. It runs on Linux, Mac, Unix, and Windows.

How do I try it?
Download H2O for free. Get it from hosting providers. Or buy on-line.

Where does H2O come from?
The language was invented by Aestiva. H2O stands for:
   HTML with
   HTML/OS
   Overlays.


Load Record into HTML Form

The code below shows how to load a record into an HTML form.

At the top of the page is an Overlay with a DBGETREC tag. This tag loads fields from a record into variables. Please note that this example includes a hard-coded record. In practice the record would be set in a previous page.

DBGETREC loads variables with fields. If you have a field called ABCDEF, then when the DBGETREC tag is run, it sets the variable ABCDEF using the value in the field ABCDEF. It does this across all fields defined for the record.

Note that in H2O, if an HTML form has an input with a name that matches a variable, then the form element is loaded from the variable automatically.

As a result, calling DBGETREC is all you need to load data from a record into an HTML form. Remember to set your form's names to those of your fields.

Also note that we added a Save Changes button to the form. When it's clicked it calls save_changes which updates the record (using DBEDIT, which loads variables into fields, the reverse of DBGETREC).

dbgetrec.html



<html>
<<
dbname="/mydbnamehere"
dbrec=34
DBGETREC(dbname,dbrec)
>>

<form method=post action=save_changes>
<input type=hidden name=dbrec>
First Name: <input type=text name=fname size=20><BR>
Last Name: <input type=text name=lname size=20><BR>

E-mail: <input type=text name=email_address size=20><BR>
Full Name: <input type=text name=user_name size=20><BR>
Password: <input type=password name=password size=20><BR>
<input type=submit name=mychoice value="Save Changes">
</form>
</html>

<<overlay save_changes
DBEDIT("/demo2/db/sample",dbrec)
GOTO PAGE
>>


Home | Cart | Free Download | Online Manual
COPYRIGHT © 2005 Aestiva, LLC. ALL RIGHTS RESERVED.