Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding form fields


akmac

Recommended Posts

Hi All,

 

I'm trying to add some more information to the contact us page-about four groupings of radio buttons. I'm adding them in static html to contact_us.php, but they are not being sent. I still only get the name, email address, and enquiry fields. :D

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

You'll need to retrieve them using $_POST

(unless you have register globals set, which you probably do) - in which case they should be available as global variables with the same name as your controls.

 

Bear in mind that the rules for retrieving radio button values are slightly different than other controls.

Link to comment
Share on other sites

You'll need to retrieve them using $_POST

(unless you have register globals set, which you probably do) - in which case they should be available as global variables with the same name as your controls.

 

Bear in mind that the rules for retrieving radio button values are slightly different than other controls.

 

I have register globals off. How would I format the request? Do I need to edit a file other than the contact_us_copy.php and its corresponding language file? It's working-except for not including the added fields...

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

I have register globals off.  How would I format the request?  Do I need to edit a file other than the contact_us_copy.php and its corresponding language file?  It's working-except for not including the added fields...

 

Or if it does include them, it's putting them in the wrong area/order. I've noticed that I can get it to list the selected radio options, but it only lists them in the three feilds defined on the original contact page. Do I need to make a db change to get it to work?

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Or if it does include them, it's putting them in the wrong area/order.  I've noticed that I can get it to list the selected radio options, but it only lists them in the three feilds defined on the original contact page.  Do I need to make a db change to get it to work?

 

Sorry-Edit time ran out. I think the problem maye be that for the three fields that work there are:

 

$name = tep_db_prepare_input($HTTP_POST_VARS['name']);

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);

$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

 

near the top of the code, but when I add my own:

 

$my = tep_db_prepare_input($HTTP_POST_VARS['my']);

$custom = tep_db_prepare_input($HTTP_POST_VARS['custom']);

$nonsense = tep_db_prepare_input($HTTP_POST_VARS['nonsense']);

 

They don't work. I know I'm missing something-if you know what it is please let me know. And again, my apologies for numerous posts to my own thread........

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...