Skip to content

Nahiankhondokar/PHP_13-student-form-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

index.php files

<title>Class 49</title> = 12){ $mess = validationMsg('Your age is not allow for this institute ', 'warning', 'warning'); }else{ $sql = "INSERT INTO students (name, email, cell, uname, age, gender, shift, location, photo) VALUES ('$name','$email','$cell','$uname','$age','$gender','$shift','$location', '$unique_file_name')"; $connection -> query($sql); move_uploaded_file($file_tmp_name, 'photo/students/' . $unique_file_name); $mess = validationMsg('Registration Completed ', 'success', 'success'); } } ?>
All Students

Add New Student

	<?php 

	if ( isset($mess)) {
		echo $mess;
	}

	 ?>

  <div class="form-group ">
    <label for="exampleInputEmail1">Name</label>
    <input name="name" type="text" class="form-control text-white h-25">
  </div>

  <div class="form-group ">
    <label for="exampleInputEmail1">Email</label>
    <input name="email" type="text" class="form-control text-white h-25">
  </div>

  <div class="form-group ">
    <label for="exampleInputEmail1">Cell</label>
    <input name="cell" type="text" class="form-control text-white h-25">
  </div>

  <div class="form-group ">
    <label for="exampleInputEmail1">User Name</label>
    <input name="uname" type="text" class="form-control text-white h-25">
  </div>

  <div class="form-group ">
    <label for="exampleInputEmail1">Age</label>
    <input name="age" type="text" class="form-control text-white h-25">
  </div>

  <div class="form-group ">
    <label for="exampleInputEmail1">Gender</label><br>
    <input name="gender" type="radio" value="Male" class="text-white p-2" id="male"><label class="p-1" for="male"> Male</label>
    <input name="gender" type="radio" value="Female" class="text-white" id="female"><label class="p-1" for="female"> Female</label>
  </div>

  <div class="form-group ">
    <label for="exampleInputEmail1">Shift</label>
    <select class="form-control h-25 text-white" name="shift">
    	<option class="text-dark" value="">--Select--</option>
    	<option class="text-dark" value="day">Day</option>
    	<option class="text-dark" value="evening">Evening</option>
    </select>
  </div>


  <div class="form-group ">
    <label for="exampleInputEmail1">Location</label>
    <select class="form-control h-25 text-white" name="location">
    	<option class="text-dark" value="">--Select--</option>
    	<option class="text-dark" value="Dhaka">Dhaka</option>
    	<option class="text-dark" value="Barisal">Barisal</option>
    	<option class="text-dark" value="chittagong">chittagong</option>
    	<option class="text-dark" value="Khulna">Khulna</option>
    	<option class="text-dark" value="Mymensignh">Mymensignh</option>
    	<option class="text-dark" value="Rangpur">Rangpur</option>
    	<option class="text-dark" value="Sylhet">Sylhet</option>
    </select>
  </div>
  
  <div class="form-group ">
    <label for="exampleInputEmail1">Photo</label>
    <input name="photo" type="file" class="form-control-file text-white">
  </div>
  <button name="add" type="submit" class="btn btn-primary">Add new student</button>
</form>
<script src="assets/js/jquery-3.5.1.slim.min.js"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script>
	


</script>

student.php files

<title></title>
Add New Students

All Students

query($sql); // Different style of taking while loop(without curly braket) while ($student = $data -> fetch_assoc() ) : ?>
No Name Gender Email Cell Location Photo Action
View Edit Delete




<script src="assets/js/jquery-3.5.1.slim.min.js"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script>
	


</script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published