Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 98,764 PHP Programmers for FREE!. Ask your question and get quick answers from Dream.In.Code experts. There are 1,039 online right now! We're the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a PHP Expert

Register to Make This Box Go Away!


roster form one school

 
Reply to this topicStart new topic

roster form one school

antism2007
post 6 May, 2008 - 11:00 AM
Post #1


New D.I.C Head

*
Joined: 3 May, 2008
Posts: 1

CODE

<HTML>

<Head>
<h1 align="center">Roster Form</h1>
<hr>
</HEAD>
<body bgcolor="#DAA520">
<FORM NAME="number" method="post" action="added.php" >
<table width="30"  hight="100" align="LEFT" bgcolor="#990000">
  <tr>
    <td><div align="center"><strong>AMHARIC: </strong>
        <input type="text" value="" name="num1">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>ENGLISH:</strong>
        <input type="text" value="" name="num2">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>OROMIFA:</strong>
        <input type="text" value="" name="num3">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>MATH: </strong>
        <input type="text" value="" name="num4">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>PHYSCIS: </strong>
        <input type="text" value="" name="num5">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>BIOLOGY: </strong>
        <input type="text" value="" name="num6">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>CHEMISTRY:</strong>
        <input type="text" value="" name="num7">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>HISTORY: </strong>
        <input type="text" value="" name="num8">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>GEOGRAPY: </strong>
        <input type="text" value="" name="num9">
      </div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>CIVIC:</strong>
        <input type="text" value="" name="num10">
      </div></td>
  

  <tr>
    <td width="10" > <div align="right" Valign="TOP">
        <input type="button" name="none" value="TOTAL" onClick="add()">
       </td>
     <td>   <input name="numb4" type="text" size="15"></td></tr>
        <br>
     <tr>
     <td>   <input type="button" name="none" value="AVERAGE" onClick="avg()"></td>
      <td>  <input name="numb5" type="text" size="15"></td></tr>
      <tr><td>
        
        <input type="button" name="none" value="STATUS" onClick="stat()">
       </td>
    <td>    <input name="numb6" type="text" size="15"></td></tr>
                
  </tr>
</table>
<TABLE width="41%" align="left" cellpadding="0" cellspacing="0" bgcolor="#ccccff" hight="100">
  <TR>
    <TD width="23%" height="40" valign="bottom">
      <h5 align="center">Id:
        <INPUT name="num11" size="8">
      </h5></TD>
    <TD width="36%" align=right valign="bottom">
      <h5 align="center"> Firstname :
        <INPUT name="num12" size="20">
      </h5></TD>
    <TD width="35%" align=middle valign="bottom"><STRONG>
      <h5 align="center">Lastname:
        <INPUT name="num13" size="20">
      </h5>
      </STRONG></TD>
  </TR>
  <TR>
     <td> </td>
    <TD height="24" align=right valign="top">
      <h5>Age:
        <INPUT  name="num14" size=10>
      </h5></TD>
    <TD height="24" align=right valign="top">
      <h5>Sex:
        <INPUT name="num15" size="10">
        </h5></TD>
    <td width="6%" height="24"> </td>
  </TR>
  
  <TR valign="top">
     <td> </td>
    <TD height="24" align="right"><strong>grade: </strong>
      <INPUT name="num16" size="10">
      
    </TD>
    <TD align="right" valign="top"><strong>section:</strong>
   <INPUT name="num17" size="10">  
</TD>
      
    <td> </td>
  </TR>
</TABLE>

<table width="100" hight="200">
<tr>
    <td width="" align="left"> <p align="center"><br>
        <input type="button" name="none56" value="reset" onClick="reset(); add(); go()">
        <input type="submit" name="submit" value="submit">
      </p></td>
  </tr>
</table></FORM>

<script><!--
function go()
{
document.number.num1.value = ("");
document.number.numb4.value = ("");
document.number.numb5.value = ("");
document.number.numb6.value =("");
}

var num1 = document.number.num1.value

var num2 = document.number.num2.value
var num3 = document.number.num3.value
var num4 = document.number.num4.value
var num5 = document.number.num5.value
var num6 = document.number.num6.value
var num7 = document.number.num7.value
var num8 = document.number.num8.value
var num9 = document.number.num9.value
var num10 = document.number.num10.value


function submit(){
var num1 = document.number.num1.value
var num2 = document.number.num2.value
var num3 = document.number.num3.value
var num4 = document.number.num4.value
var num5 = document.number.num5.value
var num6 = document.number.num6.value
var num7 = document.number.num7.value
var num8 = document.number.num8.value
var num9 = document.number.num9.value
var num10 = document.number.num10.value
var numb4 = document.number.numb4.value
var numb5 = document.number.numb5.value
var numb6 = document.number.numb6.value
}


function reset(){
document.number.numb4.value = ("");
document.number.numb5.value = ("");
document.number.numb6.value =("");
document.number.num1.value = ("");
document.number.num2.value = ("");
document.number.num3.value = ("");
document.number.num4.value = ("");
document.number.num5.value = ("");
document.number.num6.value = ("");
document.number.num7.value = ("");
document.number.num8.value = ("");
document.number.num9.value = ("");
document.number.num10.value = ("");
}




function add(){
document.number.numb4.value = parseInt(document.number.num1.value) + parseInt(document.number.num2.value)+parseInt(document.number.num3.value)+parseInt(document.number.num4.value)+parseInt(document.number.num5.value)+parseInt(document.number.num6.value)+parseInt(document.number.num7.value)+parseInt(document.number.num8.value)+parseInt(document.number.num9.value)+parseInt(document.number.num10.value);

}
function avg()
{
document.number.numb5.value = (document.number.numb4.value/10);
}
function stat()
{
if(document.number.numb5.value >=50)
document.number.numb6.value = "pass";
else
document.number.numb6.value = "fail";
}

</SCRIPT>


</body>
</center>
</HTML>

** Edit ** :code*


Attached File(s)
Attached File  222222222222222.html ( 5.99k ) Number of downloads: 16
User is offlineProfile CardPM

Go to the top of the page


no2pencil
post 6 May, 2008 - 06:17 PM
Post #2


Wet D.I.C.

Group Icon
Joined: 10 May, 2007
Posts: 4,208



Thanked 15 times

Dream Kudos: 2275

Expert In: Goofing Off

My Contributions


Ok, trying to figure this out. Did you have a question or are you just sharing code?
User is offlineProfile CardPM

Go to the top of the page

PsychoCoder
post 6 May, 2008 - 06:19 PM
Post #3


using Coding.God;

Group Icon
Joined: 26 Jul, 2007
Posts: 6,569



Thanked 24 times

Dream Kudos: 7350

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#

My Contributions


I hope he has a question because thats some ugly code crazy.gif


Yeah yeah I know someone is gonna get upset and me not being professional
User is online!Profile CardPM

Go to the top of the page

no2pencil
post 6 May, 2008 - 06:22 PM
Post #4


Wet D.I.C.

Group Icon
Joined: 10 May, 2007
Posts: 4,208



Thanked 15 times

Dream Kudos: 2275

Expert In: Goofing Off

My Contributions


At least the tables are properly
At least the tables are sort of indented correctly
At least he tried to indent.
User is offlineProfile CardPM

Go to the top of the page

JasonMcAuley
post 7 May, 2008 - 05:19 AM
Post #5


D.I.C Head

**
Joined: 10 Apr, 2008
Posts: 134


My Contributions


Harsh guys... Harsh... lol
User is offlineProfile CardPM

Go to the top of the page

JBrace1990
post 7 May, 2008 - 06:24 PM
Post #6


D.I.C Head

Group Icon
Joined: 9 Mar, 2008
Posts: 202



Thanked 5 times

Dream Kudos: 350
My Contributions


that is some damn ugly code =/
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 7/20/08 02:37PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month
-->