#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    9
    Rep Power
    0
    i have written a php script which check user authetication for the specific data. The database is MYSQL.
    i wnat to call different html files like if the user is authentic it will go to the datbase file. if he is new user he should go to sign up.

    should i use link function if so how.<?


    if ($mem_name)
    {

    if($mem_pswd)
    {
    $db = mysql_connect("localhost", "mchayani", "Avirat")or die("Unable to connect to SQL server");

    mysql_select_db("savdhan_com",$db);

    $result = mysql_query ("SELECT * FROM mem_data WHERE Usr_name = '".$HTTP_POST_VARS["mem_name"]."'", $db);

    if ( $myrow = mysql_fetch_array ($result) )
    {
    if ( !strcmp($mem_pswd, $myrow["Password"]))
    {

    if (!strcasecmp( "y", $myrow["flag"]) )
    {
    // I WOULD LIKE TO DISPALY ANOTHER HTML/PHP FILE
    echo "Your Account has been activated" ;
    exit();
    }
    else
    {
    // I WOULD LIKE TO DISPALY ANOTHER HTML/PHP FILE

    echo "Your Account is not yet activated" ;
    exit () ;
    }
    }
    else
    {
    // I WOULD LIKE TO DISPALY ANOTHER HTML/PHP FILE
    echo "Retype your password";
    }
    }
    else
    {
    // I WOULD LIKE TO DISPALY ANOTHER HTML/PHP FILE

    echo "You are not register User";
    exit ();
    }

    }
    else
    {// I WOULD LIKE TO DISPALY ANOTHER HTML/PHP FILE

    echo "Enter Password";
    exit();
    }

    }
    else
    {
    echo "Enter The valid User name and Password" ;
    exit() ;
    }

    ?>


  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Your best bet is to use include() for the html files.

    eg;
    if (!strcasecmp( "y", $myrow["flag"]) )
    {
    include("./authorized.html");
    }

Similar Threads

  1. Replies: 3
    Last Post: February 17th, 2004, 11:08 AM
  2. How to write a PHP script to remove a file?
    By xmxpcom in forum PHP Development
    Replies: 2
    Last Post: February 16th, 2004, 06:58 PM
  3. call up cgi in html with javascript
    By wolsch in forum JavaScript Development
    Replies: 1
    Last Post: February 16th, 2004, 04:45 PM
  4. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 08:42 PM
  5. Replies: 1
    Last Post: February 5th, 2004, 10:38 AM

IMN logo majestic logo threadwatch logo seochat tools logo