When I execute the script it returns no info just blanks:

First Name :
Last Name :
Email :

What is wrong with my script???

I have tried using the "while" function but I do not need it for what I am doing.


  $search = $_GET['search'];

  //connect  to the database
  $dbc = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);


  //-query  the database table
  $query = "SELECT * FROM `info` WHERE `first_name` = '$search'";
  $data = mysql_query($query);
  $row = mysql_fetch_array($data);
    echo "First Name :{$row['first_name']} <br>" .
         "Last Name : {$row['last_name']} <br>" .
         "Email : {$row['email']} <br><br>";

What is connectvars.php ? … also you use an array inside a string …this is not a good or clean idea
• echo "First Name :{".$row."} <br>" .
• "Last Name : {".$row."} <br>" .
• "Email : {".$row."} <br><br>";