<?php
$username = $_GET['txtUsername'];
//url.php?txtUsername=nama%20saya
echo "username is " . $username;
$email = $_GET['txtEmail'];
$password = $_GET['txtPassword'];
$ConfPassword = $_GET['txtConfirmPassword'];
?>
All muhaza's note in developing website. Front-end & uiux method. Real life implementation for webdesigner.
<?php
$username = $_GET['txtUsername'];
//url.php?txtUsername=nama%20saya
echo "username is " . $username;
$email = $_GET['txtEmail'];
$password = $_GET['txtPassword'];
$ConfPassword = $_GET['txtConfirmPassword'];
?>
1. Open Cpanel
2. Go to Error Page
3. Open any of the error and put this code
4. change the url
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>location.href = 'https://korodklothing.com';</script>
</head>
<body></body>
</html>
https://www.opentechguides.com/how-to/article/php/100/mysql-to-json.html
<?php // Initialize variable for database credentials $dbhost = 'hostname'; $dbuser = 'username'; $dbpass = 'password'; $dbname = 'sakila'; //Create database connection $dblink = new mysqli($dbhost, $dbuser, $dbpass, $dbname); //Check connection was successful if ($dblink->connect_errno) { printf("Failed to connect to database"); exit(); } //Fetch 3 rows from actor table $result = $dblink->query("SELECT * FROM actor LIMIT 3"); //Initialize array variable $dbdata = array(); //Fetch into associative array while ( $row = $result->fetch_assoc()) { $dbdata[]=$row; } //Print array in JSON format echo json_encode($dbdata); ?>
[
{
"actor_id":"1",
"first_name":"PENELOPE",
"last_name":"GUINESS",
"last_update":"2006-02-15 04:34:33"
},
{
"actor_id":"2",
"first_name":"NICK",
"last_name":"WAHLBERG",
"last_update":"2006-02-15 04:34:33"
},
{
"actor_id":"3",
"first_name":"ED",
"last_name":"CHASE",
"last_update":"2006-02-15 04:34:33"
}
]
As you can see, the result is a valid JSON. You may use this in combination with Jquery/AJAX to pass database data to a web application that expects data in JSON.
require_once( get_stylesheet_directory(). '/woocommerce.php' );
require_once( get_stylesheet_directory(). '/widget.php' );
Below is the code
@media only screen and (max-width: 980px) {.two-columns .et_pb_column {width: 50%!important;}.three-columns .et_pb_column {width: 33.33%!important;}.four-columns .et_pb_column {width: 25%!important;}} |
$helloMuhaza = 'Hello, Muhaza Nak Letak Something Sini'.' <a href="/">a</a>';
add_action( 'wp_dashboard_setup', 'muhaza_widget_001' );
function muhaza_widget_001() {
wp_add_dashboard_widget(
'muhaza_001_dashboard_widget',/*nama widget*/
'Widget Muhaza 001',/*Screen Option Button*/
'muhaza_widget_001_display'/*function*/
);
}
function muhaza_widget_001_display() {
echo $GLOBALS['helloMuhaza'];
}
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
add_action( 'wp_dashboard_setup', 'muhaza_widget_002' );
function muhaza_widget_002() {
wp_add_dashboard_widget(
'muhaza_002_dashboard_widget',/*nama widget*/
'Widget Muhaza 002',/*Screen Option Button*/
'muhaza_widget_002_display'/*function dalam*/
);
}
function muhaza_widget_002_display() {
echo $GLOBALS['helloMuhaza'];
}
| iframe { | |
| position: fixed; | |
| background: #000; | |
| border: none; | |
| top: 0; right: 0; | |
| bottom: 0; left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } |
<?php if( current_user_can('editor') || current_user_can('administrator') ) {
// Stuff here for administrators or editors
} ?>
Template Redirect → function → member only → If open page → Not Logged In → redirect to home url
<?php
add_action('template_redirect','members_only');
function members_only(){
if( is_page('page-slug') && ! is_user_logged_in()){
wp_redirect( home_url());
die();
}
?>
Warning: Attempt to read property "post_status" on null in /home/xxx/public_html/wp-admin/includes/template.php on line 2298 Wa...