// the following line is necessary in order
// to deserialize back to a PHP object
MyObj.php_class_name = "myclass";

MyObj.name = name;
MyObj.age = age;
MyObj.ssn = ssn;
...

// Create a new serializer "object" to do our work for us
MySer = new WddxSerializer;
// Serialize the Message variable into a WDDX Packet
MyWDDXPacket = MySer.serialize(MyObj);
// Output WDDX Packet so we can see what it looks like
return MyWDDXPacket;
}
Now you can use this in a page which is its own form action:
<?php
// don't forget to include the class definition from above!
if (!isSet($wddx_packet))
$MyObj = new myclass();
else
$MyObj = wddx_deserialize($wddx_packet);
?>
<html>
<head>
<script language="JavaScript">
<!--
function Init() {
// sets the form's text-elements
tmp = document.MyForm;