Jump to content

How to create a card powered online result checker


Reganchuks

Recommended Posts

Hello i created this online result checking web app for a school, but they said they want their student to buy scratch before they can view their result online.... i really need help... on this...HERE ARE THE CODES

The Index....

<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>

<style type="text/css">
<!--
@import url("style/main.css");
.submitField {
    width: 100%;
    height: 45px;
    padding: 5px 10px;
    border-radius: 25px;
    border: 1px solid #ff339a;
    background: #ff339a;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
}

.inputField {
    width: 100%;
    height: 45px;
    padding: 5px 10px;
    border-radius: 25px;
    border: 1px solid #ff339a;
    background: rgba(255, 255, 255, 0.49);
}
</style>
<title>ESTERNPOINT RESULT CHECK</title>
<body bgcolor="#FFFFFF" id="container">
<?php 
 // if there are any errors, display them
 if ($error != '')
 {
 echo '<div style="padding:4px; border:1px solid red; color:red;">'.$error.'</div>';
 }
 ?> 
<div id="container">
  <table width="900" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
    <tr>
      <td colspan="3"><img src="schheader.png" width="900" height="200" /></td>
    </tr>
    <tr>
      <td colspan="3" bgcolor="#FFFFFF"> </td>
    </tr>
    <tr>
      <td colspan="3"><p> </p>
      <p><script language="javascript">
function validate()
  {
 if (form.AdmissionNo.value == "" )
         {
            alert("AdmissionNo No is required.");
            form.track.focus( );
            return false;
        }
    }
    
</script></p>
      <p style="margin-left: 330px;">Enter Your Admission Numbre To Check Result.</p></td>
    </tr>
    <tr>
      <td width="328" rowspan="2" bgcolor="#FFFFFF"></td>
      <td width="332" rowspan="2" bgcolor="#FFFFFF">
      <div class="getresult">
      <form action="indexdetails.php" method="post" name="form" target="_self" id="form" >
        <input name="AdmissionNo" type="text" class="inputField" id="AdmissionNo" maxlength="50" placeholder="Admission No:"><br>
        <br>
            <input name="Submit" type="submit" class="submitField" onClick="MM_validateForm('AdmissionNo','Serial_pin','R');return document.MM_returnValue" value="CHECK RESULT">
            
        </form>
        </div>
      </td>
      <td width="240" bgcolor="#FFFFFF"><p> </p>
      <p> </p></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"> </td>
    </tr>
    <tr>
      <td colspan="4"> </td>
    </tr>
    <tr>
      <td colspan="5"> </td>
    </tr>
    <tr>
      <td colspan="6" bgcolor="#0066FF">Powered by: MEGATECH IDEALS 
Tel: +2348165873446 email: reganchuks3@gmail.com</td>
    </tr>
  </table>
</div>
</body>
</html>

THIS IS THE SQL

-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 13, 2018 at 07:22 PM
-- Server version: 5.1.33
-- PHP Version: 5.2.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `cube_schoolproject`
--

-- --------------------------------------------------------

--
-- Table structure for table `result`
--

CREATE TABLE IF NOT EXISTS `result` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `st_admno` varchar(100) NOT NULL,
  `st_name` varchar(200) NOT NULL,
  `pin` varchar(100) NOT NULL,
  `class` varchar(100) NOT NULL,
  `formteacher` varchar(200) NOT NULL,
  `session` varchar(100) NOT NULL,
  `proprietorcontact` varchar(200) NOT NULL,
  `passport` varchar(200) NOT NULL,
  `equamath` varchar(100) NOT NULL,
  `geomath` varchar(100) NOT NULL,
  `busmath` varchar(100) NOT NULL,
  `chemistry` varchar(100) NOT NULL,
  `physics` varchar(100) NOT NULL,
  `english` varchar(100) NOT NULL,
  `literature` varchar(100) NOT NULL,
  `agric` varchar(100) NOT NULL,
  `economic` varchar(100) NOT NULL,
  `biology_basicsci` varchar(100) NOT NULL,
  `civicedu` varchar(100) NOT NULL,
  `govt_socialstudy` varchar(100) NOT NULL,
  `geogr` varchar(100) NOT NULL,
  `commerce` varchar(100) NOT NULL,
  `crs_religion` varchar(100) NOT NULL,
  `computer` varchar(100) NOT NULL,
  `busistudy` varchar(100) NOT NULL,
  `homeeco` varchar(100) NOT NULL,
  `basictech` varchar(100) NOT NULL,
  `basicsci` varchar(100) NOT NULL,
  `quantitative` varchar(100) NOT NULL,
  `verbal` varchar(100) NOT NULL,
  `poem` varchar(100) NOT NULL,
  `writing` varchar(100) NOT NULL,
  `creativeart` varchar(100) NOT NULL,
  `reading` varchar(100) NOT NULL,
  `position` varchar(110) NOT NULL,
  `outof` varchar(110) NOT NULL,
  `remark` varchar(110) NOT NULL,
  `classteacherreport` varchar(110) NOT NULL,
  `resumptiondate` date NOT NULL,
  `grandtotal` varchar(100) NOT NULL,
  `equamath2` varchar(100) NOT NULL,
  `geomath2` varchar(100) NOT NULL,
  `busmath2` varchar(100) NOT NULL,
  `chemistry2` varchar(100) NOT NULL,
  `physics2` varchar(100) NOT NULL,
  `english2` varchar(100) NOT NULL,
  `literature2` varchar(100) NOT NULL,
  `agric2` varchar(100) NOT NULL,
  `economic2` varchar(100) NOT NULL,
  `biology_basicsci2` varchar(100) NOT NULL,
  `civicedu2` varchar(100) NOT NULL,
  `govt_socialstudy2` varchar(100) NOT NULL,
  `geogr2` varchar(100) NOT NULL,
  `commerce2` varchar(100) NOT NULL,
  `crs_religion2` varchar(100) NOT NULL,
  `computer2` varchar(100) NOT NULL,
  `busistudy2` varchar(100) NOT NULL,
  `homeeco2` varchar(100) NOT NULL,
  `basictech2` varchar(100) NOT NULL,
  `basicsci2` varchar(100) NOT NULL,
  `quantitative2` varchar(100) NOT NULL,
  `verbal2` varchar(100) NOT NULL,
  `poem2` varchar(100) NOT NULL,
  `writing2` varchar(100) NOT NULL,
  `creativeart2` varchar(100) NOT NULL,
  `reading2` varchar(100) NOT NULL,
  `equamath3` int(11) NOT NULL,
  `geomath3` int(11) NOT NULL,
  `busmath3` int(11) NOT NULL,
  `chemistry3` int(11) NOT NULL,
  `physics3` int(11) NOT NULL,
  `english3` int(11) NOT NULL,
  `literature3` int(11) NOT NULL,
  `agric3` int(11) NOT NULL,
  `economic3` int(11) NOT NULL,
  `biology_basicsci3` int(11) NOT NULL,
  `civicedu3` int(11) NOT NULL,
  `govt_socialstudy3` int(11) NOT NULL,
  `geogr3` int(11) NOT NULL,
  `commerce3` int(11) NOT NULL,
  `crs_religion3` int(11) NOT NULL,
  `computer3` int(11) NOT NULL,
  `busistudy3` int(11) NOT NULL,
  `homeeco3` int(11) NOT NULL,
  `basictech3` int(11) NOT NULL,
  `basicsci3` int(11) NOT NULL,
  `quantitative3` int(11) NOT NULL,
  `verbal3` int(11) NOT NULL,
  `poem3` int(11) NOT NULL,
  `writing3` int(11) NOT NULL,
  `creativeart3` int(11) NOT NULL,
  `reading3` int(11) NOT NULL,
  `equamath_total` varchar(100) NOT NULL,
  `geomath_total` varchar(100) NOT NULL,
  `busmath_total` varchar(100) NOT NULL,
  `chemistry_total` varchar(100) NOT NULL,
  `physics_total` varchar(100) NOT NULL,
  `english_total` int(11) NOT NULL,
  `literature_total` int(11) NOT NULL,
  `agric_total` int(11) NOT NULL,
  `economic_total` int(11) NOT NULL,
  `biology_basicsci_total` int(11) NOT NULL,
  `civicedu_total` int(11) NOT NULL,
  `govt_socialstudy_total` int(11) NOT NULL,
  `geogr_total` int(11) NOT NULL,
  `commerce_total` int(11) NOT NULL,
  `crs_religion_total` varchar(100) NOT NULL,
  `computer_total` varchar(100) NOT NULL,
  `busistudy_total` varchar(100) NOT NULL,
  `homeeco_total` varchar(100) NOT NULL,
  `basictech_total` varchar(100) NOT NULL,
  `basicsci_total` varchar(100) NOT NULL,
  `quantitative_total` varchar(100) NOT NULL,
  `verbal_total` varchar(100) NOT NULL,
  `poem_total` varchar(100) NOT NULL,
  `writing_total` varchar(100) NOT NULL,
  `creativeart_total` varchar(100) NOT NULL,
  `reading_total` varchar(100) NOT NULL,
  `equamath_grade` varchar(100) NOT NULL,
  `geomath_grade` varchar(100) NOT NULL,
  `busmath_grade` varchar(100) NOT NULL,
  `chemistry_grade` varchar(100) NOT NULL,
  `physics_grade` varchar(100) NOT NULL,
  `english_grade` varchar(100) NOT NULL,
  `literature_grade` varchar(100) NOT NULL,
  `agric_grade` varchar(100) NOT NULL,
  `economic_grade` varchar(100) NOT NULL,
  `biology_basicsci_grade` varchar(100) NOT NULL,
  `civicedu_grade` varchar(100) NOT NULL,
  `govt_socialstudy_grade` varchar(100) NOT NULL,
  `geogr_grade` varchar(100) NOT NULL,
  `commerce_grade` varchar(100) NOT NULL,
  `crs_religion_grade` varchar(100) NOT NULL,
  `computer_grade` varchar(100) NOT NULL,
  `busistudy_grade` varchar(100) NOT NULL,
  `homeeco_grade` varchar(100) NOT NULL,
  `basictech_grade` varchar(100) NOT NULL,
  `basicsci_grade` varchar(100) NOT NULL,
  `quantitative_grade` varchar(100) NOT NULL,
  `verbal_grade` varchar(100) NOT NULL,
  `poem_grade` varchar(100) NOT NULL,
  `writing_grade` varchar(100) NOT NULL,
  `creativeart_grade` varchar(100) NOT NULL,
  `reading_grade` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;

--
-- Dumping data for table `result`
--

INSERT INTO `result` (`id`, `st_admno`, `st_name`, `pin`, `class`, `formteacher`, `session`, `proprietorcontact`, `passport`, `equamath`, `geomath`, `busmath`, `chemistry`, `physics`, `english`, `literature`, `agric`, `economic`, `biology_basicsci`, `civicedu`, `govt_socialstudy`, `geogr`, `commerce`, `crs_religion`, `computer`, `busistudy`, `homeeco`, `basictech`, `basicsci`, `quantitative`, `verbal`, `poem`, `writing`, `creativeart`, `reading`, `position`, `outof`, `remark`, `classteacherreport`, `resumptiondate`, `grandtotal`, `equamath2`, `geomath2`, `busmath2`, `chemistry2`, `physics2`, `english2`, `literature2`, `agric2`, `economic2`, `biology_basicsci2`, `civicedu2`, `govt_socialstudy2`, `geogr2`, `commerce2`, `crs_religion2`, `computer2`, `busistudy2`, `homeeco2`, `basictech2`, `basicsci2`, `quantitative2`, `verbal2`, `poem2`, `writing2`, `creativeart2`, `reading2`, `equamath3`, `geomath3`, `busmath3`, `chemistry3`, `physics3`, `english3`, `literature3`, `agric3`, `economic3`, `biology_basicsci3`, `civicedu3`, `govt_socialstudy3`, `geogr3`, `commerce3`, `crs_religion3`, `computer3`, `busistudy3`, `homeeco3`, `basictech3`, `basicsci3`, `quantitative3`, `verbal3`, `poem3`, `writing3`, `creativeart3`, `reading3`, `equamath_total`, `geomath_total`, `busmath_total`, `chemistry_total`, `physics_total`, `english_total`, `literature_total`, `agric_total`, `economic_total`, `biology_basicsci_total`, `civicedu_total`, `govt_socialstudy_total`, `geogr_total`, `commerce_total`, `crs_religion_total`, `computer_total`, `busistudy_total`, `homeeco_total`, `basictech_total`, `basicsci_total`, `quantitative_total`, `verbal_total`, `poem_total`, `writing_total`, `creativeart_total`, `reading_total`, `equamath_grade`, `geomath_grade`, `busmath_grade`, `chemistry_grade`, `physics_grade`, `english_grade`, `literature_grade`, `agric_grade`, `economic_grade`, `biology_basicsci_grade`, `civicedu_grade`, `govt_socialstudy_grade`, `geogr_grade`, `commerce_grade`, `crs_religion_grade`, `computer_grade`, `busistudy_grade`, `homeeco_grade`, `basictech_grade`, `basicsci_grade`, `quantitative_grade`, `verbal_grade`, `poem_grade`, `writing_grade`, `creativeart_grade`, `reading_grade`) VALUES
(1, '10700', 'EVBAYOWIERU O. JUDE', '', 'SS 1', 'ENOFE CLEMENTINA', '3rd Term 2015/2016 session', '08077088129', '', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '', '30', '30', '30', '', '30', '', '30', '30', '30', '30', '30', '30', '6th', '90 Pupils', 'SATISFACTORY PROMOTED TO SS 2', 'GOOD KEEP IT UP', '2017-05-05', '1022', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '30', '', '30', '30', '30', '', '30', '', '30', '30', '30', '30', '30', '30', 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 30, 30, 30, 0, 30, 0, 30, 30, 30, 30, 30, 30, '90', '90', '90', '90', '90', 90, 90, 90, 90, 90, 90, 90, 90, 0, '90', '90', '90', '', '90', '', '90', '90', '90', '90', '90', '90', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', '', 'A', 'A', 'A', '', 'A', '', 'A', 'A', 'A', 'A', 'A', 'A');

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `adminid` varchar(200) NOT NULL,
  `adminpw` varchar(200) NOT NULL,
  `staffid` varchar(200) NOT NULL,
  `staffpw` varchar(200) NOT NULL,
  `sn` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sn`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`adminid`, `adminpw`, `staffid`, `staffpw`, `sn`) VALUES
('admin', 'admin123', 'staff', 'staff123', 1);

-- --------------------------------------------------------

--
-- Table structure for table `verification`
--

CREATE TABLE IF NOT EXISTS `verification` (
  `pin` bigint(20) NOT NULL,
  UNIQUE KEY `pin` (`pin`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `verification`
--

INSERT INTO `verification` (`pin`) VALUES
(189929382866),
(189929383267);
 

 

 

Edited by requinix
please use Code <> blocks when posting code
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.