This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* array value group, array group with value, groupArray function */ | |
class dashboardController extends Controller | |
{ | |
public function groupArray($arr, $group, $preserveGroupKey = false, $preserveSubArrays = false) { | |
$temp = array(); | |
foreach($arr as $key => $value) { | |
$groupValue = $value[$group]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* mysql connect with php */ | |
$servername = "localhost"; | |
$username = "username"; | |
$password = "password"; | |
$dbname = "myDB"; | |
// Create connection | |
$conn= mysqli_connect($servername,$username,$password,$dbname); | |
// Check connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHOW VARIABLES LIKE ‘%version%’; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT VERSION(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servername = "localhost"; | |
$username = "username"; | |
$password = "password"; | |
$dbname = "myDBPDO"; | |
try { | |
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password); | |
// set the PDO error mode to exception | |
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "<table style='border: solid 1px black;'>"; | |
echo "<tr><th>Id</th><th>Firstname</th><th>Lastname</th></tr>"; | |
class TableRows extends RecursiveIteratorIterator { | |
function __construct($it) { | |
parent::__construct($it, self::LEAVES_ONLY); | |
} | |
function current() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servername = "localhost"; | |
$username = "username"; | |
$password = "password"; | |
$dbname = "myDBPDO"; | |
try { | |
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password); | |
// set the PDO error mode to exception | |
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="checkbox"> | |
<p style="font-size:12px; margin:10px 0px;">Terms & conditions</p> | |
<span class="check-box"> | |
<label><input type="checkbox" name="terms_conditions" id="terms_conditions"> Terms & conditions</label> | |
</div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (isset($_SESSION['success_message']) && !empty($_SESSION['success_message'])) { ?> | |
<div class="success-message" style="text-align:center; margin-bottom: 20px;font-size: 20px;color: green;"><?php echo $_SESSION['success_message']; ?></div> | |
<?php | |
unset($_SESSION['success_message']); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: require(/opt/lampp/htdocs/teedu-api/public/../vendor/autoload.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/teedu-api/public/index.php on line 24 | |
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/teedu-api/public/../vendor/autoload.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/teedu-api/public/index.php on line 24 | |
OlderNewer