This is a discussion on "input $_SESSION['username'] = $username; on login page help" within the PHP Forum section. This forum, and the thread "input $_SESSION['username'] = $username; on login page help are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
input $_SESSION['username'] = $username; on login page help
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
input $_SESSION['username'] = $username; on login page help
Hi i was just wondering how i input this
Aaron |
|
|
|
#2
|
||||
|
||||
|
Re: input $_SESSION['username'] = $username; on login page help
I don't understand the question. It looks to me like you have set $_SESSION['username']=$username and have a form to receive the input. Just set $username=$_POST['username'] in the form handler somewhere before you set the session username.
There are two things. Since you have a POST form at the bottom of the page, why don't you just use a long "if (isset($_POST['submit'])) {" for the form handler? That javascript looks very shaky. This is the standard way to handle a single page form & form handler. Second is, I can't understand any possible reason to use "session_register()". Take out all uses of it and similar deprecated functions, i.e. "session_is_registered()". And make sure you have register_globals set to "off" in your php.ini for your entire site. |
|
#3
|
|||
|
|||
|
Re: input $_SESSION['username'] = $username; on login page help
Hi right i found out what code i want
but what i want is to redirect the login.php page to my index.php page and then it will show this "Welcome Guest or Welcome Aaron1988" something like that mate. and the code which should do that is
Hope that is clear if not let us know. Thanks Aaron |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| validating username | sudhakararaog | PHP Forum | 0 | May 27th, 2008 17:50 |
| validating username | sudhakararaog | PHP Forum | 1 | May 26th, 2008 21:29 |
| username validation | Monie | Classic ASP | 0 | Sep 9th, 2004 01:53 |