more values in one input in form

Hello, before i start please sorry for my english, I’m not from english speaking country so my english is not that good.

my Question:
is there any possibility to put 2 or more values in one input type ?

I have this code :
[php]<input type=“radio” name=“xxx” value=“1100 dollars” onclick=‘check_value(this, 1)’">[/php]
(that onclick=‘check_value(this, 1)’ is javascript counting system its irelevant)

and in form.php
[php]<? echo $_POST["xxx"]; ?>[/php]

This what i posted works but its only show in form.php ‘1100 $ dollars’ but i want to for example :
mac book - 1100 dollars.

my idea is something like this :
<input type=“radio” name=“xxx” value=“1100 dollars” value2=“macbook” onclick=‘check_value(this, 1)’">
and when i confirm it i want in form.php
macbook 1100 dollars

I tried it with this code:


and in post.php


<? echo $_POST["xxxcena"]; ?>

<? echo $_POST["xxxtyp"]; ?>

But it dont work (only shows one product no matters what i chose from my options in form).

Once again im very sorry for my bad english and i hope someone of you understand what i need. Thanks for any help. -exer

[php] [/php]

needs to be

[php] [/php]

this don’t work too.
When i have more options let’s say:


<input type="radio" name="xxxcena" value="PRICE" onclick='check_value(this, 2)' />
<input type="hidden" name="xxxtyp"  value="PRODUCT2" />[/php]

and in form.php


<? echo $_POST["xxxcena"]; ?>

<? echo $_POST["xxxtyp"]; ?>


Whatever i chose it always show the Last option (in this case it shows Product2).

both inputs are named xxxcena. you need unique names for each input

xxxcena have to be same - its radio input and its work

i need help in xxxtyp because when im renamed xxxtyp1 xxxtyp2 how can i write to $_post only what he chosed.

Heres my idea
• item 1 - 300$
• item 2 - 200$
• item 3 - 1500$

and when che chose for example item 2 in form.php it show to him :

You chosed item 2 for 200$

Sponsor our Newsletter | Privacy Policy | Terms of Service