www.webdeveloper.com
Results 1 to 10 of 10

Thread: exam results showing webpage

  1. #1
    Join Date
    Oct 2013
    Posts
    4

    exam results showing webpage

    hi guys!

    I need some help with creating a exam results showing webpage please anyone got some idea ?
    i need to make it like when a student enter his/her ID then he/she could see the exam results.

    Thanks.

  2. #2
    Join Date
    Mar 2012
    Posts
    1,256
    How complex this would be depends on how secure you want it to be, and how many students there are. If you want password protection and a lot of students, then you need a full blown database. That means using PHP and SQL, which is a lot of work. You can simplify the work by using arrays to store the results. That means you need to use PHP but not SQL, but its only practical for smallish volumes of data.

  3. #3
    Join Date
    Oct 2013
    Posts
    4
    hey Jedaisoul thanks for your reply
    and hmm it should be a simple web page i dont have that much of huge student base only like 50-100 or 50-200 it doesnt have to be that much complex with security and password things anyone who has student ID should be able to see the results thats all i need may be i can do something from wordpress or joomla? are there any addons or plugins for that since i am very poor with these PHP and MySQL
    Thanks.

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Oct 2013
    Posts
    4
    thanks for reply but what i shall do with that ? hm

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    Follow the links to the product's site, read the documentation, user comments, etc.; maybe download it and play around with it yourself, and see if it provides the functionality you need.

    Or wait patiently here for someone to provide another option/solution?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  7. #7
    Join Date
    Sep 2013
    Posts
    221
    Well...as you said you need a simple one so, for that i think the below link may help you to solve the problem.

    http://www.youtube.com/watch?v=DoTGt9CnC5Y

    Hope this helps.
    strad solutionswww.stradsolutions.com

  8. #8
    Join Date
    Mar 2012
    Posts
    1,256
    Here's a working example of the minimum you need:

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="windows-1252">
    <title>Exam Results</title>
    </head>
    <body>
    
    <?php
    error_reporting(E_ALL ^ E_NOTICE);
    /* results note: set $max to last array element */
    $results[0]=array('id','code','subject','result');
    $results[1]=array('000001','M101','Maths - elementary','E');
    $results[2]=array('000001','E101','English language','C');
    $results[3]=array('000002','M101','Maths - elementary','A+');
    /*
    $results[]=array('','','','');
    */
    $max='3';
    
    if(isset($_POST['stud_id'])) {
        $stud_id=$_POST['stud_id']; }
    else {
        $stud_id='000000';
    }
    
    ?>
    
    <form action="#" method=post>
    ID <input type="text" name="stud_id" value="<?php echo $stud_id; ?>">
     <input type="submit" name="submit">
    </form>
    
    <?php
    if($stud_id<>'000000') {
    /* list results */
    for($n='1';$n<=$max;$n++) {
        $id=$results[$n][0];
        if($id==$stud_id) { 
            echo '<br>code: '.$results[$n][1].' - '.$results[$n][2].' result: '.$results[$n][3];
        }
    }}
    ?>
    </body>
    </html>
    Note:
    1. The script needs to be called something plus '.PHP' e.g. 'stud_res.php' and must be put on a web server that supports PHP. It will not run in a browser.

    2. To run the script set up a shortcut. E.g. If you are using a local host like Wampserver, set the target to:

    target=http://localhost/stud_res.php.

    3. The code is very inefficient, e.g. that the for loop runs through all the results every time. It is just intended to show you the idea.

  9. #9
    Join Date
    Oct 2013
    Posts
    4
    wow Thanks so much jedaisoul! i will test this soon and will let you know <3 atm i am having issue with my PC windows corrupted -_-

  10. #10
    Join Date
    Mar 2012
    Posts
    1,256
    The major limitation of the example I have given is that you have to manually create the array of results. If you have the results in electronic form, that could be avoided by importing them at runtime from a CSV file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles