You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Schultz, Gary - COMM" <GS...@commerce.state.wi.us> on 2004/08/12 16:04:17 UTC

form data array

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 
1-608-266-1283


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org