php login script for my custom php site
Please help me with an application im building. im new to php and im hoping that learning through experience is the best way to do it.

Here is my situation.....

I have a mySQL database which hae "members" table with my username & passwork, this seems to be connecting with no issus.

in addition i have the following pages and scrips running on them:
__________________________________________________________________________________________

    index.php - where my form is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <script src="js/jquery-1.6.4.js" type="text/javascript"></script>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>XP Online Ordering - Powered by X/procure Software SA (Pty) Ltd</title>
    <style type="text/css">
    #mainBG {
    	position:absolute;
    	width:1024px;
    	height:975px;
    	z-index:1;
    	left: 142px;
    	top: -2px;
    	background-image:url(images/mainBG.jpg);
    	margin-bottom:40px;
    	margin-left:20px;
    	margin-right:50px;
    }
    #sidebar-left {
    	position:absolute;
    	width:270px;
    	height:696px;
    	z-index:1;
    	left: 32px;
    	top: 193px;
    	background-image:url(images/template_Sidebar_menu_dimm.png);
    	padding-top:90px;
    }
    body {
    	margin-bottom: 20px;
    	margin-left: 50%;
    	margin-top: 0px;
    	margin-right: 50%;
    }
    #client-banner {
    	position:absolute;
    	width:594px;
    	height:44px;
    	z-index:2;
    	left: 315px;
    	top: 259px;
    }
    #top-menu {
    	position:absolute;
    	width:518px;
    	height:17px;
    	z-index:3;
    	left: 292px;
    	top: 25px;
    }
    #content {
    	position:absolute;
    	width:642px;
    	height:472px;
    	z-index:4;
    	left: 320px;
    	top: 419px;
    	background-color: #FFF;
    	border:thin;
    	border-color:#FFF;
    }
    #sidebartop {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 10px;
    	background-image: url(images/sidebarTopBG.png);
    }
    #user-login {
    	position:absolute;
    	width:274px;
    	height:97px;
    	z-index:5;
    	left: 44px;
    	top: 207px;
    }
    #logo {
    	position:absolute;
    	width:200px;
    	height:0px;
    	z-index:5;
    	left: 39px;
    	top: 56px;
    }
    #apDiv1 {
    	position:absolute;
    	width:200px;
    	height:115px;
    	z-index:6;
    	left: 176px;
    	top: 279px;
    }
    #loginform {
    	position:absolute;
    	width:189px;
    	height:160px;
    	z-index:1;
    	background-image:url(images/user_login_BG.png);
    	top: -14px;
    	left: 234px;
    	padding:25px;
    }
    .bodycopy1 {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 10px;
    	font-weight: normal;
    	font-variant: normal;
    	color: #FFF;
    }
    #message01 {
    	position:absolute;
    	width:233px;
    	height:81px;
    	z-index:1;
    	top: 110px;
    	left: 20px;
    }
    .BodyHeaders1 {
    	font:Arial, Helvetica, sans-serif;
    	font-size: 14px;
    	font-weight: normal;
    	color:#660099;
    	text-align: center;
    }
    .top_menu_links {
    	font:Arial, Helvetica, sans-serif;
    	font-size: 14px;
    	font-weight: normal;
    	color:#333;
    	text-align: left;
    }
    .BodyHeaders2 {
    	font:Arial, Helvetica, sans-serif;
    	font-size: 28px;
    	font-weight: normal;
    	color:#FFF;
    }
    
    .r-superscript {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 14px;
    	font-weight: normal;
    	color:#660099;
    	line-height: 10px;
    	text-indent: 5px;
    }
    .content_container {
    	border: thin solid #FFF;
    }
    #apDiv2 {
    	position:absolute;
    	width:81px;
    	height:19px;
    	z-index:1;
    	top: -13px;
    	left: 595px;
    }
    .white12ptarial {
    	color: #FFF;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    }
    #header {
    	position:absolute;
    	width:200px;
    	height:115px;
    	z-index:6;
    	left: 758px;
    	top: 3px;
    }
    </style>
    <script type="text/javascript">
    $(document).ready(function(){
    		
    $("#loginform").hide();
    
    
    						   
    $("#userlogin").click(function () {
    $("#loginform").fadeIn().delay(16000).fadeOut(600);
    });
    });
    
    
    </script>
    <script type="text/javascript">
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>
    </head>
    
    <body onload="MM_preloadImages('images/links/ova/user_login.png')">
    <div id="mainBG">
      <div id="sidebar-left">
        <div class="bodycopy1" id="message01">Get your own acces to South Africa's Leading Pharmaceuitical Procurement system today!!!<span class="BodyHeaders1"><br/>
          <br/>
          Call us Today 0861 XPROCURE or </span>0861 977 628 | register@xprocure.com<br/>
        </div>
      </div>
      <div class="BodyHeaders2" id="client-banner"> Welcome to X/procure Online Ordering </div>
      <div class="top_menu_links" id="top-menu">:: About X/procure    | Online Help | FAQ's | Contact us</div>
      <div class="content_container" id="content"><img src="images/ad01" width="666" height="473" />
        <div class="bodycopy1" id="apDiv2">Advertisment</div>
      </div>
      <div id="user-login">
        <div id="loginform">
        <table width="179" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <form name="form1" method="post" action="checklogin.php">
    <td width="177" height="146">
    <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
    <tr>
    <td height="20" bgcolor="#F78F22"><strong class="white12ptarial">Enter your Login Details</strong></td>
    </tr>
    <tr>
    <td height="44" class="top_menu_links">Username:  <br/><input name="myusername" type="text" id="myusername"></td>
    </tr>
    <tr>
    <td class="top_menu_links">Password:  <input name="mypassword" type="text" id="mypassword"></td>
    </tr>
    <tr>
    <td height="41"><input type="submit" name="Submit" value="Login"></td>
    </tr>
    </table>
    </td>
    </form>
    </tr>
    </table>
          
        </div>
      <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('userlogin','','images/links/ova/user_login.png',1)"><img src="images/links/user_login.png" name="userlogin" width="264" height="88" border="0" id="userlogin" /></a></div>
      <div id="logo"><img src="images/logo.png" alt="img1" width="241" height="70" /></div>
      <div id="header"></div>
    </div>
    </body>
    </html>

__________________________________________________________________________________________


then there is the checklogin.php: 
__________________________________________________________________________________________

    <?php
    ob_start();
    $host="localhost"; // Host name 
    $username="*********"; // Mysql username 
    $password="*********"; // Mysql password 
    $db_name="**********"; // Database name 
    $tbl_name="members"; // Table name
    
    // Connect to server and select databse.
    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
    mysql_select_db("xpc_online01")or die("cannot select DB");
    
    // Define $myusername and $mypassword 
    $myusername=$_POST['myusername']; 
    $mypassword=$_POST['mypassword'];
    
    // To protect MySQL injection (more detail about MySQL injection)
    $myusername = stripslashes($myusername);
    $mypassword = stripslashes($mypassword);
    $myusername = mysql_real_escape_string($myusername);
    $mypassword = mysql_real_escape_string($mypassword);
    
    $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
    $result=mysql_query($sql);
    
    // Mysql_num_row is counting table row
    $count=mysql_num_rows($result);
    // If result matched $myusername and $mypassword, table row must be 1 row
    
    if($count==1){
    // Register $myusername, $mypassword and redirect to file "login_success.php"
    session_register("myusername");
    session_register("mypassword"); 
    header("location:login_success.php");
    }
    else {
    echo "Wrong Username or Password";
    }
    
    ob_end_flush();
    ?>
    
    then i have login access.php:
    
    <? 
    session_start();
    if(!session_is_registered(myusername)){
    header("http://localhost/xponline/index[logintest].php");
    }
    ?>
    
    <html>
    <body>
    Login Successful 
    </body>
    </html>
    
    <? 
    session_start();
    if(!session_is_registered(myusername)){
    header("http://localhost/xponline/index[logintest].php");
    }
    ?>
    
    <html>
    <body>
    Login Successful 
    </body>
    </html>

__________________________________________________________________________________________

the last page id defailt_1.php, which is my start page after user is succesfully loged in:
__________________________________________________________________________________________

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    </script>
    <? 
    session_start();
    if(!session_is_registered(myusername)){
    header("http://localhost/xponline/index[logintest].php");
    }?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>XP Online Ordering - Powered by X/procure Software SA (Pty) Ltd</title>
    <style type="text/css">
    #mainBG {
    	position:absolute;
    	width:1021px;
    	height:977px;
    	z-index:1;
    	left: 142px;
    	top: -3px;
    	background-image:url(images/mainBG.jpg);
    }
    #sidebar-left {
    	position:absolute;
    	width:270px;
    	height:786px;
    	z-index:1;
    	left: 32px;
    	top: 226px;
    	background-image:url(images/template_Sidebar_menu_BG.png);
    	padding-top:15px;
    	
    }
    body {
    	margin-bottom: 20px;
    	margin-left: 50%;
    	margin-top: 0px;
    	margin-right: 50%;
    }
    #welcome-message {
    	position:absolute;
    	width:704px;
    	height:80px;
    	z-index:2;
    	left: 309px;
    	top: 346px;
    }
    #header {
    	position:absolute;
    	width:670px;
    	height:38px;
    	z-index:3;
    	left: 292px;
    	top: 42px;
    }
    #content-summary {
    	position:absolute;
    	width:668px;
    	height:472px;
    	z-index:4;
    	left: 328px;
    	top: 418px;
    	background-color: #FFF;
    }
    #sidebartop {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 10px;
    	background-image: url(images/sidebarTopBG.png);
    }
    #user-login {
    	position:absolute;
    	width:295px;
    	height:84px;
    	z-index:5;
    	left: 47px;
    	top: 241px;
    }
    #logo {
    	position:absolute;
    	width:200px;
    	height:0px;
    	z-index:5;
    	left: 39px;
    	top: 64px;
    }
    </style>
    <script src="js/jquery-1.6.4.js" type="text/javascript"></script>
    
    <script type="text/javascript">
    $(document).ready(function(){
    		
    $("#Content-NewOrder").hide();
    
    
    						   
    $("#NewOrder").click(function () {
    $("#Content-NewOrder").fadeIn();
    $("#Content-summary").fadeout();
    });
    });
    
    
    </script>
    <script type="text/javascript">
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>
    
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #Content-NewOrder {
    	position:absolute;
    	width:665px;
    	height:472px;
    	z-index:7;
    	left: 331px;
    	top: 420px;
    	background-color: #FFFFFF;
    	visibility: visible;
    }
    #apDiv3 {
    	position:absolute;
    	width:665px;
    	height:78px;
    	z-index:8;
    	top: 306px;
    	left: 330px;
    	background-color: #FFFFFF;
    }
    </style>
    </head>
    
    <body onload="MM_preloadImages('images/links/ova/user_logoff.png','images/links/ova/new_order.png','images/links/ova/order_history.png','images/links/ova/reports.png','images/links/ova/products.png','images/links/ova/customers.png','images/links/ova/reps.png','images/links/ova/send_receive.png')">
    <div id="mainBG">
      <div id="sidebar-left">
        <table width="262" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="4" height="26">&nbsp;</td>
            <td width="258" rowspan="2" align="center" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="4">
              <tr>
                <td height="91" valign="top"><span class="top_menu_links">Welcome</span><br />
                  <?php echo "client name";?><br /></td>
              </tr>
              <tr>
                <td height="91" valign="top"><span class="top_menu_links">Last Send &amp; Receive:</span><br />
                  <?php echo "result";?><br />
                  <span class="top_menu_links">Send &amp; Receive Threshold:</span><br />
                  <?php echo "result";?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="175">&nbsp;</td>
          </tr>
          <tr>
            <td height="488">&nbsp;</td>
            <td align="center" valign="top"><table width="229" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="229"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('logoff','','images/links/ova/user_logoff.png',1)"><img src="images/links/user_logoff.png" alt="Log Off X/procure" name="logoff" width="231" height="60" border="0" id="logoff" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('NewOrder','','images/links/ova/new_order.png',1)"><img src="images/links/new_order.png" alt="Start New Order" name="NewOrder" width="231" height="61" border="0" id="NewOrder" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Order History','','images/links/ova/order_history.png',1)"><img src="images/links/order_history.png" alt="View Order History" name="Order History" width="231" height="62" border="0" id="Order History" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Reports','','images/links/ova/reports.png',1)"><img src="images/links/reports.png" alt="View Reports" name="Reports" width="231" height="62" border="0" id="Reports" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Products','','images/links/ova/products.png',1)"><img src="images/links/products.png" alt="View Products" name="Products" width="231" height="64" border="0" id="Products" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Customers','','images/links/ova/customers.png',1)"><img src="images/links/customers.png" alt="Customers" name="Customers" width="230" height="59" border="0" id="Customers" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Reps','','images/links/ova/reps.png',1)"><img src="images/links/reps.png" alt="Representatives" name="Reps" width="231" height="62" border="0" id="Reps" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Send &amp; Receive','','images/links/ova/send_receive.png',1)"><img src="images/links/send_receive.png" alt="Send &amp; Receive" name="Send &amp; Receive" width="231" height="58" border="0" id="Send &amp; Receive" /></a></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </div>
      <div id="welcome-message"><span class="BodyHeaders2"> Welcome to X/procure Online Ordering </span></div>
      <div id="header"></div>
      <div id="content-summary">
        <table border="0">
          <tr>
            <td width="1" height="47">&nbsp;</td>
            <td><table width="99%" border="0" cellspacing="0" cellpadding="6">
              <tr>
                <td bgcolor="#F78F22" class="top_menu_links">SUMMARY</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="369" align="left" valign="top">&nbsp;</td>
            <td height="369" align="left" valign="top"><table width="476" border="0">
              <tr>
                <td width="324" class="BodyHeaders1">Number of Representatives: </td>
                <td width="142"><?php 
    			
    			echo "result";
    			
    			
    			?>
                </td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Number of Listed Customers: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Listed Customer Supplier Accounts:</td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Unique Products in Database: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Products in Database: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Suppliers with Products: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Supplier ETC Count: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Number of Orders: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Quantity of Products Ordered: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Value of Successful Orders:</td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Value of All Orders: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Un-responded Products:</td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Unsent Orders: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="21">&nbsp;</td>
            <td width="656">&nbsp;</td>
          </tr>
        </table>
      </div>
      <div id="logo"><img src="images/logo.png" width="241" height="70" /></div>
      <div id="Content-NewOrder">
        <table border="0">
          <tr>
            <td width="1" height="47">&nbsp;</td>
            <td><table width="99%" border="0" cellspacing="0" cellpadding="6">
              <tr>
                <td bgcolor="#F78F22" class="top_menu_links">NEW ORDER</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="369" align="left" valign="top">&nbsp;</td>
            <td height="369" align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td height="21">&nbsp;</td>
            <td width="656">&nbsp;</td>
          </tr>
        </table>
      </div>
      <div id="apDiv3"><img src="images/bannerCIPLAskin.jpg" width="665" height="78" /></div>
    </div>
    / Check if session is not registered , redirect back to main page. 
    // Put this code in first line of web page. 
    
    </body>
    </html>

__________________________________________________________________________________________

the error im getting reads as follows"

__________________________________________________________________________________________

Deprecated: Function session_register() is deprecated in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 33

Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php:2) in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 33

Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php:2) in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 33

Deprecated: Function session_register() is deprecated in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php:2) in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 35

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
__________________________________________________________________________________________


this is where im stuck and if someone could help me understand i'd really appreciate.
My coding is a bit untidy coz im a graphic designer and this is new to me so please bear with me.
Regards,

Tawanda
php login script for my custom php site
===

Please help me with an application im building. im new to php and im hoping that learning through experience is the best way to do it.

Here is my situation.....

I have a mySQL database which hae "members" table with my username & passwork, this seems to be connecting with no issus.

in addition i have the following pages and scrips running on them:
__________________________________________________________________________________________

    index.php - where my form is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <script src="js/jquery-1.6.4.js" type="text/javascript"></script>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>XP Online Ordering - Powered by X/procure Software SA (Pty) Ltd</title>
    <style type="text/css">
    #mainBG {
    	position:absolute;
    	width:1024px;
    	height:975px;
    	z-index:1;
    	left: 142px;
    	top: -2px;
    	background-image:url(images/mainBG.jpg);
    	margin-bottom:40px;
    	margin-left:20px;
    	margin-right:50px;
    }
    #sidebar-left {
    	position:absolute;
    	width:270px;
    	height:696px;
    	z-index:1;
    	left: 32px;
    	top: 193px;
    	background-image:url(images/template_Sidebar_menu_dimm.png);
    	padding-top:90px;
    }
    body {
    	margin-bottom: 20px;
    	margin-left: 50%;
    	margin-top: 0px;
    	margin-right: 50%;
    }
    #client-banner {
    	position:absolute;
    	width:594px;
    	height:44px;
    	z-index:2;
    	left: 315px;
    	top: 259px;
    }
    #top-menu {
    	position:absolute;
    	width:518px;
    	height:17px;
    	z-index:3;
    	left: 292px;
    	top: 25px;
    }
    #content {
    	position:absolute;
    	width:642px;
    	height:472px;
    	z-index:4;
    	left: 320px;
    	top: 419px;
    	background-color: #FFF;
    	border:thin;
    	border-color:#FFF;
    }
    #sidebartop {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 10px;
    	background-image: url(images/sidebarTopBG.png);
    }
    #user-login {
    	position:absolute;
    	width:274px;
    	height:97px;
    	z-index:5;
    	left: 44px;
    	top: 207px;
    }
    #logo {
    	position:absolute;
    	width:200px;
    	height:0px;
    	z-index:5;
    	left: 39px;
    	top: 56px;
    }
    #apDiv1 {
    	position:absolute;
    	width:200px;
    	height:115px;
    	z-index:6;
    	left: 176px;
    	top: 279px;
    }
    #loginform {
    	position:absolute;
    	width:189px;
    	height:160px;
    	z-index:1;
    	background-image:url(images/user_login_BG.png);
    	top: -14px;
    	left: 234px;
    	padding:25px;
    }
    .bodycopy1 {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 10px;
    	font-weight: normal;
    	font-variant: normal;
    	color: #FFF;
    }
    #message01 {
    	position:absolute;
    	width:233px;
    	height:81px;
    	z-index:1;
    	top: 110px;
    	left: 20px;
    }
    .BodyHeaders1 {
    	font:Arial, Helvetica, sans-serif;
    	font-size: 14px;
    	font-weight: normal;
    	color:#660099;
    	text-align: center;
    }
    .top_menu_links {
    	font:Arial, Helvetica, sans-serif;
    	font-size: 14px;
    	font-weight: normal;
    	color:#333;
    	text-align: left;
    }
    .BodyHeaders2 {
    	font:Arial, Helvetica, sans-serif;
    	font-size: 28px;
    	font-weight: normal;
    	color:#FFF;
    }
    
    .r-superscript {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 14px;
    	font-weight: normal;
    	color:#660099;
    	line-height: 10px;
    	text-indent: 5px;
    }
    .content_container {
    	border: thin solid #FFF;
    }
    #apDiv2 {
    	position:absolute;
    	width:81px;
    	height:19px;
    	z-index:1;
    	top: -13px;
    	left: 595px;
    }
    .white12ptarial {
    	color: #FFF;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    }
    #header {
    	position:absolute;
    	width:200px;
    	height:115px;
    	z-index:6;
    	left: 758px;
    	top: 3px;
    }
    </style>
    <script type="text/javascript">
    $(document).ready(function(){
    		
    $("#loginform").hide();
    
    
    						   
    $("#userlogin").click(function () {
    $("#loginform").fadeIn().delay(16000).fadeOut(600);
    });
    });
    
    
    </script>
    <script type="text/javascript">
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>
    </head>
    
    <body onload="MM_preloadImages('images/links/ova/user_login.png')">
    <div id="mainBG">
      <div id="sidebar-left">
        <div class="bodycopy1" id="message01">Get your own acces to South Africa's Leading Pharmaceuitical Procurement system today!!!<span class="BodyHeaders1"><br/>
          <br/>
          Call us Today 0861 XPROCURE or </span>0861 977 628 | register@xprocure.com<br/>
        </div>
      </div>
      <div class="BodyHeaders2" id="client-banner"> Welcome to X/procure Online Ordering </div>
      <div class="top_menu_links" id="top-menu">:: About X/procure    | Online Help | FAQ's | Contact us</div>
      <div class="content_container" id="content"><img src="images/ad01" width="666" height="473" />
        <div class="bodycopy1" id="apDiv2">Advertisment</div>
      </div>
      <div id="user-login">
        <div id="loginform">
        <table width="179" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <form name="form1" method="post" action="checklogin.php">
    <td width="177" height="146">
    <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
    <tr>
    <td height="20" bgcolor="#F78F22"><strong class="white12ptarial">Enter your Login Details</strong></td>
    </tr>
    <tr>
    <td height="44" class="top_menu_links">Username:  <br/><input name="myusername" type="text" id="myusername"></td>
    </tr>
    <tr>
    <td class="top_menu_links">Password:  <input name="mypassword" type="text" id="mypassword"></td>
    </tr>
    <tr>
    <td height="41"><input type="submit" name="Submit" value="Login"></td>
    </tr>
    </table>
    </td>
    </form>
    </tr>
    </table>
          
        </div>
      <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('userlogin','','images/links/ova/user_login.png',1)"><img src="images/links/user_login.png" name="userlogin" width="264" height="88" border="0" id="userlogin" /></a></div>
      <div id="logo"><img src="images/logo.png" alt="img1" width="241" height="70" /></div>
      <div id="header"></div>
    </div>
    </body>
    </html>

__________________________________________________________________________________________


then there is the checklogin.php: 
__________________________________________________________________________________________

    <?php
    ob_start();
    $host="localhost"; // Host name 
    $username="*********"; // Mysql username 
    $password="*********"; // Mysql password 
    $db_name="**********"; // Database name 
    $tbl_name="members"; // Table name
    
    // Connect to server and select databse.
    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
    mysql_select_db("xpc_online01")or die("cannot select DB");
    
    // Define $myusername and $mypassword 
    $myusername=$_POST['myusername']; 
    $mypassword=$_POST['mypassword'];
    
    // To protect MySQL injection (more detail about MySQL injection)
    $myusername = stripslashes($myusername);
    $mypassword = stripslashes($mypassword);
    $myusername = mysql_real_escape_string($myusername);
    $mypassword = mysql_real_escape_string($mypassword);
    
    $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
    $result=mysql_query($sql);
    
    // Mysql_num_row is counting table row
    $count=mysql_num_rows($result);
    // If result matched $myusername and $mypassword, table row must be 1 row
    
    if($count==1){
    // Register $myusername, $mypassword and redirect to file "login_success.php"
    session_register("myusername");
    session_register("mypassword"); 
    header("location:login_success.php");
    }
    else {
    echo "Wrong Username or Password";
    }
    
    ob_end_flush();
    ?>
    
    then i have login access.php:
    
    <? 
    session_start();
    if(!session_is_registered(myusername)){
    header("http://localhost/xponline/index[logintest].php");
    }
    ?>
    
    <html>
    <body>
    Login Successful 
    </body>
    </html>
    
    <? 
    session_start();
    if(!session_is_registered(myusername)){
    header("http://localhost/xponline/index[logintest].php");
    }
    ?>
    
    <html>
    <body>
    Login Successful 
    </body>
    </html>

__________________________________________________________________________________________

the last page id defailt_1.php, which is my start page after user is succesfully loged in:
__________________________________________________________________________________________

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    </script>
    <? 
    session_start();
    if(!session_is_registered(myusername)){
    header("http://localhost/xponline/index[logintest].php");
    }?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>XP Online Ordering - Powered by X/procure Software SA (Pty) Ltd</title>
    <style type="text/css">
    #mainBG {
    	position:absolute;
    	width:1021px;
    	height:977px;
    	z-index:1;
    	left: 142px;
    	top: -3px;
    	background-image:url(images/mainBG.jpg);
    }
    #sidebar-left {
    	position:absolute;
    	width:270px;
    	height:786px;
    	z-index:1;
    	left: 32px;
    	top: 226px;
    	background-image:url(images/template_Sidebar_menu_BG.png);
    	padding-top:15px;
    	
    }
    body {
    	margin-bottom: 20px;
    	margin-left: 50%;
    	margin-top: 0px;
    	margin-right: 50%;
    }
    #welcome-message {
    	position:absolute;
    	width:704px;
    	height:80px;
    	z-index:2;
    	left: 309px;
    	top: 346px;
    }
    #header {
    	position:absolute;
    	width:670px;
    	height:38px;
    	z-index:3;
    	left: 292px;
    	top: 42px;
    }
    #content-summary {
    	position:absolute;
    	width:668px;
    	height:472px;
    	z-index:4;
    	left: 328px;
    	top: 418px;
    	background-color: #FFF;
    }
    #sidebartop {
    	font-family: Verdana, Geneva, sans-serif;
    	font-size: 10px;
    	background-image: url(images/sidebarTopBG.png);
    }
    #user-login {
    	position:absolute;
    	width:295px;
    	height:84px;
    	z-index:5;
    	left: 47px;
    	top: 241px;
    }
    #logo {
    	position:absolute;
    	width:200px;
    	height:0px;
    	z-index:5;
    	left: 39px;
    	top: 64px;
    }
    </style>
    <script src="js/jquery-1.6.4.js" type="text/javascript"></script>
    
    <script type="text/javascript">
    $(document).ready(function(){
    		
    $("#Content-NewOrder").hide();
    
    
    						   
    $("#NewOrder").click(function () {
    $("#Content-NewOrder").fadeIn();
    $("#Content-summary").fadeout();
    });
    });
    
    
    </script>
    <script type="text/javascript">
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>
    
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #Content-NewOrder {
    	position:absolute;
    	width:665px;
    	height:472px;
    	z-index:7;
    	left: 331px;
    	top: 420px;
    	background-color: #FFFFFF;
    	visibility: visible;
    }
    #apDiv3 {
    	position:absolute;
    	width:665px;
    	height:78px;
    	z-index:8;
    	top: 306px;
    	left: 330px;
    	background-color: #FFFFFF;
    }
    </style>
    </head>
    
    <body onload="MM_preloadImages('images/links/ova/user_logoff.png','images/links/ova/new_order.png','images/links/ova/order_history.png','images/links/ova/reports.png','images/links/ova/products.png','images/links/ova/customers.png','images/links/ova/reps.png','images/links/ova/send_receive.png')">
    <div id="mainBG">
      <div id="sidebar-left">
        <table width="262" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="4" height="26">&nbsp;</td>
            <td width="258" rowspan="2" align="center" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="4">
              <tr>
                <td height="91" valign="top"><span class="top_menu_links">Welcome</span><br />
                  <?php echo "client name";?><br /></td>
              </tr>
              <tr>
                <td height="91" valign="top"><span class="top_menu_links">Last Send &amp; Receive:</span><br />
                  <?php echo "result";?><br />
                  <span class="top_menu_links">Send &amp; Receive Threshold:</span><br />
                  <?php echo "result";?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="175">&nbsp;</td>
          </tr>
          <tr>
            <td height="488">&nbsp;</td>
            <td align="center" valign="top"><table width="229" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="229"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('logoff','','images/links/ova/user_logoff.png',1)"><img src="images/links/user_logoff.png" alt="Log Off X/procure" name="logoff" width="231" height="60" border="0" id="logoff" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('NewOrder','','images/links/ova/new_order.png',1)"><img src="images/links/new_order.png" alt="Start New Order" name="NewOrder" width="231" height="61" border="0" id="NewOrder" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Order History','','images/links/ova/order_history.png',1)"><img src="images/links/order_history.png" alt="View Order History" name="Order History" width="231" height="62" border="0" id="Order History" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Reports','','images/links/ova/reports.png',1)"><img src="images/links/reports.png" alt="View Reports" name="Reports" width="231" height="62" border="0" id="Reports" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Products','','images/links/ova/products.png',1)"><img src="images/links/products.png" alt="View Products" name="Products" width="231" height="64" border="0" id="Products" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Customers','','images/links/ova/customers.png',1)"><img src="images/links/customers.png" alt="Customers" name="Customers" width="230" height="59" border="0" id="Customers" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Reps','','images/links/ova/reps.png',1)"><img src="images/links/reps.png" alt="Representatives" name="Reps" width="231" height="62" border="0" id="Reps" /></a></td>
              </tr>
              <tr>
                <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Send &amp; Receive','','images/links/ova/send_receive.png',1)"><img src="images/links/send_receive.png" alt="Send &amp; Receive" name="Send &amp; Receive" width="231" height="58" border="0" id="Send &amp; Receive" /></a></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </div>
      <div id="welcome-message"><span class="BodyHeaders2"> Welcome to X/procure Online Ordering </span></div>
      <div id="header"></div>
      <div id="content-summary">
        <table border="0">
          <tr>
            <td width="1" height="47">&nbsp;</td>
            <td><table width="99%" border="0" cellspacing="0" cellpadding="6">
              <tr>
                <td bgcolor="#F78F22" class="top_menu_links">SUMMARY</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="369" align="left" valign="top">&nbsp;</td>
            <td height="369" align="left" valign="top"><table width="476" border="0">
              <tr>
                <td width="324" class="BodyHeaders1">Number of Representatives: </td>
                <td width="142"><?php 
    			
    			echo "result";
    			
    			
    			?>
                </td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Number of Listed Customers: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Listed Customer Supplier Accounts:</td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Unique Products in Database: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Products in Database: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Suppliers with Products: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Supplier ETC Count: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Number of Orders: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Quantity of Products Ordered: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Value of Successful Orders:</td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Total Value of All Orders: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Un-responded Products:</td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td class="BodyHeaders1">Unsent Orders: </td>
                <td><?php 
    			
    			echo "result";
    			
    			
    			?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="21">&nbsp;</td>
            <td width="656">&nbsp;</td>
          </tr>
        </table>
      </div>
      <div id="logo"><img src="images/logo.png" width="241" height="70" /></div>
      <div id="Content-NewOrder">
        <table border="0">
          <tr>
            <td width="1" height="47">&nbsp;</td>
            <td><table width="99%" border="0" cellspacing="0" cellpadding="6">
              <tr>
                <td bgcolor="#F78F22" class="top_menu_links">NEW ORDER</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="369" align="left" valign="top">&nbsp;</td>
            <td height="369" align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td height="21">&nbsp;</td>
            <td width="656">&nbsp;</td>
          </tr>
        </table>
      </div>
      <div id="apDiv3"><img src="images/bannerCIPLAskin.jpg" width="665" height="78" /></div>
    </div>
    / Check if session is not registered , redirect back to main page. 
    // Put this code in first line of web page. 
    
    </body>
    </html>

__________________________________________________________________________________________

the error im getting reads as follows"

__________________________________________________________________________________________

Deprecated: Function session_register() is deprecated in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 33

Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php:2) in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 33

Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php:2) in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 33

Deprecated: Function session_register() is deprecated in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php:2) in /Applications/XAMPP/xamppfiles/htdocs/xponline/checklogin.php on line 35

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
__________________________________________________________________________________________


this is where im stuck and if someone could help me understand i'd really appreciate.
My coding is a bit untidy coz im a graphic designer and this is new to me so please bear with me.
Regards,

Tawanda