| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/projects/jobportal/ |
Upload File : |
<?php
include("dbconfig.php");
session_start();
?>
<?php
if($_SESSION["name"]=="")
{
header("location:reg.php");
}
?>
<?php
if(isset($_POST["uid"]))
{
$com=$_POST["comment"];
$comenterid=$_POST["comme_id"];
//postusr==commentuser
//$u_id=$_POST["uid"];
$p_id=$_POST["pid"];
$uid=$_SESSION["id"];
$sql2=mysqli_query($con,"select usr_id_p from posts where post_id='$p_id'");
while($row=mysqli_fetch_array($sql2))
{
$user=$row["usr_id_p"];
}
$sql= mysqli_query($con,"insert into comments(post_id_c,user_id_c,comment,comment_time) values('$p_id','$uid','$com',now())");
$sql1= mysqli_query($con,"insert into notification(pos_id,post_usr,comm_user,comment,status,time)
values('$p_id','$comenterid','$uid','$com',0,now())");
//$sql=mysqli_query($con,"insert into comments(post_id_c,user_id_c,comment,comment_time) values('$p_id','$uid','$com',now())");
if($sql)
{
header("location:user.php");
}
}
?>