note 109474 deleted from function.header by tularis
| From: | tularis@php.net | Date: | Fri, 04 Apr 2014 11:33:29 +0000 |
| Subject: | note 109474 deleted from function.header by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-199180@lists.php.net to get a copy of this message | ||
Note Submitter: mahdi at jowkar dot ir
----
You can use header(); function to show programs Errors
for example
// Errors.php
<?php
if(isset($_GET['iderror']))
{
echo '<div align="center">';
switch($_GET['iderror'])
{
case 1:
echo "we can not found your username or password";
breaak;
case 2:
echo "please login";
break;
}
echo '</div>';
}
else
{
echo "please send your Errors code";
}
?>
//panel.php
<?php
// ...
if($_SESSION['access'] == "")
{
header("Location: Errors.php?id=1");
}
if($_SESSION['username'] == "")
{
header("Location: Errors.php?id=2");
}
?>