473,379 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How to make third radio button option?


i'am not so good in php, but i have a script with 2 radio options and i want to make it 3

this are the radio options below third one i made myself the problem is in the php what do i have to add there?

Expand|Select|Wrap|Line Numbers
  1. <img alt="Coco 1" src="coco1.png"   name="bet" id="bet" style="cursor: pointer;" onClick="selects(0);"></td>          
  2.                                     <td align="center" width="44%">          
  3.                                     <img alt="Coco 2" src="coco2.png"   name="bet" id="bet" style="cursor: pointer;" onClick="selects(1);"></td> <td align="center" width="44%">        
  4.                                     <img alt="Coco 3" src="coco3.png"   name="bet" id="bet" style="cursor: pointer;" onClick="selects(2);"></td> 
the php script

Expand|Select|Wrap|Line Numbers
  1. <?php include("setting.php"); ?>
  2. <?
  4.     setcookie("wingdtrans","",time()-3600);
  6.     $level = $_POST['level'];    //multi purchase option
  7.     $ref = $_GET['ref'];
  8.     $bet = $_POST['bet'];
  10.     //do some field checking here
  11.     if ($bet<0 || $bet>1 || $level<1 || $level>$_cost_level) {
  12.         header("Location: index.php");
  13.     }
  15.     if ($_usecookie==1) {
  16.         setcookie("wingdtrans","yes",time()+3600);
  17.     }
  19. ?>
i (think) i know i have to make the THIRD option somewhere here (see below) but i have no idea what code to use
Expand|Select|Wrap|Line Numbers
  1. if ($bet<0 || $bet>1 || $level<1 || $level>$_cost_level)
hope someone can help me i'am already on this for weeks

i thank you kindly in advance
May 3 '11 #1
1 1704
8,658 Expert Mod 8TB
Iím not sure what you understand by "radio option", but when I think of that, it is something like
Expand|Select|Wrap|Line Numbers
  1. <input type="radio" name="bet" value="1">
  2. <input type="radio" name="bet" value="2">
  3. <input type="radio" name="bet" value="3">
the problems I see in your code:
- duplicate ids. ids must be unique!
- although they can have a name, images ainít submitted in a form (only form control elements (input, button, textarea) do so.
May 4 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Owen Funkhouser | last post by:
I have a form with three radio options. And I have three buttons: <input type="submit" name="mainform_action" value="Edit Data"> <input type="submit" name="mainform_action" value="View Data">...
by: Quiller | last post by:
Hello. I have a group of radio buttons (all with the same name) and I'm trying to set a property of one of them using this code --- document.desc.color.deps = new Array('q10', 'q11', 'q15'); ...
by: muralidharan_vak | last post by:
Hi guys, I am using dynamic radio button list using javascript, actually i got a radio list .when i click those buttons ,it doesn't allow to check.please help me resolve this problem.. option...
by: Sheau Wei | last post by:
i want to make a search engine for may database. i want to make the radio option at the search engine, but how to handle the search at the radio and the text field
by: Scott D Johnson | last post by:
I am using Visual Studio .NET 2003 (I also have VS .NET 2005 installed) I have a group of four radio buttons, and button, to set the first radio button as checked. When I run the app, and say...
by: kenia | last post by:
Hi everyone! I'm using the DOM standard to create a set of radio buttons, but I can't select any of them. It means that they appear in the page, but when I click on any of them nothing seems to...
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck...
by: Z.K. | last post by:
I started a forms application and I put on the form three buttons. In the functions for the radio buttons I put in a single messagebox like: MessageBox("Hello 1") MessageBox("Hello 2") ...
by: alive84 | last post by:
Hi everyone, I am going nuts with radio/option buttons. Maybe someone can give me a hint how to solve my issue. Problem: I have three fields with radio buttons, External <> Internal <> N/A...
by: ahmurad | last post by:
Dear all, I am new group user, computer science graduate; just have joined this established group and thanks to all. I am working in network field but so much interested in web (PHP) field. Recently...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.