HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/camrub.com/public_html/includes/inc.add_favorites.php
<?
session_start();
include('../admin/db.php');

if(!$_SESSION['userid']) {
    $info = 'You have to be logged in to add this content to your favorites.';    
}

if(!isset($info)){
    if(!isset($_REQUEST['site']) || !isset($_REQUEST['username'])) {
        $info = 'Invalid content ID.';
    } else { 
		$site = (int)$_REQUEST['site'];
		$username = mysqli_real_escape_string($dblink,$_REQUEST['username']);
		dbQuery("INSERT IGNORE INTO favorites SET user = '".(int)$_SESSION['userid']."', performer_name = '".$username."', performer_site = '".(int)$site."'");
		$info = "Added to favorites!";
	}
}
echo $info;