hello i need this script do u have ??? i will make for my school
Exam results script
Started on the old forum in July 2011 · view the original in the archive · old links redirect here
ya i need that type script
Create a page and give it a name mark.html and put this code in body
<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
$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';
}
?>
here is a simple example with array .. if you want i'll make one with mysql 😛
<?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'); ?>
ya frnd itz good cen u make with sql plz
<?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'); ?>