I am trying a simple login/logout for my website. It works well with checking if the username exists in the database to logging in. I used $_SESSION['username']=$myusername; However, when I log-out, then I go to a page with this code
Code: <?php
session_start();
if($_SESSION['username']) //line5
echo "Welcome, ".$_SESSION['username']."!<br /><a href='logout.php'>Logout.</a>";
else
die ("You must be logged in!");
?>
It gives me an error. It says Notice: Undefined index: username in C:wampwwwdatbasmember.php on line 5
I just want to know how to fix this. Thank you
cstdatomic (c++0x std::atomic) / g++ 4.4
Hello,
Production of mango in processing industry
Hi,
Not sure why this script is not working?
Hi I am new to php programing and I was trying to make up a simple script like a captcha but I cannot get the validation part of it working. I think it should work but it is not. Anyone know what is
Data storage spaces in varchar2
Trying to understand what's happening.
Nested (echoed) php running wrong script
Got a problem with a php website I'm creating.In a nutshell, the first page is entirely html and calls a php script to process an uploaded file and some form fields using POST. After validating the
Something like an INI editor or a DelimitedText-Editor
Hi all,Am very, very, very new to PHP and not sure if I should be posting this to a Javascript or PHP forum so I posed the question on both FORUM.Basically, I am looking for something like an INI
Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?
mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:Code: [Select]while($row = mysqli_fetch_assoc($result)) { print_r($row);}But this returns multiple arrays
IF STATEMENT HELP
Hii have created a calendar from a table:Code: Calendar: October 2009<table width=300 border="1"><tr><th><a
Struct/union and scope problem!
HI all , I have