Jump to content

Undefined index error


anybody99

Recommended Posts

When trying to view:

http://mhu27900.1111mb.com/member.php

it says: Undefined index: uid & pwd

 

Where would be the cause of the problem?

 

<?



    $uid = $_SESSION['uid'];
    $pwd = $_SESSION['pwd'];

require('main.php');

db_connect();

include(INC_DIR."header.php");

	if ($uid){

		echo "<br> - Already logged in, <a href='member.php'>continue</a> ( 

or be redirected )
";

	} else {

		echo "<br><Span Class=emph>Members Log In</SPAN>";

    			include(INC_DIR."login.php");


	}


include(INC_DIR."footer.php");

db_disconnect();

?>

Link to comment
https://forums.phpfreaks.com/topic/49200-undefined-index-error/
Share on other sites

tnx but this one too, says line 117 118

 

      $_SESSION['uid'] = $_REQUEST['uid'];

      $_SESSION['pwd'] = $_REQUEST['pwd'];

 

<?

require('main.php');


    if (!isset($_SESSION['uid'])) {
       $_SESSION['uid'] = $_REQUEST['uid'];
       $_SESSION['pwd'] = $_REQUEST['pwd'];
    }

    $uid = $_SESSION['uid'];
    $pwd = $_SESSION['pwd'];

db_connect();

Link to comment
https://forums.phpfreaks.com/topic/49200-undefined-index-error/#findComment-241129
Share on other sites

<?php

require('main.php');
    if (!isset($_SESSION['uid'])) {
       $_SESSION['uid'] = isset($_REQUEST['uid'])?$_REQUEST['uid']:"";
       $_SESSION['pwd'] = isset($_REQUEST['pwd'])?$_REQUEST['pwd']:"";
    }

    $uid = $_SESSION['uid'];
    $pwd = $_SESSION['pwd'];

db_connect();

Link to comment
https://forums.phpfreaks.com/topic/49200-undefined-index-error/#findComment-241133
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.