php server self
<form action="<?php echo $_SERVER['PHP_SELF']; ?>">
//there is no reason to use this to submit form data to the same page
<form action="">
//will do the same thing
php server self
<form action="<?php echo $_SERVER['PHP_SELF']; ?>">
//there is no reason to use this to submit form data to the same page
<form action="">
//will do the same thing
php server request method
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// The request is using the POST method
}
php server name
echo $_SERVER['PHP_SELF'];
echo "<br>";
echo $_SERVER['SERVER_NAME'];
echo "<br>";
echo $_SERVER['HTTP_HOST'];
echo "<br>";
// echo $_SERVER['HTTP_REFERER'];
echo "<br>";
echo $_SERVER['HTTP_USER_AGENT'];
echo "<br>";
echo $_SERVER['SCRIPT_NAME'];
php check request method
$_SERVER['REQUEST_METHOD']
what does $request do in php
$message = "";
if($_REQUEST['msg'] == "new"){
$message = "New User has been added successfully";
}else if($_REQUEST['msg'] == 'edit'){
$message = "User has been saved successfully";
}else if($_REQUEST['msg'] == 'update'){
$message = "User(s) has been Updated successfully";
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us