<?php
$link=mysql_connect("localhost","root","");
mysql_select_db("digitalcsr",$link);
?>
<!DOCTYPE html>
<html>
<body>
<!-- Apply button -->
<input type="submit" name="sub" value="sumbit" class="btn btn-warning" data-toggle="modal" data-target="#myModal">
<font size="3" color="Black"></font></input>
<!-- //Apply button -->
<br>
<!-- Pop Up form -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-body">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Apply Project</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form action="#" method="post">
<div class="modal-body mx-3">
<div class="md-form mb-5">
<i class="fa fa-user prefix grey-text"></i>
<!-- //Fetch ID here -->
<label data-error="wrong" data-success="right" for="orangeForm-name">Project Id</label>
<input type="text" id="orangeForm-name" name="Project_Id" class="form-control validate"
value="<?php echo ('$chk'); ?>">
</div>
<div class="md-form mb-5">
<i class="fa fa-user prefix grey-text"></i>
<label data-error="wrong" data-success="right" for="orangeForm-name">Organization Name</label>
<input type="text" id="orangeForm-name" name="org_name" class="form-control validate">
</div>
<div class="md-form mb-5">
<i class="fa fa-envelope prefix grey-text"></i>
<label data-error="wrong" data-success="right" for="orangeForm-email">Your Email</label>
<input type="email" id="orangeForm-email" name="email" class="form-control validate">
</div>
<div class="md-form mb-4">
<i class="fa fa-lock prefix grey-text"></i>
<label data-error="wrong" data-success="right" for="orangeForm-pass">Your Phone Number</label>
<input type="number" id="orangeForm-pass" name="phone" class="form-control validate">
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-deep-orange" name="sumbit1" type="submit">Apply</button>
</div>
</form>
<?php include_once 'apply_db.php';?>
</div>
</div>
</div>
</div>
<!-- //Pop Up form -->
<br>
<!-- table -->
<table id="example" class="table table-striped table-hover dt-responsive" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th><h4>Project ID</h4></th>
<th><h4>Project Name</h4></th>
<th><h4>Sector</h4><br>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search..">
</th>
<th><h4>Duration</h4></th>
<th><h4>Budget</h4></th>
<th><h4>location</h4><br><input type="text" id="myInput1" onkeyup="myFunction()" placeholder="Search.."></th>
<th><h4>Objective</h4></th>
</tr>
</thead>
<tbody>
<?php $query="select * from sponsors";
$row=mysql_query($query);
$count=1;
while($data=mysql_fetch_array($row))
{
?>
<tr> <form action="" method="post">
<!-- //CheckBOX -->
<td> <input type="checkbox" name="check_id[]" value="<?php $row["project_id"];?>"></td>
<td><?php echo $data["project_id"]; ?></td>
<td><?php echo $data["project_name"]; ?></td>
<td><?php echo $data["sector"]; ?></td>
<td><?php echo $data["duration"]; ?></td>
<td><?php echo $data["budget"]; ?></td>
<td><?php echo $data["location"]; ?></td>
<td><?php echo $data["objective"]; ?></td>
</div>
</form>
</tr>
<?php $count++;
}
?>
</tbody>
</table>
<!-- //table -->
</body>
</html>
Add a code snippet to your website: www.paste.org