A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 101

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 127

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$log is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$hooks is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$config is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$uri is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$router is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$output is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$security is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$input is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$lang is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$load is deprecated

Filename: core/Controller.php

Line Number: 78

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$db is deprecated

Filename: core/Loader.php

Line Number: 396

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_DB_mysqli_driver::$failover is deprecated

Filename: database/DB_driver.php

Line Number: 371

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 132

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 292

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 166

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 235

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 315

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 356

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$session is deprecated

Filename: core/Loader.php

Line Number: 1283

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 1283

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 8
Function: __construct

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Circle::$m_data is deprecated

Filename: core/Loader.php

Line Number: 358

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 10
Function: model

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$db is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$session is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$m_data is deprecated

Filename: core/Loader.php

Line Number: 931

Backtrace:

File: /home/u7641530/public_html/malasngoding.com/cicore/application/controllers/Circle.php
Line: 502
Function: view

File: /home/u7641530/public_html/malasngoding.com/index.php
Line: 326
Function: require_once

Bagaimana cara menampilkan foto profil user setelah login menggunakan php- Circle
pine
asas 3 tahun yang lalu
2.5k 1 PHP

Bagaimana cara menampilkan foto profil user setelah login menggunakan php


<?php 
	session_start();
 
	// cek apakah yang mengakses halaman ini sudah login
	if($_SESSION['user_type']==""){
		header("location:index.php?pesan=gagal");
	}
 
	?>

<?php include('koneksi.php') ?>
<!doctype html>
<html lang="en">
  <head>
  	<title>Siswa TKJ</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
		
		<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
		<link rel="stylesheet" href="coba.css">
		<link href="assets/css/main.css" rel="stylesheet">
		<link rel="stylesheet" href="test.css">
  </head>
  <body>
		
		<div class="wrapper d-flex align-items-stretch">
			<nav id="sidebar">
				<div class="custom-menu">
					<button type="button" id="sidebarCollapse" class="btn btn-primary">
	          <i class="fa fa-bars"></i>
	          <span class="sr-only">Toggle Menu</span>
	        </button>
        </div>
				<div class="p-4 pt-5">
		  		<h1><a href="siswa-menu.php" class="logo">Siswa</a></h1>
	        <ul class="list-unstyled components mb-5">

			<div class="side-inner">

<div class="profile">
<img src="poto/<?=$_SESSION['photo']?>" alt="image"/>
</div>
<br>
          <li>
            <?php echo "<li style='color: white;'>"; ?>Halo <b><?php echo $_SESSION['username']; ?></b> ! Anda telah login sebagai <b><?php echo $_SESSION['user_type']; ?></b>.
          </li>
				<li>
	              <a href="materi-siswa.php">Materi</a>
	          </li>
	          <li>
	              <a href="tugas-siswa.php">Tugas</a>
	          </li>
	          <li>
	              <a href="jadwal-siswa.php">Jadwal</a>
	          </li>
	          <li>
              <a href="pengumuman-murid.php">Pengumuman</a>
	          </li>
			  <li>
              <a href="infopkl-siswa.php">Info PKL</a>
	          </li>
			  <li>
              <a href="daftarbiodata.php">Daftar Biodata</a>
	          </li>
	          <li>
              <a href="logout.php">Log Out</a>
	          </li>
	        </ul>

	        <div class="footer">
	        	<p><!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
					  Copyright &copy;<script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="icon-heart" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank">Colorlib.com</a>
		  <a href="#" class="instagram"><i class="bi bi-instagram"></i></a>
						  <!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></p>
	        </div>

	      </div>
    	</nav>

        <!-- Page Content  -->
    <div id="content" class="p-4 p-md-5 pt-5">

    <!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

	<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
	
	<link rel="stylesheet" href="style.css">

	</head>
	<body>
    <section id="about" class="about">
      <div class="container" data-aos="fade-up">
        <div class="section-header">
          <h2>Beranda</h2>
        </div>
				</div>
		
	</section>

	</div>

    <script src="jquery.min.js"></script>
    <script src="popper.js"></script>
    <script src="bootstrap.min.js"></script>
    <script src="main.js"></script>
  </body>
</html>

1 Jawaban

Jhony Code
daycode3 tahun yang lalu
pastikan kalau di table si user sudah menyimpan nama file foto nya. kemudian nama file foto si user tinggal panggil pakai query "where user_id='isi id user yg login di sini'"
0
Silahkan Login untuk menjawab.

Top Coder

Nadia Putri
nadiaputri
630 Point
Laras Ayu
larasayu
565 Point
Arif Wibowo
arifwbw
520 Point
Aulia Rizki
auliarzk
515 Point
Rizky Hidayat
rizkyhdyt
480 Point
Ilham Nurdin
ilhamnrdn
475 Point