Re: first time session values are not seeting in variable they are setting second

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



k. fine. Can u plz send the complete codes ? 
I dont see a login form . If you evaluate the o/p correctly it may solve your problem . If you are unaware of it send me the codes and I will try it out and let you know , Send the name of the files as it is ........ Dont alter .

Hari K T

http://www.harikt.com/
http://ijust4u.blogspot.com/


--- On Sat, 14/2/09, srinivas pmm <malayappa@xxxxxxxxxxxxxxxxxx> wrote:
From: srinivas pmm <malayappa@xxxxxxxxxxxxxxxxxx>
Subject: Re:  first time session values are not seeting in  variable they are setting second
To: php-objects@xxxxxxxxxxxxxxx
Date: Saturday, 14 February, 2009, 7:32 AM











    
            i replased starting with session_start( ) stitll not getting values plz

provide some help urgent

<?php

session_start( );

include("config. php");



$mainU=$_POST[ 'username' ];

    $mainP=$_POST[ 'password' ];

    $exQ=mysql_query( "SELECT * FROM ztext_register WHERE username =

'".$mainU."' " ) or die(mysql_error( ));

    $fx = mysql_fetch_ array($exQ) ;

    $userid=$fx[ 'userid'] ;

    $username=$fx[ 'username' ];

    $password=$fx[ 'password' ];

    $email=$fx[' email'];

    $status=$fx[ 'blocked' ];

    $gateway=$fx[ 'gatewayno' ];

    if($status== 'y')

    {

    echo '<script>window. location= "blockmsg. php";</script> ';

     }



if($mainU == $fx['username' ])

    {

        if($mainP == $fx['password' ])

        {

            $_SESSION['userid' ]=$userid;

            $_SESSION['username ']=$mainU;

            $_SESSION['gatewayi d']=$gateway;

            echo '<script>window. location= "userhome. php";</script> ';

             }



else

      echo '<script>window. location= "error.php" ;</script> ';

}

else

echo '<script>window. location= "error.php" ;</script> ';



On Sat, Feb 14, 2009 at 1:25 AM, Shadman Jamil <falcon_shan@ yahoo.com>wrote:



>   in your first file "lgoincheck. php" put on top

>

> session_start( );

>

> then it will works hope so, best of luck

> best of luck,

> Shadman Jamil

>

> ____________ _________ _________ __

>

> From: malayappa2000 <malayappa@nannacomp uters.com<malayappa%40nannac omputers. com>

> >

> To: php-objects@ yahoogroups. com <php-objects% 40yahoogroups. com>

> Sent: Friday, February 13, 2009 9:59:22 PM

> Subject:  first time session values are not seeting in

> variable they are setting second

>

> hi fallowing is my logincheck page

> ------------ --------- --------- ---

> lgoincheck.php

>

> include "config.php" ;

>

>   $mainU=$_POST[ 'username' ];

>     $mainP=$_POST[ 'password' ];

>     $exQ=mysql_query( "SELECT * FROM ztext_register WHERE username =

> '".$mainU."' " ) or die(mysql_error( ));

>     $fx = mysql_fetch_ array($exQ) ;

>     $userid=$fx[ 'userid'] ;

>     $username=$fx[ 'username' ];

>     $password=$fx[ 'password' ];

>     $email=$fx[' email'];

>     $status=$fx[ 'blocked' ];

>

>     echo "username db is".$username. "<br>";

>     echo "username  db is".$userid. "<br>";

>     if($status== 'y')

>     {

>     echo '<script>window. location= "blockmsg. php";</script> ';

>     }

>

>     if($mainU==$ fx['username' ])

>     {

>         if($mainP ==$fx['password' ])

>         {

>             $_SESSION['userid' ]=$userid;

>             $_SESSION['username ']=$fx['username '];

>

>             echo '<script>window. location= "userhome. php";</script> ';

>             }

>

>     else

>     echo "password not correct";

>       echo '<script>window. location= "index.php? step=1";< /script>' ;

> }

> else

> echo "user name not correct";

> echo '<script>window. location= "index.php? step=1";< /script>' ;

>       ?>

>

> fallowing is user home page.

>

> ------------ --------- --------- -

>

> <?php session_start( );

> include "config.php" ;

> $username=$_ SESSION[' username' ];

> echo "$username". "hi";

> ?>

> when i try to login first time iam uable to get the username in

> userhome page.

>

> if try to login second time i am able to login

> because firts time session values are not setting .

> only second time session values are setting plesae provide some help

>

> ------------ --------- --------- ------

>

> Are you looking for a PHP job?

> Join the PHP Professionals directory Now!

> http://www.phpclass es.org/jobs/

> Yahoo! Groups Links

>

> [Non-text portions of this message have been removed]

>

>  

>



-- 

Regards

malayapppa

Home page : www.nannacomputers. com

An ISO 9001:2000 company



(This e-mail contains information from Nanna Computers, which may be

privileged or confidential. The information is for the intended

individual(s) or entity named above. If you are not the intended recipient

be aware that any copying, disclosing, distribution or use of the above

email and/or its attachments is prohibited and is illegal. If you have

received this electronic message in error, please notify us by telephone or

email (to the numbers or address above) immediately. This e-mail is not

un-solicited e-mail under the relevant regulations)



[Non-text portions of this message have been removed]




 

      

    
    
	
	 
	
	








	


	
	


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux