Jump to content

need array for form data using forms name, fieldid and DB table name


jasonc

Recommended Posts

I wish to add another layer to my existing array

 

at present i have the forms field name/id, i.e. 'fieldid1' and the text that is shown beside the text field 'User name'

 

$formarray= array('fieldid1'=>'User name', 'fieldid2'=>'Name');

 

what i wish to add is a new layer to this array to include the database field name which will be a shorter name than that which is shown to the viewer filling out the form

 

I wish to have say...

'fieldid1' as the fieldid,

'hdyfu' as the database field name,

'How did you find us' would be the text beside the text field to be filled out.

 

can someone guide me on how i do this please.

 

redoing the whole site so the database and the form fields are the same is not an option as their are way to many forms to redo so adding in a new layer seems the only and best way that this can be done.

not sure.

 

something like this

 

$array['fieldid1'][1] = "Username"; // field id name

$array['fieldid1'][2] = "Please enter your username:"; // text thats shown beside the field

$array['fieldid1'][3] = "name"; // database field name

 

$array['fieldid2'][1] = "Email"; // field id name

$array['fieldid2'][2] = "Please enter your email address:"; // text thats shown beside the field

$array['fieldid2'][3] = "email"; // database field name

 

and so on

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.