User must login to access the pages

[size=12pt]Below is my code where the link will be generated from database… when user wanted to access the link they must be logged in… if user didnt login then he cannt view the fully data from the link that genareted from database…[/size]

[php]

<?php echo $servername; ?> Features
    <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }

    mysql_select_db(“job_seeks”, $con);

    $result = mysql_query(“SELECT * FROM employer_user”);
    while($row = mysql_fetch_array($result))
    {
    echo “

  • <a href=”."?page=job_detail".">".$row[‘business_name’]."
  • ";
    }
    echo “”;
    echo “”;

    mysql_close($con);
    ?>

[/php]

[size=12pt]And below this is the code for the page that user needed to login to access this page after click the link that provided at above code… this page is linked with the code at the top[/size]

[php]

<?php echo $servername; ?> Features
    <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }

    mysql_select_db(“job_seeks”, $con);

    $result = mysql_query(“SELECT * FROM employer_user”);
    $row = mysql_fetch_array($result);
    ?>

    <?php echo " "; echo "
    Username : ".$row['username']."
    Business Name : ".$row['business_name']."
    Address : ".$row['address']."
    Location : ".$row['location']."
    City/Town : ".$row['city_town']."
    Email : ".$row['email']."
    Phone Number : ".$row['phone']."
    Qualification : ".$row['qualification']."
    Salary : ".$row['salary']."
    Description : ".$row['company_description']."
    "; echo "

    "; ?>

[/php]

[size=12pt]So what i gonna to do here to set it?[/size]

solved

Sponsor our Newsletter | Privacy Policy | Terms of Service