Search
 
SCRIPT & CODE EXAMPLE
 

PHP

MySQL table in new page after click php

$result = mysqli_query($conn,"SELECT * FROM job ORDER BY `CreatedTime` DESC");


echo "<table border='0' cellpadding='0' cellspacing='0' class='table-fill'> 
<tr>
<th width='250px' position='fixed'>Job Title</th> 
<th width='150px'>Company Name</th>
<th width='100px'>Location</th>
<th>Closing Date</th>
<th>View Job</th>
</tr>";


while($row = mysqli_fetch_array($result) ) {
echo "<tr>";
echo "<td>" . $row['positiontitle'] . "</td>";
echo "<td>" . $row['companyname'] . "</td>";
echo "<td>" . $row['location'] . "</td>";
echo "<td>" . $row['closingdate'] . "</td>";
echo "<td><a href='job_details.php?id=".$row['job_id']."'>View Job</td>";

echo "</tr>";
}



And in job_details.php fetch the details against the id and display the result on that page.

jobdetails.php :

<?php

   $result = mysqli_query($conn,"SELECT * FROM job WHERE job_id = '".$_GET['id']."' ORDER BY `CreatedTime` DESC");

   $jobdetails = mysqli_fetch_assoc($result);

   echo 'Position : '.$jobdetails['positiontitle'].'<br>';
   echo 'Company Name: '.$jobdetails['companyname'].'<br>';
   echo 'Location: '.$jobdetails['location'].'<br>';
   echo 'Closing Date: '.$jobdetails['closingdate'].'<br>';


?>
Comment

PREVIOUS NEXT
Code Example
Php :: php try catch non object 
Php :: sha256 php cantidad caracteres 
Php :: Add Text After or Before on the Shop Page/Archive Page 
Php :: php create html code 
Php :: git reset head 3 . how to back git init 
Php :: laravel migration int length 
Php :: Override the route parameter names 
Php :: IP Authorization php code 
Php :: how to login first before see index php 
Php :: laravel transactions eloquent 
Php :: woocommerce function traduccion label 
Php :: php convert float 
Php :: download pdf file from database in php 
Php :: mixed content laravel form target 
Php :: extract in php 
Php :: wordpress how to display breadcrumb in child theme programmatically 
Php :: Trying to access variable outside laravel collection 
Php :: get 2 hrs before data in php 
Php :: php timezone paris 
Php :: laravel password test 
Php :: php $_session err_miss_cache 
Php :: + php quantifer 
Php :: php division 
Php :: check email veriy or not laravel 
Php :: string put inside tag string php 
Php :: mysqli connect error 
Php :: divide page in pdf with page break using php 
Php :: how get some parameter from request in laravel 
Php :: cors header ‘access-control-allow-origin’ missing IN PARTICULAR CAKEPHP API 
Php :: laravel edit method 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =