post fix #2
This commit is contained in:
parent
5bebf2ead6
commit
8978efd4dd
@ -1,5 +1,19 @@
|
|||||||
<?php if( !isset( $_SESSION ) ) session_start();
|
<?php
|
||||||
$user_id = $_SESSION['user_id'];
|
include "../settings/db_connect.php";
|
||||||
|
|
||||||
|
$post = $_GET['post'];
|
||||||
|
|
||||||
|
if ($sql = $mysqli->prepare("SELECT blog_id FROM post WHERE post_id =$post"))
|
||||||
|
{
|
||||||
|
$sql->execute();
|
||||||
|
$sql->bind_result($id_blog);
|
||||||
|
while ($sql->fetch())
|
||||||
|
{
|
||||||
|
$blog_id=$id_blog;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$sql->close();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html lang="pl-PL">
|
<html lang="pl-PL">
|
||||||
<head>
|
<head>
|
||||||
@ -31,7 +45,7 @@ $user_id = $_SESSION['user_id'];
|
|||||||
Menu
|
Menu
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
||||||
<li><a href="blog.php?user_id=<?php echo $user_id; ?>">Wróć do bloga</a></li>
|
<li><a href="blog.php?user_id=<?php echo $blog_id; ?>">Wróć do bloga</a></li>
|
||||||
<li><a href="../index.html">Strona główna</a></li>
|
<li><a href="../index.html">Strona główna</a></li>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,9 +63,7 @@ $user_id = $_SESSION['user_id'];
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include "../settings/db_connect.php";
|
|
||||||
|
|
||||||
$post = $_GET['post'];
|
|
||||||
$trash = '';
|
$trash = '';
|
||||||
if ($sql = $mysqli->prepare("SELECT * FROM post WHERE post_id =$post"))
|
if ($sql = $mysqli->prepare("SELECT * FROM post WHERE post_id =$post"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user