Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.