Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

forms


maxrenn

Recommended Posts

Hi,

 

I've created an order form for my site by copying and modifying the contact us form, but I've run into a problem, I don't recieve the information properly. The name and email address boxes work fine, It's the other boxes I have. I changed the enquiry box to "Full address" and added another one which has space to type your order (for ordering without an account) and another box for typing payment method preferred. When I tested this I just got an email with the name, email address but no other information, any ideas what I've done wrong?

 

Alternativley I've created my own form outside of oscommerce using HTML but I don't know what values to put on the action and method attributes and my server host hasn't got a clue. Has anyone got any idea how I can find this out?

 

Thanks in advance.

Link to comment
Share on other sites

Near the top of the file contact_us.php you will find the following:

 

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

 

You need to append your new form variables to it by concantenating $enquiry using .=

 

eg.

 

$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);[/
   $enquiry .= "\n" . tep_db_prepare_input($HTTP_POST_VARS['your_variable']);

 

 

Matti

Link to comment
Share on other sites

Near the top of the  file contact_us.php you will find the following:

 

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

 

You need to append your new form variables to it  by concantenating $enquiry using .=

 

eg.

 

$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);[/
? ?$enquiry .= "\n" . tep_db_prepare_input($HTTP_POST_VARS['your_variable']);

Matti

 

Thanks alot for that, that's fixed the first box "full address" but I added 2 other boxes, a text area and a normal input box and I can't figure out what I need to add to make these two boxes work correctly.

 

Thanks in advance :D

Link to comment
Share on other sites

Thanks alot for that, that's fixed the first box "full address" but I added 2 other boxes, a text area and a normal input box and I can't figure out what I need to add to make these two boxes work correctly.

 

Thanks in advance  :D

 

 

You can just do the same again:

 

$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);[/
  $enquiry .= "\n" . tep_db_prepare_input($HTTP_POST_VARS['your_variable']);
  $enquiry .= "\n" . tep_db_prepare_input($HTTP_POST_VARS['your_next_variable']);

 

etc. :-D

 

Matti

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...