|
12 | 12 | if($conn->connect_error)
|
13 | 13 | die('Fatal Connection error!!');
|
14 | 14 | }
|
| 15 | + else{ |
| 16 | + echo '<h1 class="title">You need to Login Again !</h1>'; |
| 17 | + die(); |
| 18 | + } |
15 | 19 |
|
16 | 20 | ?>
|
17 | 21 | <!DOCTYPE html>
|
|
35 | 39 | $path2 = "img/student.png";
|
36 | 40 | echo file_exists($path1) ? $path1 : $path2;
|
37 | 41 | ?>' style="max-width:40vw;float:right"/>
|
38 |
| - <button class=nav id="delete">Delete Profile picture</button> |
39 | 42 | <!--Basic details-->
|
40 | 43 | <?php
|
41 | 44 | $sql="SELECT * from students where regno=".$regno;
|
42 | 45 | $result=$conn->query($sql);
|
43 | 46 | if($result->num_rows > 0) {
|
44 | 47 | while($row = $result->fetch_assoc()) {
|
| 48 | + echo '<a class=nav id="name">'.$row['name'].'</a>'; |
45 | 49 | echo '<div class="content" style="max-width:56vw;">
|
46 | 50 | <img class="design" src="img/back2.png">
|
47 | 51 | <h1> Fill up the details:</h1>
|
48 | 52 | <form method="POST" action=reg.php>
|
49 |
| - <h3 class="heading">Registration<br> Number: <input onblur=Validate(this) type="number" name="regno" value='.$row['regno'].' placeholder="Enter Registration number" maxlength=8 required disabled></h3> |
50 |
| - <h3 class="heading">Branch: <input onblur=Validate(this) type="text" name="branch" value='.$row['branch'].' placeholder="Enter Branch name"required disabled></h3> |
51 |
| - <h3 class="heading">Roll <br>Number: <input onblur=Validate(this) type="text" name="rollno" value='.$row['rollno'].' placeholder="Enter Roll number" required disabled></h3> |
52 |
| - <h3 class="heading">Name: <input onblur=Validate(this) type="text" name="name" value="'.$row['name'].'" placeholder="Enter your name" required disabled></h3> |
53 |
| - <h3 class="heading">Phone: <input onblur=Validate(this) type="number" name="phone" value='.$row['phone'].' placeholder="Enter your phone number" maxlength=10 required></h3> |
54 |
| - <h3 class="heading">Email Id: <input onblur=Validate(this) type="email" name="email" value='.$row['email'].' placeholder="Enter email" required></h3> |
55 |
| - <div class="wrap"><h4 id="message"></h4></div> |
56 |
| - <div class="wrap"> |
57 |
| - <button class="nav" id="register_button" type="submit">Update</button> |
58 |
| - <button class="nav" type="reset">Set</button> |
59 |
| - </div> |
| 53 | + <h3 class="heading">Registration<br> Number: <a class=detail>'.$row['regno'].'</a></h3> |
| 54 | + <h3 class="heading">Branch: <a class=detail>'.$row['branch'].'</a></h3> |
| 55 | + <h3 class="heading">Roll <br>Number: <a class=detail>'.$row['rollno'].'</a></h3> |
| 56 | + <h3 class="heading">Name: <a class=detail>'.$row['name'].'</a></h3> |
| 57 | + <h3 class="heading">Phone: <a class=detail>'.$row['phone'].'</a></h3> |
| 58 | + <h3 class="heading">Email Id: <a class=detail>'.$row['email'].'</a></h3> |
60 | 59 | <br>
|
61 | 60 | </form>
|
62 | 61 | </div>';
|
63 | 62 | }
|
64 | 63 | }
|
65 | 64 | else {
|
66 |
| - echo "<div class='new'><div class=content><br><h1 style='margin-left: 10%;'>No Recent Requests...</h1><br></div><br><br></div>"; |
| 65 | + echo "<div class='new'><div class=content><br><h1 style='margin-left: 10%;'>Something Went Wrong !!!</h1><br></div><br><br></div>"; |
67 | 66 | }
|
68 | 67 | ?>
|
69 | 68 | </div>
|
70 |
| - |
71 |
| - <!--More Details--> |
72 |
| - <h1 class="title" style="font-size: 1.5em"> Additional Details</h1> |
| 69 | +<?php |
| 70 | +//More datails |
| 71 | + $sql="SELECT * from extradetail where regno=".$regno; |
| 72 | + $result=$conn->query($sql); |
| 73 | + if($result->num_rows > 0) { |
| 74 | + $row = $result->fetch_assoc(); |
| 75 | + $DOB=isset($row['DOB'])?htmlspecialchars($row['DOB']):0; |
| 76 | + $fname=isset($row['fname'])?htmlspecialchars($row['fname']):0; |
| 77 | + $mname=isset($row['mname'])?htmlspecialchars($row['mname']):0; |
| 78 | + $gemail=isset($row['gemail'])?htmlspecialchars($row['gemail']):0; |
| 79 | + $address=isset($row['address'])?htmlspecialchars($row['address']):0; |
| 80 | + $m10=isset($row['m10'])?htmlspecialchars($row['m10']):0; |
| 81 | + $m12=isset($row['m12'])?htmlspecialchars($row['m12']):0; |
| 82 | + $ECA=isset($row['ECA'])&&$row['ECA']!=''?htmlspecialchars($row['ECA']):"N/A"; |
| 83 | + $Achievement=isset($row['Achievement'])&&$row['Achievement']!=''?htmlspecialchars($row['Achievement']):"N/A"; |
| 84 | + $hobby=isset($row['hobby'])?htmlspecialchars($row['hobby']):0; |
| 85 | + } |
| 86 | + else{ |
| 87 | + $DOB=$fname=$mname=$gemail=$address=$m10=$m12=$ECA=$Achievement=$hobby='N/A'; |
| 88 | + } |
| 89 | + echo '<h1 class="title title2" style="font-size: 3em"> Additional Details</h1> |
73 | 90 | <div>
|
74 | 91 | <!--content-->
|
75 | 92 | <div class="content">
|
76 | 93 | <img class="design" src="img/back2.png">
|
77 | 94 | <h1> Personal Details:</h1>
|
78 |
| - <form method="POST" action="reg.php"> |
79 |
| - <h3 class="heading">Date of Birth: <input type="date" name="DOB" placeholder="Enter Date of Birth" required></h3> |
80 |
| - <h3 class="heading">Age: <input type="number" name="age" placeholder="Your age here" readonly></h3> |
81 |
| - <h3 class="heading">Address: <input type="text" name="address" placeholder="Enter your address" required></h3> |
82 |
| - <h3 class="heading">Father\'s Name: <input type="text" name="fname" placeholder="Enter your Father\'s name" required></h3> |
83 |
| - <h3 class="heading">Mothers\'s Name: <input type="text" name="mname" placeholder="Enter your Mother\'s name" required></h3> |
84 |
| - <h3 class="heading">Guardian\'s Email Id: <input type="email" name="email" placeholder="Enter email" required></h3> |
85 |
| - <div class="wrap"><h4 class="message2"></h4></div> |
| 95 | + <h3 class="heading">Date of Birth: <a class=detail>'.$DOB.'</a></h3> |
| 96 | + <h3 class="heading"><a class=detail>'.$DOB.'</a></h3> |
| 97 | + <h3 class="heading">Father\'s Name: <a class=detail>'.$fname.'</a></h3> |
| 98 | + <h3 class="heading">Mother\'s Name: <a class=detail>'.$mname.'</a></h3> |
| 99 | + <h3 class="heading">Guardian\'s email: <a class=detail>'.$gemail.'</a></h3> |
| 100 | + <h3 class="heading">Address: <a class=detail>'.$address.'</a></h3><br> |
86 | 101 | <br>
|
87 |
| - </form> |
88 | 102 | </div>
|
89 | 103 | </div>
|
90 | 104 | <br>
|
|
93 | 107 | <div class="content">
|
94 | 108 | <img class="design" src="img/back2.png">
|
95 | 109 | <h1> Academic Details:</h1>
|
96 |
| - <form method="POST" action="reg.php"> |
97 |
| - <h3 class="heading">10th Standard marks: <input type="number" name="10m" placeholder="Class 10 percentage here" required></h3> |
98 |
| - <h3 class="heading">12th Standard marks: <input type="number" name="12m" placeholder="Class 12 percentage here" required></h3> |
99 |
| - <h3 class="heading">Extra Curricular<br>Activities: <input type="text" name="ECA" placeholder="Extra Curricular Activities here" required></h3> |
100 |
| - <h3 class="heading">Scholastic<br>Achievements: <input type="number" name="Acievement" placeholder="Scholastic Achievements here" required></h3> |
101 |
| - <h3 class="heading">Hobbies: |
102 |
| - <select name="course" required> |
103 |
| - <option>Select Hobby</option> |
104 |
| - <option value="Painting">Painting</option> |
105 |
| - <option value="Gaming">Gaming</option> |
106 |
| - <option value="Playing Guitar">Playing Guitar</option> |
107 |
| - <option value="Singing">Singing</option> |
108 |
| - <option value="Dancing">Dancing</option> |
109 |
| - <option value="Travelling">Travelling</option> |
110 |
| - <option value="Reading">Reading</option> |
111 |
| - <option value="Beatboxing">Beatboxing</option> |
112 |
| - </select> |
113 |
| - </h3> |
114 |
| - <div class="wrap"><h4 class="message2"></h4></div> |
115 |
| - <br> |
116 |
| - </form> |
| 110 | + <h3 class="heading">10th Standard marks: <a class=detail>'.$m10.'</a></h3> |
| 111 | + <h3 class="heading">12th Standard marks: <a class=detail>'.$m12.'</a></h3> |
| 112 | + <h3 class="heading">Extra Curricular<br>Activities: <a class=detail>'.$ECA.'</a></h3> |
| 113 | + <h3 class="heading">Scholastic<br>Achievements: <a class=detail>'.$Achievement.'</a></h3> |
| 114 | + <h3 class="heading">Hobbies: <br> |
| 115 | + <img src="img/back2.jpg" class="hobby"> |
| 116 | + '; |
| 117 | + $hobbies=(explode(",",$hobby)); |
| 118 | + foreach($hobbies as $selected) |
| 119 | + echo "  <a class=detail>".$selected."</a><br>"; |
| 120 | + echo '</h3> |
117 | 121 | </div>
|
118 | 122 | </div>
|
119 | 123 | <br>
|
120 | 124 | <div>
|
121 | 125 | <!--content-->
|
122 |
| - <div class="content"> |
123 |
| - <form method="POST" action="reg.php"> |
124 |
| - <br> |
125 |
| - <div class="wrap"><button class="nav" id="update_button" type="submit">Update</button> |
126 |
| - <button class="nav" id="set_button" type="submit">Set</button></div> |
127 |
| - <br> |
128 |
| - </form> |
129 | 126 | </div>
|
130 | 127 | </div>
|
131 |
| -</div> |
132 |
| - |
| 128 | + '; |
| 129 | +?> |
133 | 130 | </body>
|
134 | 131 | </html>
|
0 commit comments