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

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spo

Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote

Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:

Can a php script be

Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

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