Javascript form submit and radio buttons?


Posted on 16th Feb 2014 07:03 pm by admin

When this form is submitted, it is automatically resubmitted using JS.

All my fields are carried over in the $_post except for total, and state which are radio buttons and a drop down.

Code: <p><input type="radio" name="Total" value="30" /> 1 Ticket - $30</p>
<p><input type="radio" name="Total" value="50" /> 2 Tickets - $50</p></td>
</tr>
<tr><td><p><strong>First Name:</strong></p>
<p><INPUT TYPE="text" NAME="FirstName" VALUE="<?=$_POST['FirstName']?>"></p></td>
<td><p><strong>Last Name:</strong></p>
<p><INPUT TYPE="text" NAME="LastName" VALUE="<?=$_POST['LastName']?>"></p></td></tr>
Obviously I can't change the value of Total to $_POST['Total'] since that hasn't been set yet. What can I do here?

No comments posted yet

Your Answer:

Login to answer
67 Like 11 Dislike
Previous forums Next forums
Other forums

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Turning Data into URLs?
This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don'

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

Async WSAConnect failed on XP with error code = 2 ("File not found")
Hi all,

I have very strange bug, please help me if you can.

It is reproduced o

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash