Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy I can't display my frameset html page with php, can someone help me

    here is my coding, i want to display the page which has frameset function, but it couldn... is there somethign missing with my coding?and i try to display the text"hi" as below, it can~.. can someone help me to solve? thanks a lot~~~~~~

    <?php
    session_start();
    if (isset($HTTP_POST_VARS['adminname']) && isset($HTTP_POST_VARS['adminpass']))
    {
    $adminname = $HTTP_POST_VARS['adminname'];
    $adminpass = $HTTP_POST_VARS['adminpass'];
    $db_conn = mysql_connect('localhost','root','');
    mysql_select_db('star',$db_conn);

    $query = "select * from admins where adminname='$adminname' and adminpass='$adminpass' ";
    $result = mysql_query($query, $db_conn)or die(mysql_error());

    if (mysql_num_rows($result) > 0)
    {
    $_SESSION['valid_admin'] = $adminname;

    echo 'Welcome '.$_SESSION['valid_admin'],' <br/>';
    ?>
    <html> HI
    <frameset rows="80,*" frameborder="no" border="0" framespacing="0">
    <frame src="navi.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame">
    <frame src="listadmin.php" name="mainFrame" id="mainFrame" title="mainFrame">
    </frameset>
    </html>
    <?
    }

    else
    {
    if (isset($adminname)){
    echo 'Could not log you in';
    }
    }

    }

    ?>

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,011
    Thanks
    2
    Thanked 312 Times in 304 Posts
    Your code makes use of the depreciated HTTP_xxxx_VARS, which can be disabled in PHP5. Either check your web server log for errors and/or put the following lines in after your first <?php tag -
    PHP Code:
    ini_set ("display_errors""1");
    error_reporting(E_ALL); 
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

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