cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schultz, Gary - COMM" <>
Subject form data array
Date Thu, 12 Aug 2004 14:04:17 GMT
I have a form that uses inputs with names that exactly match the database
table field names. In PHP I can use $_POST to create a form data array that
grabs all the data from the form and enter into the corresponding named
field in the database. For example, I have a form with over 100 fields, and
it is nice to simply grab all form field information at once in a data
array. Does Cocoon/ESQL offer something similar to php $_POST? I have
included a snippet of PHP code (utilizing PHP ADODB) to demonstrate what I'm
looking for:

$rsP = $connP->Execute($sql); # Create record set
reset ($_POST); # Reset form data array
$_POST["SENTDATE"] = date("n/j/y g:i:s A"); # Set the post date to today's
date and time of submittal, and add to the array
$insertSQLP = $connP->GetInsertSQL($rsP, $_POST); # Create record insertsql
statement using the data array
$connP->Execute($insertSQLP); # Insert the record into the database

Gary T. Schultz
Web Technical Administrator / GIS Coordinator
Wisconsin Department of Commerce
6th Floor
P.O. Box 7970
Madison, WI 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message