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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

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

Echo-ing MySQL content and Keep Formatting?
I have data in my MySQL such as:

QuoteBlah blah

Blah blah

etc
but when i ech

mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Page doesn't expand for content
Hi. I've been testing a query I made. It's here http://lapr1.6te.net/inquerito.php
The page doesn

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

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