SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy undefined index error

    hello frnds this is my code and dont know why this Undefined index: admin_name in C:\wamp\www\advance php\login\showadmin.php on line 15 pops up i am nt able to fix it please help me out

    PHP Code:
    <?php 
    var_dump
    ($_COOKIE);
    if(isset(
    $_COOKIE['s']))
    {
    require_once 
    'connect.php';
        
    $query=mysql_query("SELECT 'admin_name.admin_name','admin_name.admin_lastname','admin_name.admin_creattime',
            'admin_detail.admin_pass','admin_detail.admin_phone','admin_detail.admin_email','admin_detail.admin_gender'
    FROM admin_name,admin_detail "
    );
        if(!
    $query)
        {
            die(
    'nt good fail to select'.mysql_error());
        }
        else{
            while(
    $row=mysql_fetch_row($query)):
                 
    $name    $row['admin_name'];
                   
    $last     =$row['admin_lastname'];
                  
    $acctime    =$row['admin_creattime'];
                 
    $pass   =$row['admin_pass'];
                 
    $phone   =$row['admin_phone'];
                 
    $mail   =$row['admin_email'];
                 
    $gen   =$row['admin_gender'];
                 echo 
    $name." ".$last." ".$acctime." ".$pass." ".$phone." ".$mail." ".$gen;
                endwhile;
     }
    }
    else{
        echo 
    "sorry";
    }
     
    ?>
    Last edited by cpradio; Jun 28, 2013 at 10:33. Reason: added php tags


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •