/var/www/(Del)discoverylearning.com.hk/webadmin/enrolllist_modify.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php require("configure.php");
 
$EnId            htmlspecialchars($_POST["EnId"],ENT_QUOTES);
$EnStudentno    htmlspecialchars($_POST["EnStudentno"],ENT_QUOTES);
$EnName            htmlspecialchars($_POST["EnName"],ENT_QUOTES);
$EnBirth        htmlspecialchars($_POST["EnBirth"],ENT_QUOTES);
$EnSex            htmlspecialchars($_POST["EnSex"],ENT_QUOTES);
$EnAge            htmlspecialchars($_POST["EnAge"],ENT_QUOTES);
$EnAddress        htmlspecialchars($_POST["EnAddress"],ENT_QUOTES);
$EnHomeno        htmlspecialchars($_POST["EnHomeno"],ENT_QUOTES);
$EnFaxno        htmlspecialchars($_POST["EnFaxno"],ENT_QUOTES);
$EnMotherName        htmlspecialchars($_POST["EnMotherName"],ENT_QUOTES);
$EnMotherMobile        htmlspecialchars($_POST["EnMotherMobile"],ENT_QUOTES);
$EnMotherEmail        htmlspecialchars($_POST["EnMotherEmail"],ENT_QUOTES);
$EnFatherName        htmlspecialchars($_POST["EnFatherName"],ENT_QUOTES);
$EnFatherMobile        htmlspecialchars($_POST["EnFatherMobile"],ENT_QUOTES);
$EnFatherEmail        htmlspecialchars($_POST["EnFatherEmail"],ENT_QUOTES);
$EnChild            htmlspecialchars($_POST["EnChild"],ENT_QUOTES);
$EnChildMobile        htmlspecialchars($_POST["EnChildMobile"],ENT_QUOTES);
$EnEmergency        htmlspecialchars($_POST["EnEmergency"],ENT_QUOTES);

$EnAware            htmlspecialchars($_POST["EnAware"],ENT_QUOTES);
$EnAttends            htmlspecialchars($_POST["EnAttends"],ENT_QUOTES);
$EnGrade            htmlspecialchars($_POST["EnGrade"],ENT_QUOTES);
$EnReferred            htmlspecialchars($_POST["EnReferred"],ENT_QUOTES);

//print_r($_POST);

// Modify 
$sql "update EnrollList set EnStudentno='$EnStudentno', EnName='$EnName', EnBirth='$EnBirth', EnSex='$EnSex', EnAge='$EnAge', EnAddress='$EnAddress', EnHomeno='$EnHomeno', EnFaxno='$EnFaxno', EnMotherName='$EnMotherName', EnMotherMobile='$EnMotherMobile', EnMotherEmail='$EnMotherEmail', EnFatherName='$EnFatherName', EnFatherMobile='$EnFatherMobile', EnFatherEmail='$EnFatherEmail', EnChild='$EnChild', EnChildMobile='$EnChildMobile', EnEmergency='$EnEmergency', EnAware='$EnAware', EnAttends='$EnAttends', EnGrade='$EnGrade', EnReferred='$EnReferred' ";
$sql .= " where EnId="$EnId ." ";
mysql_query($sql);

if( 
mysql_errno() > ){
    echo 
'Enrollment List Modify Error:<br />'mysql_error() .'<br />SQL: '$sql;
    exit;
}    
mysql_close($dbh);

header("Location: enrolllist_index.php?msg=Modify Successful");
?>