Exam results script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Exam results script

    hello i need this script do u have ??? i will make for my school

    #2
    Like :

    FirstName Surname Class Point/Grade
    ****erman Max 11 A+
    .
    .
    .
    Gerrard Steven 12 B

    ?
    <?php unlink('World/Europe/Romania.country'); ?>

    Comment


      #3
      ya i need that type script

      Comment


        #4
        Create a page and give it a name mark.html and put this code in body
        Code:
        <form action="symbol.php" method="POST">Enter mark <input type="text" name="mark"></form>
        Then create a page name it symbol.php and put this code where you want marks/symbols to appear
        PHP Code:
        <?php
         $mark 
        $_POST['mark']; 
         
        switch(
        $mark)
         {
          case 
        "$mark > 79" : print "A ".$mark;
             break;
          case 
        "$mark > 69" : print "B ".$mark;
             break;
          case 
        "$mark > 59" : print "C ".$mark;
             break;
          case 
        "$mark > 49" : print "D ".$mark;
             break;
          case 
        "$mark > 39" : print "E ".$mark;
             break;
         default : print 
        'Shame';
         }
        ?>
        libra.wen.ru

        Comment


          #5
          that was funny.. lol

          Comment


            #6
            here is a simple example with array .. if you want i'll make one with mysql :P
            PHP Code:
            <?php
            $arr 
            = array(
               array(
            'firstname'=>'Lazar''surname'=>'Marghioala''grade'=>'A'),
               array(
            'firstname'=>'Avram''surname'=>'Antoneta''grade'=>'B'),
               array(
            'firstname'=>'Lazar''surname'=>'Gheorghe''grade'=>'C'),
               array(
            'firstname'=>'Cacatgros''surname'=>'Dumitru''grade'=>'A+'),
            );
            ?>
            <table border="1">
             <tr>
             <th>No.</th>
             <th>Firstname</th>
             <th>Surname</th>
             <th>Grade</th>
             </tr>
             <?php foreach ($arr AS $key=>$students):?>
             <tr>
             <td><?php echo ($key+1)?></td>
             <td><?php echo $students['firstname']?></td>
             <td><?php echo $students['surname']?></td>
             <td><?php echo $students['grade']?></td>
             </tr>
             <?php endforeach;?>
             </table>
            Make yourself html validation
            <?php unlink('World/Europe/Romania.country'); ?>

            Comment


              #7
              ya frnd itz good cen u make with sql plz

              Comment


                #8
                <?php
                // mysql conexion ....
                //
                $query = mysql_query("SELECT `firstname`, `surname`, `grade` FROM `students`");

                ?>
                <table border="1">
                <tr>
                <th>No.</th>
                <th>Firstname</th>
                <th>Surname</th>
                <th>Grade</th>
                </tr>
                <?php
                $no = 0;
                while ($row = mysql_fetch_object($query)){?>
                <tr>
                <td><?php echo (++$no)?></td>
                <td><?php echo $row->firstname?></td>
                <td><?php echo $row->surname?></td>
                <td><?php echo $row->grade?></td>
                </tr>
                <?php } ?>
                </table>

                change how you want:P
                <?php unlink('World/Europe/Romania.country'); ?>

                Comment

                Working...
                X