PHP - Moved: How To Change Text Input Name With Radio Buttons?
This topic has been moved to JavaScript Help.
http://www.phpfreaks.com/forums/index.php?topic=357414.0 Similar TutorialsThis topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=316188.0 Hi, I need to analyze a string and get the text between, before, and after the forward slashes.. The string will always look something like this, but will vary: $str = "I will go to the store with <# one/two/three #> people." Then I need to create a form with radio buttons for each choice. In this case (one, two, or three). The text between the <# ... #> could be different every time, and with uknown amount of forward slashes. Here is what I have so far but it doesn't work. Code to find if there are slashes: Code: [Select] preg_match_all( '/([/]+)/',$str,$matches); Code to create html form .. Code: [Select] $i = 0; $html = '<form>'; foreach ($matches[0] as $match){ if ($pos = strpos( $str,$match ) ) === false ) continue; } $html .= '<input type="radio" name="place-' . $i . '" value=". $match . '" /> '; } $html .= '</form>'; Its not working as needed. I'm not sure how to create radio button choices for the words (one, two, three). Thanks This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=344655.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342245.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=319994.0 Code: [Select] if ($cartype = 1 ) { echo "Compact <br/>"; } elseif ($cartype == 2 ) { echo "Saloon <br/>"; } else if ($cartype == 3 ) { echo "SUV <br/>"; } This code will only display the first radio button atm. How do I fix this? I'm totally naive to php coding and i'm trying to modify my website which was written for me by someone else in php. So i'm kind of shooting in the dark - but my modification really isn't that difficult... here goes. I already have a form set up allowing the user to select values from drop down menus. To this I want to add a further selection from a choice of 4 radio buttons. This is the coding I've used (i've stripped it down to basics for simplicity) it's inserted between the 'form' tags <input type=radio name="choice" value="FP"> Front Print<br> <input type=radio name="choice" value="BP"> Back Print<br> <input type=radio name="choice" value="PP"> Pocket Print<br> <input type=radio name="choice" value="CP"> Custom Print<br> Ok - this part displays ok and seems to function as expected. The form 'Action' sends the user to another php page so i need to access these values on a different page. This is where I'm running blind. I just want a simple 'if' statement to set a variable based on the value of the radio buttons. So something that looks like this.... if (choice[1].checked=true) {$printchoice = "Front Print";} if (choice[2].checked=true) {$printchoice = "Back Print";} if (choice[3].checked=true) {$printchoice = "Pocket Print";} if (choice[4].checked=true) {$printchoice = "Custom Print";} This part doesn't work - i've tried various combinations but i'm just taking wild guesses. Any help would be much appreciated - thanks Hello guys. I am learning PHP little by little and am writing a VERY basic quiz. For functionality in the future I want to be able to change questions and answers in one "included" php doc. The problem i am having with my current code is that I would like to place a variable in the "value" definition on the radio input. I am unable to do this I guess. Any suggestions to accomplish the same thing? Sorry for my horrible code, this is the first thing I have written from scratch. The form page: Code: [Select] <?php include ("test.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <h2><? print $q1; ?></h2> <form method="post" action="test.php"> <input type="radio" name="q1answered" value="Basketball"/> <?php print $q1ans[0]; ?> <input type="radio" name="q1answered" value="Football"/> <?php print $q1ans[1]; ?> <br /><br /> <input type="submit" value="Submit Your Answer!" name="submit" /> </form> </body> </html> The php Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <?php //Enter all questions below $q1 = "What is your favorite Sport?"; $q2 = "What is your favorite hobby?"; //End Questions //Enter Asnwer choices for each question $q1ans = array("Basketball", "Football"); //End Answers //All question defined variables here to make grading easier $qbank = array ($q1, $q2,); if (isset($_POST["submit"])) { $choice = $_POST["q1answered"]; if ($choice == $q1ans[0]){ print "Your Favorite Sport is $q1ans[0]."; } else { print "Your Favorite Sport is $q1ans[1]."; } } ?> </body> </html> Thanks! I have made a form which includes text fields and radio buttons. The user completes the fields and makes their selections. Once the form is submit, they are then directed to a php file which displays their entries and selections. Atm I can't quite work out how to post their radio button selections. Here is the form: <legend>Car type</legend> <input name="cartype" type="radio" value="1" id="carone" /> <label for="carone">Compact</label><br /> <input name="cartype" type="radio" value="2" id="cartwo" /> <label for="cartwo">Saloon</label><br /> <input name="cartype" type="radio" value="3" id="carthree" /> <label for="carthree">SUV</label> and here is my current code for the text fields: <?php $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $emailaddress = $_POST['emailaddress']; $phone = $_POST['phone']; echo "Dear ". $firstname . " " . $lastname . ",<br />"; echo "Thank you for your order. <br />"; echo "Your contact details a - <br />"; echo "phone: " . $phone . "<br />"; echo "email: " . $emailaddress . "<br />"; ?> </body></html> If anyone could give a hand I'd be very grateful! Hi community. The radio buttons on my form suddenly stopped working. For the life of me I can’t figure out why. Everything seems to look fine. I did some moving around on servers so I wonder if something got messed up during the transfer. I’m wondering if a new version of PHP was installed and made something obsolete. I was wondering if someone could take a look. Thank you in advance for your advise.
<form action="brian_1.php" method="post" name="form1" id="form1"> <input name="name" type="text" id="name" size="30" tabindex="1"/> Company if Applicable: <input name="company" type="text" id="company" size="30" tabindex="2"/> Phone: <input name="phone" type="text" id="phone" tabindex="3" onkeypress="return formatPhone(event,this)" onkeydown="return getKey(event,this)" size="13" maxlength="12"/> Example: XXXXXXXXXX Alternate Phone: <input name="altphone" type="text" id="altphone" tabindex="4" onkeypress="return formatPhone(event,this)" onkeydown="return getKey(event,this)" size="13" maxlength="13"/> Example: XXXXXXXXXX Street Address:<input name="mail" type="text" id="mail" size="60" tabindex="5"/> City, State, Zip Code: <input name="city" type="text" id="city" size="60" tabindex="5"/> E-mail: <input name="emai" type="text" id="emai" size="60" tabindex="6"/> Would you like to be part of our mailing list? <label><input type="radio" name="list" value="Yes" id="RadioGroup1_0" tabindex="7"/>Yes</label><label><input type="radio" name="list" value="No" id="RadioGroup1_1" tabindex="8"/>No</label> Are you interested in volunteering for upcoming events? <label><input type="radio" name="volunteer" value="Yes" id="RadioGroup2_0" tabindex="9"/>Yes</label><label><input type="radio" name="volunteer" value="No" id="RadioGroup2_1" tabindex="10"/>No</label> Are you interested in becoming a sponsor by receiving opportunities to advertise through us? <label><input type="radio" name="opportunities" value="Yes" id="RadioGroup3_0" tabindex="11"/>Yes</label><label><input type="radio" name="opportunities" value="No" id="RadioGroup3_1" tabindex="12"/>No</label> Would you like to join our efforts by offering your services or products to further our cause? <label><input type="radio" name="cause" value="Yes" id="RadioGroup4_0" tabindex="15"/>Yes</label><label><input type="radio" name="cause" value="No" id="RadioGroup4_1" tabindex="16"/>No</label> If so, in what ways would you like to contribute? <textarea name="contribute" cols="60" rows="4"></textarea> <input type="submit" name="Submit" value="Sumbit" /><input type="reset" name="reset" id="reset" value="Clear" /> </form> <?php /* Email Variables */ $emailSubject = 'Contact Form'; $webMaster = 'brianewagnerfund@gmail.com'; $webMaster = 'matt@webskillsplus.com'; //$webMaster = 'murrterr@rcn.com'; /* Data Variables */ $name = $_POST['name']; $company = $_POST['company']; $phone = $_POST['phone']; $altphone = $_POST['altphone']; $mail = $_POST['mail']; $city = $_POST['city']; $emai = $_POST['emai']; if (isset($_POST["submit"])) { echo $_POST["list"]; } if (isset($_POST["submit"])) { echo $_POST["volunteer"]; } if (isset($_POST["submit"])) { echo $_POST["opportunities"]; } if (isset($_POST["submit"])) { echo $_POST["cause"]; } $contribute = $_POST['contribute']; $body = <<<EOD \r\n \r\n <br> Name(s): $name \r\n <br> Company if Applicable: $company \r\n <br> Phone: $phone \r\n <br> Alternate Phone: $altphone \r\n <br> Street Address: $mail \r\n <br> City, State, Zip Code: $city \r\n <br> Email: $emai \r\n <br> Would you like to be part of our mailing list? $list \r\n <br> Are you interested in volunteering for upcoming events? $volunteer \r\n <br> Are you interested in becoming a sponsor by receiving opportunities to advertise through us? $opportunities \r\n <br> Would you like to join our efforts by offering your services or products to further our cause? $cause \r\n <br> If so, in what ways would you like to contribute? $contribute \r\n <br> EOD; $from = "From: BrianEWagnerFund@gmail.com\r\n"; $from .= "Reply-To: ".$emai."\r\n"; $from .= "Content-type: text/html\r\n"; mail($webMaster, $emailSubject, $body, $from); /* Results rendered as HTML */ echo "<meta http-equiv=\"refresh\" content=\"0;URL=http://www.brianewagnerfund.org/thankyou.html\">"; ?> I have been at this for far too long and really need some help. I am just trying to check if a radio button has been set or not when someone hits submit. My validation looks something like this: function protect($string){ $string = trim(strip_tags(addslashes($string))); return $string; } if(isset($_POST['submit'])){ //protect and then add the posted data to variables $username = protect($_POST['username']); $password = protect($_POST['password']); $passconf = protect($_POST['passconf']); $email = protect($_POST['email']); $fname = protect($_POST['fname']); $lname = protect($_POST['lname']); $address = protect($_POST['address']); $phone = protect($_POST['phone']); $gender = $_POST['gender']; if(!$username || !$password || !$passconf || !$email || !$fname || !$lname || !$address || !$phone || !isset($gender)){ echo "<p>Please enter all required fields</p>"; }else{ and my form for the radio button is like this... <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <h1>General</h1> <p> <label for="username">Username: </label> <input type="text" name="username" value="<?=$_POST['username'] ?>" /> </p> <p> <label for="password">Password: </label> <input type="password" name="password" value="<?=$_POST['password'] ?>" /> </p> <p> <label for="passconf">Confirm Password: </label> <input type="password" name="passconf" value="<?=$_POST['passconf'] ?>" /> </p> <p> <label for="email">Email: </label> <input type="text" name="email" value="<?=$_POST['email'] ?>" size="25"/> </p> <p> <label for="fname">First Name: </label> <input type="text" name="fname" value="<?=$_POST['fname'] ?>" size="25"/> </p> <p> <label for="lname">Last Name: </label> <input type="text" name="lname" value="<?=$_POST['lname'] ?>" size="25"/> </p> <p> <label for="address">Home Address: </label> <input type="text" name="address" value="<?=$_POST['address'] ?>" /> </p> <p> <label for="phone">Primary Phone Number: </label> <input type="text" name="phone" value="<?=$_POST['phone'] ?>" size="10" /> </p> <p> <label for="genders">Gender: </label> <input type="radio" name"gender" value="male" /> Male <input type="radio" name"gender" value="female" /> Female </p> everytime i hit submit i get this error: "Notice: Undefined index: gender in C:\wamp\www\LoginRegistration\register.php on line 37 Please enter all required fields" can anyone help me please? I have been searching for something like this to use so I am trying to implement these ideas for my form but unable to get it to work. The concept is similar so I am posting here but if I would make a new post just let me know. it is not posting the info when the radio button is checked. Someone with a keener eye that mine can give a look and tell what I have done incorrectly it would be appreciated. Code: [Select] echo ' <form action="" method="get"><div id="avatar_section"> <div id="avatar_stack"> <p> <img src="herotmb/face0.png" alt="" /><input name="avatar[head]" type="radio" value="face0" checked="checked" /> </p> <p> <img src="herotmb/face0.png" alt="" /><input type="radio" name="avatar[face]" value="face0" /> <img src="herotmb/face1.png" alt="" /><input type="radio" name="avatar[face]" value="face1" /> <img src="herotmb/face2.png" alt="" /><input type="radio" name="avatar[face]" value="face2" /> <img src="herotmb/face3.png" alt="" /><input type="radio" name="avatar[face]" value="face3" /> </p> <span name="color"> <p> <img src="herotmb/color0.png" alt="" /><input type="radio" name="avatar[color]" value="black" id="black" onclick="color(black);" /> <img src="herotmb/color1.png" alt="" /><input type="radio" name="avatar[color]" value="brown" id="brown" /> <img src="herotmb/color2.png" alt="" /><input type="radio" name="avatar[color]" value="darkbrown" id="darkbrown" onclick="color(darkbrown);" /> <img src="herotmb/color3.png" alt="" /><input type="radio" name="avatar[color]" value="yellow" id="red" onclick="color(red);" /> <img src="herotmb/color4.png" alt="" /><input type="radio" name="avatar[color]" value="red" id="yellow" onclick="color(yellow);" /> </p> </span> '; $selected_radio = '$_POST[avatar[color]]'; if ($selected_radio == 'black') { echo ' <p> <img src="herotmb/hair0-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair0-black" /> <img src="herotmb/hair1-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair1-black" /> <img src="herotmb/hair2-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair2-black" /> <img src="herotmb/hair3-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair3-black" /> <img src="herotmb/hair4-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair4-black" /> <img src="herotmb/hair5-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair5-black" /> <img src="herotmb/hair6-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hair6-black" /> <img src="herotmb/hairNone-black.png" alt="" /><input name="avatar[hair]" type="radio" value="hairNone" /> </p>'; } else if ($selected_radio == 'brown') { echo 'Table 2 Here.'; } else if ($selected_radio == 'darkbrown') { echo 'Table 3 Here.'; } else if ($selected_radio == 'red') { echo 'Table 4 Here.'; } else if ($selected_radio == 'yellow') { echo 'Table 5 Here.'; } echo ' <p id="submit" > <input type="submit" value="Save" /> </p> </form>'; I'm not sure how to use foreach to send multiple form information to the database. <form> <input id="<?php print $row['id'];?>" name="attendance" type="radio" value="1" checked="checked" /> <input id="<?php print $row['id'];?>" name="attendance" type="radio" value="2" /> <input id="<?php print $row['id'];?>" name="attendance" type="radio" value="3" /> </form> I have a group of 3 buttons for three different options and this is in a php while loop,and there could be anywhere from 1 to 30 of these forms that ineed to send the data to the database at the same time. each one of these groups are next to a user to mark if they were present, tardy, or absent. I need it to get the id of the user for each one of these and send the value to the database as well. Hi guys...I need some help in matching data from results of checkboxs and radio buttons. My Intentions: There are 3 radio buttons and 8 check boxes. Users can select any one but cannot don't select at all. I separate the calss and categories because for classes, users can only select 1 option whereas for categories users can select many. For example, User select class 1 but do not select anything else and click submit...the system will then retrieve that he selected and check the data base if he have the pre requisites to allow him to go through. Coding for my form: Code: [Select] <form id="applicationoptions" method="post" action="s_apply_now.php"> <div id="optionshead">Class :</div> <div id="classoptions"> <input type="radio" name="class" value="1" /> Class 1 Permit <input type="radio" name="class" value="2" /> Class 2 Permit <input type="radio" name="class" value="3" /> Class 3 Permit </div> <div id="optionshead2">Categories :</div> <div id="catoptions"> <input type="checkbox" name="cat" value="1" /> CAT 2PG <input type="checkbox" name="cat" value="2" /> CAT 1OR <input type="checkbox" name="cat" value="3" /> CAT 2TT <br/><br/> <input type="checkbox" name="cat" value="4" /> CAT 3PG <input type="checkbox" name="cat" value="5" /> CAT 2OR <input type="checkbox" name="cat" value="6" /> CAT 3TT <br/><br/> <input type="checkbox" name="cat" value="7" /> CAT 4PG <input type="checkbox" name="cat" value="8" /> CAT 3OR </div> <div class="applynext"> <input class="applynextbutton" type="submit" name="applynextbutton" value="PROCEED" /> </div> </form> Lets say if user do not select any class, but select CAT 3PG, system will check if user have the pre-requisites before proceeding to next step. Any one can help me or give me hints?? most importantly is i do not know how to retreieve the values selected from the form. Is it possible to do it using php or must i hunt for javascript's script?? Thanks in advance guys...greatly appreciate. Hi, I have the below code which pulls pet types from the database, and when you pick the particular type by selecting a radio button amd press 'Select Pet Type' you are brought to a page listing all examples of that pet. Is there any way of changing this so the pet types are listed as hyperlinks instead and when you click each particular hyperlink you are brought to a page where that pet type is listed? <?php /* Program: PetCatalog.php * Desc: Displays a list of pet categories from the PetType table. Includes descriptions. * Displays radio buttons for user to check. */ ?> <html> <head><title>Pet Types</title></head> <body> <?php include("misc.inc"); #12 $cxn = mysqli_connect($host,$user,$password,$dbname) #14 or die ("couldn't connect to server"); /* Select all categories from PetType table */ $query = "SELECT * FROM pettype ORDER BY petType"; #18 $result = mysqli_query($cxn,$query) or die ("Couldn't execute query."); #20 /* Display text before form */ echo "<div style='margin-left: .1in'>\n <h1 style='text-align: center'>Pet Catalog</h1>\n <h2 style='text-align: center'>The following animal friends are waiting for you.</h2>\n <p style='text-align: center'>Find just what you want and hurry in to the store to pick up your new friend.</p> <h3>Which pet are you interested in?</h3>\n"; /* Create form containing selection list */ echo "<form action='ShowPets.php' method='POST'>\n"; #33 echo "<table cellpadding='5' border='1'>"; $counter=1; #35 while($row = mysqli_fetch_assoc($result)) #36 { extract($row); #38 echo "<tr><td valign='top' width='15%' style='font-weight: bold; font-size: 1.2em'\n"; echo "<input type='radio' name='interest' value='$petType'\n"; #43 if( $counter == 1 ) #44 { echo "checked"; } echo ">$petType</td>"; #48 echo "<td>$typeDescription</td></tr>"; #49 $counter++; #50 } echo "</table>"; echo "<p><input type='submit' value='Select Pet Type'> </form></p>\n"; #54 ?> </div> </body></html> I have a table that shows all the users in my table. Each user is either a user or an admin. I have radio buttons for each user determining if they are a user or an admin Right now I have each RB group named userlevel0, userlevel1, userlevel2 etc.. How can I get all the groups dynamically? I attempted an html array but failed. Hi. Im pretty sure this is easy but ive been trying for hours and looked all over the web but cant seem to do it. I have information submitted to my database which I then retrieve on another page. I retrieve the landlord name and group the same values together plus retrieve an overall rating which I average and sort by. This works and is done using: Code: [Select] $sql="SELECT landlord_name, AVG(overall) FROM $tbl_name GROUP BY landlord_name ORDER BY AVG(overall) DESC"; $result=mysql_query($sql); // Start looping rows in mysql database. while($rows=mysql_fetch_array($result)){ Where Im finding it difficult though is I have 5 radio buttons with values from 1-5 and want one of them to be checked if the value matches the averaged overall rating. What I've tried is: Code: [Select] if (AVG(overall)==1){ $check1="checked";} if (AVG(overall)==2){ $check2="checked";} if (AVG(overall)==3){ $check3="checked";} if (AVG(overall)==4){ $check4="checked";} if (AVG(overall)==5){ $check5="checked";} then in the form: Code: [Select] <table width="600" border="1" cellspacing="0" cellpadding="3"> <tr> <td><? echo $rows['landlord_name']; ?></td> <td><div class="avg"><form> <input type="radio" value="1" disabled="disabled" checked= "<? $check1 ?>" /> <input type="radio" value="2" disabled="disabled" checked= "<? $check2 ?>" /> <input type="radio" value="3" disabled="disabled" checked= "<? $check3 ?>" /> <input type="radio" value="4" disabled="disabled" checked= "<? $check4 ?>" /> <input type="radio" value="5" disabled="disabled" checked= "<? $check5 ?>"/> </form></div> </td> </tr> </table> To make it a bit more difficult, the AVG(overall) value will not always be an integer from 1-5 and will need to be rounded to the closest one. Think i can use ROUND for this but dont know how to put it in. Thanks for your help in advance. As you can probably tell im new to php and still learning the basics. Hey all, I'm somewhat new to PHP and working on a form and trying to make radio buttons sticky. I've tried the following but when I refresh/got back to the page then now matter what button I chose it always shows the "4" bedroom or "No". What size of unit do you require? <input type="radio" name="unitsize" value="1 Bedroom" <?php if (isset($_POST['unitsize']) == '1 Bedroom') echo 'checked'; ?>> 1 bedroom <input type="radio" name="unitsize" value="2 Bedroom" <?php if (isset($_POST['unitsize']) == '2 Bedroom') echo 'checked'; ?>> 2 bedroom <input type="radio" name="unitsize" value="3 Bedroom" <?php if (isset($_POST['unitsize']) == '3 Bedroom') echo 'checked'; ?>> 3 bedroom <input type="radio" name="unitsize" value="4 Bedroom" <?php if (isset($_POST['unitsize']) == '4 Bedroom') echo 'checked'; ?>> 4 bedroom Do you require an accessible unit?</td> <input type="radio" name="accessible" value="Yes" <?php if (isset($_POST['accessible']) == 'Yes') echo 'checked'; ?>> Yes <input type="radio" name="accessible" value="No" <?php if (isset($_POST['accessible']) == 'No') echo 'checked'; ?>> No Any help or suggestions are greatly appreciated. I'm trying to create a database driven poll to allow users to "like" or "dislike" each video on my site. But instead of radio buttons and a submit button I want to use images with jquery handling the submit when a choice is made. I have found 2 tutorials that each accomplish part of what I want. This tutorial has a poll which is perfect because I can pass in a poll id (which will be the same value as my video id) and it will load that video's poll. http://www.webresourcesdepot.com/ajax-poll-script-with-php-mysql-jquery/ This tutorial replaces the radio buttons with images. http://www.weblee.co.uk/2009/05/30/radio-button-replacement-with-style/ I have them both working separately on this page http://aaronhaas.com/poll2/ I can't seem to figure out how to combine the two together. The poll script generates its html inside of a php function. In the code below I have commented out the line ( getPoll(1) ) that calls the function and replaced it with the html it generates to make it easier to see what is going on. Another problem is each form has a different action so both actions somehow need to be combined together into a function. I was hoping someone might want to see if they can combine the two together and post it as a tutorial or demo. Code: [Select] <?php require("inc/db.php"); require("inc/functions.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ajax Poll Script - Demo</title> <!-- styles and js for poll --> <script src="inc/js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="inc/js/poll.js" type="text/javascript"></script> <style> body { font-family: Arial, Helvetica, sans-serif; font-size: 1em; } #pollWrap{ width: 550px; margin-left:40px; } #pollWrap h3 { display:none; color:red; font-size: 1em; margin-bottom: 5px; display:none; } #pollWrap ul { margin: 0; padding: 0 0 0 5px; } #pollWrap li { padding: 0; /*overflow:hidden;*/ /*for our lovely friend IE6 to behave nicely*/ font-size: 0.8em; display: inline; } #pollWrap li span { font-size: 0.7em; } .pollChart { margin-left: 25px; height: 10px; width:1px; /*Adding rounded corners to the graphs - Optional - START*/ -moz-border-radius-topright: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; /*Adding rounded corners to the graphs - Optional - END*/ } #pollSubmit { margin-top: 5px; } #pollMessage { color:#C00; font-size: 0.8em; font-weight: bold; } </style> <!-- styles and js for image radio buttons --> <link rel="stylesheet" type="text/css" href="css/radio.css"> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/radio-demo.js"></script> </head> <body> <div id="greenlight"> <div id="options"> <ul id="list"> <li class="active"><a href="#" class="option1 active" id="link1"><span>Option</span></a></li> <li><a href="#" class="option2" id="link2"><span>Option</span></a></li> </ul> </div> <!-- close options --> <form action="step2.html" method="post" id="radioform"> Green Light: <input name="option1" type="radio" value="option1" id="option1" checked="checked" /><br /> Cancel: <input name="option1" type="radio" value="option2" id="option2" /><br /> </form> <!-- <p><a href="#" class="toggleform">Show Hidden Form Radion Buttons</a></p> --> <?php // getPoll(1); //$pollID ?> <div id="pollWrap"> <form name="pollForm" method="post" action="inc/functions.php?action=vote"> <h3>Poll Question 1</h3> <ul> <li> <input name="pollAnswerID" id="pollRadioButton1" value="1" type="radio"> Answer1 for Poll1 <span id="pollAnswer1"></span> </li> <li class="pollChart pollChart1"></li> <li> <input name="pollAnswerID" id="pollRadioButton2" value="2" type="radio"> Answer2 for Poll1 <span id="pollAnswer2"></span> </li> <li class="pollChart pollChart2"></li> </ul> <input name="pollSubmit" id="pollSubmit" value="Vote" type="submit"> <span id="pollMessage"></span> <img src="ajaxLoader.gif" alt="Ajax Loader" id="pollAjaxLoader"> </form> </div> </div><!-- close greenlight --> </body> </html> |