Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Closed Thread
how can i assign a number value to radio button choices
Old 01-17-2010, 08:21 AM how can i assign a number value to radio button choices
Webmaster Talker

Posts: 611
Trades: 0
i have the code set up so that it rates a friend from very bad to excellent, and puts it in the database. but i want to make the form values a number so i can average it and rate the friend based on a grade from A to F. currently, its just "very bad" or "excellent" stuff like that, stored in the database, here is my code so far.

Code:
<?php
include("connect1.php");

////////////////////////////////////////
////////////////////////////////////////

/// query db and loop through rows example
$id    = $_POST['id'];
$field2 = $_POST['friend'];
$field3   = $_POST['zip'];
$field4   = $_POST['grade1'];
$field5   = $_POST['grade2'];
$field6   = $_POST['grade3'];
$field7 = $_POST['grade4'];
 


 
      
    
    
       mysql_query("INSERT INTO friendgrade (friend,zip,loyalty,courtesy , stability, attitude)VALUES('$field2','$field3','$field4','$field5','$field6' , '$field7')");
      
 
       


?>
<!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=iso-8859-1" />
<title>Update Statement</title>
<style type="text/css">
<!--
.style1 {color: #990000}
.style2 {color: #0066FF}
.style3 {color: #0000CC}
.style4 {color: #993399}
-->
</style>
</head>

<body>

 </p>
 <div align="center">WELCOME TO THE FRIENDGRADER</div>
<p>Please enter a friend, their zip code, and rate them with the following criteria.<span class="style4"></span><br />
</p>
<form id="form1" name="form1" method="post" action="">

  <table width="90%" border="0">
    
    <tr>
      <td>Friend</td>
      <td>
        <input name="friend" type="text" id="friend" /></td>
    </tr>
    <tr>
      <td width="32%">zip code</td>
      <td width="68%">
       <input name="zip" type="text" id="zip" />
      </td>
    </tr>
    <tr>
      <td>courtesy</td>
      <td><table width="345">
        <tr>
          <td width="337"><label>
            <input type="radio" name="grade1" value="very poor" id="RadioGroup1_0" />
            very poor
            <input type="radio" name="grade1" value="poor" id="RadioGroup1_1" />
poor
<input type="radio" name="grade1" value="ok" id="RadioGroup1_2" />
ok
<input type="radio" name="grade1" value="good" id="RadioGroup1_3" />
good
<input type="radio" name="grade1" value="excellent" id="RadioGroup1_4" />
excellent
</label></td>
        </tr>
       
      </table>
      </td>
    </tr>
   
   
    <tr>
      <td>stability</td>
      <td><input type="radio" name="grade2" id="very_poor3" value="very_poor" />
very poor
  <input type="radio" name="grade2" id="poor3" value="poor" />
poor
<input type="radio" name="grade2" id="ok3" value="ok" />
ok
<input type="radio" name="grade2" id="good3" value="good" />
good
<input type="radio" name="grade2" id="excellent3" value="excellent" />
excellent</td>
    </tr>
    <tr>
      <td>loyalty</td>
      <td><input type="radio" name="grade3" id="very_poor4" value="very_poor" />
very poor
  <input type="radio" name="grade3" id="poor4" value="poor" />
poor
<input type="radio" name="grade3" id="ok4" value="ok" />
ok
<input type="radio" name="grade3" id="good4" value="good" />
good
<input type="radio" name="grade3" id="excellent4" value="excellent" />
excellent</td>
    </tr>
    <tr>
      <td>attitude</td>
      <td><input type="radio" name="grade4" id="very_poor5" value="very_poor" />
very poor
  <input type="radio" name="grade4" id="poor5" value="poor" />
poor
<input type="radio" name="grade4" id="ok5" value="ok" />
ok
<input type="radio" name="grade4" id="good5" value="good" />
good
<input type="radio" name="grade4" id="excellent5" value="excellent" />
excellent</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
  </table>
   
</form>


</body>
</html>
silverglade is offline
View Public Profile
 
 
Register now for full access!
Old 01-17-2010, 08:29 AM Re: how can i assign a number value to radio button choices
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
value="nn"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-17-2010, 11:26 AM Re: how can i assign a number value to radio button choices
Webmaster Talker

Posts: 611
Trades: 0
awesome chris!! you rock. derek please see below

Last edited by silverglade; 01-17-2010 at 12:03 PM..
silverglade is offline
View Public Profile
 
Old 01-17-2010, 11:55 AM Re: how can i assign a number value to radio button choices
Webmaster Talker

Posts: 611
Trades: 0
i got it to enter the database , now i want to average the input and grade the "friend" . but i get a blank screen when i load it. please any more help greatly appreciated to see what is wrong with my code.
here is the new code

Code:
<?php
include("connect1.php");

////////////////////////////////////////
////////////////////////////////////////

/// query db and loop through rows example
$id    = $_POST['id'];
$field2 = $_POST['friend'];
$field3   = $_POST['zip'];
$field4   = $_POST['grade1'];
$field5   = $_POST['grade2'];
$field6   = $_POST['grade3'];
$field7 = $_POST['grade4'];
 
 
$field4 = (int)$field4;
$field5 = (int)$field5;
$field6 = (int)$field6;
$field7 = (int)$field7;
 
      
    
    
       mysql_query("INSERT INTO friendgrade (friend,zip,loyalty,courtesy , stability, attitude)VALUES('$field2','$field3','$field4','$field5','$field6' , '$field7')");
      
 $total = 4;
$sum = $field4 + $field5 + $field6 + $field7;       
$average = $sum/$total;

 if ($average <= 1)  
  echo "Your friend has a grade of <strong>F.</strong> ";
  
if ($average <= 2)  
  echo "Your friend has a grade of <strong>D.</strong> ";

if ($average <= 3)  
  echo "Your friend has a grade of <strong>C.</strong> ";
 
if ($average <= 4)  
  echo "Your friend has a grade of <strong>B.</strong> ";

 if ($average <= 5)  
  echo "Your friend has a grade of <strong>A.</strong> ";
 }
?>
<!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=iso-8859-1" />
<title>Update Statement</title>
<style type="text/css">
<!--
.style1 {color: #990000}
.style2 {color: #0066FF}
.style3 {color: #0000CC}
.style4 {color: #993399}
-->
</style>
</head>

<body>

 </p>
 <div align="center">WELCOME TO THE FRIENDGRADER</div>
<p>Please enter a friend, their zip code, and rate them with the following criteria.<span class="style4"></span><br />
</p>
<form id="form1" name="form1" method="post" action="">

  <table border="0">
    
    <tr>
      <td>Friend</td>
      <td>
        <input name="friend" type="text" id="friend" /></td>
    </tr>
    <tr>
      <td>zip code</td>
      <td>
       <input name="zip" type="text" id="zip" />
      </td>
    </tr>
    <tr>
      <td>courtesy</td>
      <td><table>
        <tr>
          <td> 
            <input type="radio" name="grade1" value="1" id="RadioGroup1_0" />
            very poor
            <input type="radio" name="grade1" value="2" id="RadioGroup1_1" />
poor
<input type="radio" name="grade1" value="3" id="RadioGroup1_2" />
ok
<input type="radio" name="grade1" value="4" id="RadioGroup1_3" />
good
<input type="radio" name="grade1" value="5" id="RadioGroup1_4" />
excellent
 </td>
        </tr>
       
      </table>
      </td>
    </tr>
   
   
    <tr>
      <td>stability</td>
      <td><input type="radio" name="grade2" id="very_poor3" value="1" />
very poor
  <input type="radio" name="grade2" id="poor3" value="2" />
poor
<input type="radio" name="grade2" id="ok3" value="3" />
ok
<input type="radio" name="grade2" id="good3" value="4" />
good
<input type="radio" name="grade2" id="excellent3" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>loyalty</td>
      <td><input type="radio" name="grade3" id="very_poor4" value="1" />
very poor
  <input type="radio" name="grade3" id="poor4" value="2" />
poor
<input type="radio" name="grade3" id="ok4" value="3" />
ok
<input type="radio" name="grade3" id="good4" value="4" />
good
<input type="radio" name="grade3" id="excellent4" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>attitude</td>
      <td><input type="radio" name="grade4" id="very_poor5" value="1" />
very poor
  <input type="radio" name="grade4" id="poor5" value="2" />
poor
<input type="radio" name="grade4" id="ok5" value="3" />
ok
<input type="radio" name="grade4" id="good5" value="4" />
good
<input type="radio" name="grade4" id="excellent5" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
  </table>
   
</form>


</body>
</html>

Last edited by silverglade; 01-17-2010 at 12:08 PM..
silverglade is offline
View Public Profile
 
Old 01-17-2010, 12:43 PM Re: how can i assign a number value to radio button choices
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
POST values are returned as strings you will need to cast them to integer values before performing the addition.

AND echoing values out BEFORE the DTD is not a good idea
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-17-2010, 01:24 PM Re: how can i assign a number value to radio button choices
Webmaster Talker

Posts: 611
Trades: 0
thanks again. here is the new code, i cant get it to go into the database now, and i cant get the $grade variable thats new to go in. any more help GREATLY appreciated. i havent changed the echos yet.

here is the new code

Code:
<?php
include("connect1.php");

////////////////////////////////////////
////////////////////////////////////////


// escape username and password for use in SQL//person said on board "looks fine" like this
//to prevent sql injections
 
$field2 = mysql_real_escape_string($field2);
$field3 = mysql_real_escape_string($field3);
 

/// query db and loop through rows example
 
$field2 = $_POST['friend'];
$field3   = $_POST['zip'];
$field4   = $_POST['grade1'];
$field5   = $_POST['grade2'];
$field6   = $_POST['grade3'];
$field7 = $_POST['grade4'];
 
 

 $field4 = (int)$field4;
$field5 = (int)$field5;
$field6 = (int)$field6;
$field7 = (int)$field7;

    if(isset($_POST['Submit'])){
 $total = 4;
$sum = $field4 + $field5 + $field6 + $field7;       
$average = $sum/$total;

$grade = "null";


 if ($average <= 1)  
 $grade = "F";
  echo "Your friend has a grade of <strong>F.</strong> ";
  
if ($average > 1 && $average <= 2)  
  $grade = "D";
  echo "Your friend has a grade of <strong>D.</strong> ";

if ($average > 2 && $average <= 3)  
   $grade = "C";
  echo "Your friend has a grade of <strong>C.</strong> ";
 
if ($average > 3 && $average <= 4) 
   $grade = "B"; 
  echo "Your friend has a grade of <strong>B.</strong> ";

 if ($average > 4 && $average <= 5)  
   $grade = "A";
  echo "Your friend has a grade of <strong>A.</strong> ";
 
 }//end if
 
 
   mysql_query("INSERT INTO friendgrade (grade , friend,zip,loyalty,courtesy , stability, attitude)VALUES('$grade', '$field2','$field3','$field4','$field5','$field6' , '$field7')");
  
?>
<!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=iso-8859-1" />
<title>Update Statement</title>
<style type="text/css">
<!--
.style1 {color: #990000}
.style2 {color: #0066FF}
.style3 {color: #0000CC}
.style4 {color: #993399}
-->
</style>
</head>

<body>

 </p>
 <div align="center">WELCOME TO THE FRIENDGRADER</div>
<p>Please enter a friend, their zip code, and rate them with the following criteria.<span class="style4"></span><br />
</p>
<form id="form1" name="form1" method="post" action="">

  <table border="0">
    
    <tr>
      <td>Friend</td>
      <td>
        <input name="friend" type="text" id="friend" /></td>
    </tr>
    <tr>
      <td>zip code</td>
      <td>
       <input name="zip" type="text" id="zip" />
      </td>
    </tr>
    <tr>
      <td>courtesy</td>
      <td><table>
        <tr>
          <td> 
            <input type="radio" name="grade1" value="1" id="RadioGroup1_0" />
            very poor
            <input type="radio" name="grade1" value="2" id="RadioGroup1_1" />
poor
<input type="radio" name="grade1" value="3" id="RadioGroup1_2" />
ok
<input type="radio" name="grade1" value="4" id="RadioGroup1_3" />
good
<input type="radio" name="grade1" value="5" id="RadioGroup1_4" />
excellent
 </td>
        </tr>
       
      </table>
      </td>
    </tr>
   
   
    <tr>
      <td>stability</td>
      <td><input type="radio" name="grade2" id="very_poor3" value="1" />
very poor
  <input type="radio" name="grade2" id="poor3" value="2" />
poor
<input type="radio" name="grade2" id="ok3" value="3" />
ok
<input type="radio" name="grade2" id="good3" value="4" />
good
<input type="radio" name="grade2" id="excellent3" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>loyalty</td>
      <td><input type="radio" name="grade3" id="very_poor4" value="1" />
very poor
  <input type="radio" name="grade3" id="poor4" value="2" />
poor
<input type="radio" name="grade3" id="ok4" value="3" />
ok
<input type="radio" name="grade3" id="good4" value="4" />
good
<input type="radio" name="grade3" id="excellent4" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>attitude</td>
      <td><input type="radio" name="grade4" id="very_poor5" value="1" />
very poor
  <input type="radio" name="grade4" id="poor5" value="2" />
poor
<input type="radio" name="grade4" id="ok5" value="3" />
ok
<input type="radio" name="grade4" id="good5" value="4" />
good
<input type="radio" name="grade4" id="excellent5" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
  </table>
   
</form>


</body>
</html>
silverglade is offline
View Public Profile
 
Old 01-17-2010, 01:35 PM Re: how can i assign a number value to radio button choices
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The syntax of your "if" statements are incorrect

PHP Code:
if (comparison) {
      do 
this;
}elseif (
comparison) {
      do 
this;
}elseif (
comparison) {
      do 
this;

__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-17-2010, 01:51 PM Re: how can i assign a number value to radio button choices
Webmaster Talker

Posts: 611
Trades: 0
thanks, this is the best i could do and nothing enters into the database table now. i have no clue what im doing wrong. here is the new code with the if fixed.

Code:
<?php
include("connect1.php");

////////////////////////////////////////
////////////////////////////////////////


// escape username and password for use in SQL//person said on board "looks fine" like this
//to prevent sql injections
 
$field2 = mysql_real_escape_string($field2);
$field3 = mysql_real_escape_string($field3);
 

/// query db and loop through rows example
 
$field2 = $_POST['friend'];
$field3   = $_POST['zip'];
$field4   = $_POST['grade1'];
$field5   = $_POST['grade2'];
$field6   = $_POST['grade3'];
$field7 = $_POST['grade4'];
 
 

 $field4 = (int)$field4;
$field5 = (int)$field5;
$field6 = (int)$field6;
$field7 = (int)$field7;

    if(isset($_POST['Submit'])){
 $total = 4;
$sum = $field4 + $field5 + $field6 + $field7;       
$average = $sum/$total;

$grade = "null";


 if ($average <= 1)  {
 $grade = "F";
  echo "Your friend has a grade of <strong>F.</strong> ";
  
} else if ($average > 1 && $average <= 2) { 
  $grade = "D";
  echo "Your friend has a grade of <strong>D.</strong> ";

} else if ($average > 2 && $average <= 3) { 
   $grade = "C";
  echo "Your friend has a grade of <strong>C.</strong> ";
 
} else if ($average > 3 && $average <= 4) {
   $grade = "B"; 
  echo "Your friend has a grade of <strong>B.</strong> ";

 } else if ($average > 4 && $average <= 5)  {
   $grade = "A";
  echo "Your friend has a grade of <strong>A.</strong> ";
 
 } 
 
  mysql_query("INSERT INTO friendgrade (grade , friend,zip,loyalty,courtesy , stability, attitude)VALUES('$grade', '$field2','$field3','$field4','$field5','$field6' , '$field7')");

 }//end isset
 
  
  
?>
<!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=iso-8859-1" />
<title>Update Statement</title>
<style type="text/css">
<!--
.style1 {color: #990000}
.style2 {color: #0066FF}
.style3 {color: #0000CC}
.style4 {color: #993399}
-->
</style>
</head>

<body>

 </p>
 <div align="center">WELCOME TO THE FRIENDGRADER</div>
<p>Please enter a friend, their zip code, and rate them with the following criteria.<span class="style4"></span><br />
</p>
<form id="form1" name="form1" method="post" action="">

  <table border="0">
    
    <tr>
      <td>Friend</td>
      <td>
        <input name="friend" type="text" id="friend" /></td>
    </tr>
    <tr>
      <td>zip code</td>
      <td>
       <input name="zip" type="text" id="zip" />
      </td>
    </tr>
    <tr>
      <td>courtesy</td>
      <td><table>
        <tr>
          <td> 
            <input type="radio" name="grade1" value="1" id="RadioGroup1_0" />
            very poor
            <input type="radio" name="grade1" value="2" id="RadioGroup1_1" />
poor
<input type="radio" name="grade1" value="3" id="RadioGroup1_2" />
ok
<input type="radio" name="grade1" value="4" id="RadioGroup1_3" />
good
<input type="radio" name="grade1" value="5" id="RadioGroup1_4" />
excellent
 </td>
        </tr>
       
      </table>
      </td>
    </tr>
   
   
    <tr>
      <td>stability</td>
      <td><input type="radio" name="grade2" id="very_poor3" value="1" />
very poor
  <input type="radio" name="grade2" id="poor3" value="2" />
poor
<input type="radio" name="grade2" id="ok3" value="3" />
ok
<input type="radio" name="grade2" id="good3" value="4" />
good
<input type="radio" name="grade2" id="excellent3" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>loyalty</td>
      <td><input type="radio" name="grade3" id="very_poor4" value="1" />
very poor
  <input type="radio" name="grade3" id="poor4" value="2" />
poor
<input type="radio" name="grade3" id="ok4" value="3" />
ok
<input type="radio" name="grade3" id="good4" value="4" />
good
<input type="radio" name="grade3" id="excellent4" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>attitude</td>
      <td><input type="radio" name="grade4" id="very_poor5" value="1" />
very poor
  <input type="radio" name="grade4" id="poor5" value="2" />
poor
<input type="radio" name="grade4" id="ok5" value="3" />
ok
<input type="radio" name="grade4" id="good5" value="4" />
good
<input type="radio" name="grade4" id="excellent5" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
  </table>
   
</form>


</body>
</html>
silverglade is offline
View Public Profile
 
Old 01-17-2010, 02:37 PM Re: how can i assign a number value to radio button choices
Webmaster Talker

Posts: 611
Trades: 0
dont i feel stupid. the following code works. there was a button on the sql administrator area of the table, and it went to the next page, and all my data was in the table. here is the full working code.

Code:
<?php
include("connect1.php");

////////////////////////////////////////
////////////////////////////////////////


// escape username and password for use in SQL//person said on board "looks fine" like this
//to prevent sql injections
 
$field2 = mysql_real_escape_string($field2);
$field3 = mysql_real_escape_string($field3);
 

/// query db and loop through rows example
 
$field2 = $_POST['friend'];
$field3   = $_POST['zip'];
$field4   = $_POST['grade1'];
$field5   = $_POST['grade2'];
$field6   = $_POST['grade3'];
$field7 = $_POST['grade4'];
 
 

 $field4 = (int)$field4;
$field5 = (int)$field5;
$field6 = (int)$field6;
$field7 = (int)$field7;

    
 $total = 4;
$sum = $field4 + $field5 + $field6 + $field7;       
$average = $sum/$total;

$grade = "null";


 if ($average <= 1)  {
 $grade = "F";
  echo "Your friend has a grade of <strong>F.</strong> ";
  
} else if ($average > 1 && $average <= 2) { 
  $grade = "D";
  echo "Your friend has a grade of <strong>D.</strong> ";

} else if ($average > 2 && $average <= 3) { 
   $grade = "C";
  echo "Your friend has a grade of <strong>C.</strong> ";
 
} else if ($average > 3 && $average <= 4) {
   $grade = "B"; 
  echo "Your friend has a grade of <strong>B.</strong> ";

 } else if ($average > 4 && $average <= 5)  {
   $grade = "A";
  echo "Your friend has a grade of <strong>A.</strong> ";
 
 } 
 if(isset($_POST['Submit'])){
  mysql_query("INSERT INTO friendgrade (grade , friend,zip,loyalty,courtesy , stability, attitude)VALUES('$grade', '$field2','$field3','$field4','$field5','$field6' , '$field7')");

 }//end isset
 
  
  
?>
<!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=iso-8859-1" />
<title>Update Statement</title>
<style type="text/css">
<!--
.style1 {color: #990000}
.style2 {color: #0066FF}
.style3 {color: #0000CC}
.style4 {color: #993399}
-->
</style>
</head>

<body>

 </p>
 <div align="center">WELCOME TO THE FRIENDGRADER</div>
<p>Please enter a friend, their zip code, and rate them with the following criteria.<span class="style4"></span><br />
</p>
<form id="form1" name="form1" method="post" action="">

  <table border="0">
    
    <tr>
      <td>Friend</td>
      <td>
        <input name="friend" type="text" id="friend" /></td>
    </tr>
    <tr>
      <td>zip code</td>
      <td>
       <input name="zip" type="text" id="zip" />
      </td>
    </tr>
    <tr>
      <td>courtesy</td>
      <td><table>
        <tr>
          <td> 
            <input type="radio" name="grade1" value="1" id="RadioGroup1_0" />
            very poor
            <input type="radio" name="grade1" value="2" id="RadioGroup1_1" />
poor
<input type="radio" name="grade1" value="3" id="RadioGroup1_2" />
ok
<input type="radio" name="grade1" value="4" id="RadioGroup1_3" />
good
<input type="radio" name="grade1" value="5" id="RadioGroup1_4" />
excellent
 </td>
        </tr>
       
      </table>
      </td>
    </tr>
   
   
    <tr>
      <td>stability</td>
      <td><input type="radio" name="grade2" id="very_poor3" value="1" />
very poor
  <input type="radio" name="grade2" id="poor3" value="2" />
poor
<input type="radio" name="grade2" id="ok3" value="3" />
ok
<input type="radio" name="grade2" id="good3" value="4" />
good
<input type="radio" name="grade2" id="excellent3" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>loyalty</td>
      <td><input type="radio" name="grade3" id="very_poor4" value="1" />
very poor
  <input type="radio" name="grade3" id="poor4" value="2" />
poor
<input type="radio" name="grade3" id="ok4" value="3" />
ok
<input type="radio" name="grade3" id="good4" value="4" />
good
<input type="radio" name="grade3" id="excellent4" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>attitude</td>
      <td><input type="radio" name="grade4" id="very_poor5" value="1" />
very poor
  <input type="radio" name="grade4" id="poor5" value="2" />
poor
<input type="radio" name="grade4" id="ok5" value="3" />
ok
<input type="radio" name="grade4" id="good5" value="4" />
good
<input type="radio" name="grade4" id="excellent5" value="5" />
excellent</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit" /></td>
    </tr>
  </table>
   
</form>


</body>
</html>
silverglade is offline
View Public Profile
 
Closed Thread     « Reply to how can i assign a number value to radio button choices
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46620 seconds with 12 queries