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
<a href="delete.php?id=22" onclick="return confirm('Are you sure?')">Link</a> |
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
$query = "SELECT type | |
FROM budget | |
WHERE coupleID = '$login_id' | |
GROUP BY type | |
HAVING COUNT(type) >=1"; | |
$result = mysqli_query($connection, $query); | |
// suppose you have 3 times same car in databse column this only show one time |
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 mutliple same database colomn value in 1 time , further sum of that particular column values and show them right now. | |
<?php | |
$login_id = ""; | |
if (isset($_SESSION['coupleID'])) { | |
$login_id = $_SESSION['coupleID']; | |
} | |
$query = "SELECT type, estimate, actual, paid , pending | |
FROM budget | |
WHERE coupleID = '$login_id' |
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
<form method="Post" enctype="multipart/form-data"> | |
<input type="file" name="file[]" multiple> | |
<input type="submit" name="submit"> | |
</form> | |
<?php | |
if (isset($_POST['submit'])) { | |
$j = 0; // Variable for indexing uploaded image. |
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
rewite url from http://localhost/realwed/couples.php?username=demo to http://localhost/realwed/couples/demo | |
.htaccess // create file | |
RewriteEngine On | |
RewriteRule ^([a-z0-9]+)$ couple.php?username=$1 [QSA,L] |
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 | |
$db['db_host'] = "localhost:3306"; | |
$db['db_user'] = "enterusername"; | |
$db['db_pass'] = "enterpass"; | |
$db['db_name'] = "dbname"; | |
foreach ($db as $key => $values ){ | |
define(strtoupper($key), $values); | |
} |
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 | |
if(isset($_POST['submit'])){ | |
echo "<pre>"; | |
print_r($_FILES['file_upload']); | |
echo "</pre>"; | |
$upload_error = array( |
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 | |
if(isset($_POST['submit'])){ | |
echo "<pre>"; | |
print_r($_FILES['file_upload']); | |
echo "</pre>"; | |
$upload_error = array( |
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 | |
if(isset($_GET['pid'])){ | |
$pid = $_GET['pid']; | |
} | |
$id = base64_decode($pid); | |
echo $id; |
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
setTimeout(function(){ | |
console.log("I entered"); | |
jQuery( document ).on('click' , '.duplicate' , function(e){ | |
e.preventDefault(); | |
var dd = jQuery(this).attr('data-id'); | |
console.log(dd); | |
}); |