Jump to content

not getting varible value by post


murli800

Recommended Posts

i am trying to create a code in which person has to login and then had to register his/her entry and exit timings...but my problem is that when i click $username is not accessible in if condition it gives....

 

 

Notice: Undefined index: username in C:\wamp\www\myproject\public\newatt\attendance.php on line 8

 

Notice: Undefined index: pwd in C:\wamp\www\myproject\public\newatt\attendance.php on line 9

Hi

i am in andar30/04/2011 05:49

 

 

i am accepting username by post and feeding it to variable in $username..help me

 

[attachment deleted by admin]

Link to comment
Share on other sites

This is because you need to check if these variables are set before using them

if(isset($_GET['username']) && isset($_GET['pwd']))
{
     // your code here for authenticating the user
}
else
{
     // display login form here
}

 

having the username/password within the url is insecure. You should be submitting your form with the post method.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.