Code: Select all
<?php function form_array($arr, $iType, $size)
{reset($arr);
foreach($arr as $key => $value)
echo "<div><span class=\"left\">$value</span><input type=\"$iType\" name=\"$key\" size=\"$size\" /></div>";
}
?>
<html code stripped out as it is not necessary>
<form action="upload_user.php" method="post">
<?php form_array(array("tax_id" => "Resale certificate #:", "business_name" => "Business Name:",
"username" => "User Name:", "real_name" => "Name (Last, First)",
"store_address" => "Store Address:", "city" => "City:",
"state_country" => "State, Country:", "zip" => "Zip:",
"phone" => "Phone Number:", "fax" => "Fax",
"email" => "Email Address:"),"text","40");
?>
<More html code...>
<?php form_array(array("password" => "Password:", "confirm" => "Confirm Password:"),"password","40");?>
<span>
<input class="right" type="submit" name="submit" value="Submit" />
<input class="right" type="reset" value="Clear" />
</span>