2
- Qoşuldu
- 6 Sen 2022
- Mesajlar
- 142
- Reaksiya hesabı
- 27
- Xallar
- 28
salam burda mene postu beyen/beyenme kodu lazimdi sade kodlarla bura kim uygunlasdirar?
xais pdo ile yazmayin.
likes tablem var post_id ve likes_id linyalariyla birge
<?php
require("head.php");
echo "<hr><a href=\"share.php\">Paylasim et</a><hr>";
echo "<hr><a href=\"?cokie=exit\">Cixiw et</a><hr>";
if($_GET["cokie"]=="exit"){
setcookie("login","",time()-(86400*30),"/");
setcookie("pass","",time()-(86400*30),"/");
}
$def=$db->query("select * from share");
foreach($def as $share){
echo $share["metn"]."<hr>";
echo "<img src=\"".$share["resim"]."\" alt=\"Resm\" width=\"240\" height=\"180\"><hr>";
echo "Paylasim vaxti: {$share["date"]}<hr>";
$id=$share["kim_id"];
$kimdi=$db->query("select * from users where id='$id'")->fetch_assoc();
echo "Paylasdi: {$kimdi["login"]}<hr>";
$count=$db->query("select * from share where id='{$share["id"]}'")->num_rows;
//print_r($count);
echo "<br><a href=\"beyen.php?id={$share["id"]}&kim={$share["kim_id"]}\">Beyen</a>({$count})<hr>";
}
?>
xais pdo ile yazmayin.
likes tablem var post_id ve likes_id linyalariyla birge
<?php
require("head.php");
echo "<hr><a href=\"share.php\">Paylasim et</a><hr>";
echo "<hr><a href=\"?cokie=exit\">Cixiw et</a><hr>";
if($_GET["cokie"]=="exit"){
setcookie("login","",time()-(86400*30),"/");
setcookie("pass","",time()-(86400*30),"/");
}
$def=$db->query("select * from share");
foreach($def as $share){
echo $share["metn"]."<hr>";
echo "<img src=\"".$share["resim"]."\" alt=\"Resm\" width=\"240\" height=\"180\"><hr>";
echo "Paylasim vaxti: {$share["date"]}<hr>";
$id=$share["kim_id"];
$kimdi=$db->query("select * from users where id='$id'")->fetch_assoc();
echo "Paylasdi: {$kimdi["login"]}<hr>";
$count=$db->query("select * from share where id='{$share["id"]}'")->num_rows;
//print_r($count);
echo "<br><a href=\"beyen.php?id={$share["id"]}&kim={$share["kim_id"]}\">Beyen</a>({$count})<hr>";
}
?>