<?php

session_start();
$db_host="localhost";
$db_user='root';
$db_pass='';
$db_name='mlmll';
$conn=mysqli_connect($db_host,$db_user,$db_pass,$db_name);
if (!$conn) {
  echo "Not connect";
}

if (isset($_SESSION['session_id']) && isset($_SESSION['user_id'])) {
  $my_id=$_SESSION['user_id'];
} else {
  header("Location:../../login.php");
}
error_reporting(0);

isset($_SESSION["id"]) && ($stmt = $conn->prepare("SELECT user_id FROM users WHERE id = ?")) &&
$stmt->bind_param("i", $_SESSION["id"]) &&
$stmt->execute() &&
($result = $stmt->get_result()) &&
($row = $result->fetch_assoc()) &&
($userId = $row["user_id"]);

$query = "SELECT * FROM com_details";
$data = mysqli_query($conn,$query);

$row= mysqli_fetch_array($data);

$web_name = $row[0];
$address = $row[1];
$email = $row[2];
$mobile = $row[3];
$insta_link = $row[4];
$facebook_link = $row[5];
$youtube_link = $row[6];


 ?>
