PHP Code for Search

[php]<?php
session_start();
if(session_is_registered($_POST[‘username’])){
$Msg = “login”;
}
?>

<?php include("db.php")?> <?php if (isset($_GET['logout'])){ session_start(); session_destroy(); $Msg = "logout"; } if($_SERVER["REQUEST_METHOD"] == 'POST') { $Msg =""; $result = mysql_query("Select * From accounts where username ='". $_POST['username'] . "' And pass ='" . $_POST['password'] . "'"); $count=mysql_num_rows($result); if($count==1){ session_register($_POST['username']); session_register($Msg); header("location:acct.php"); $Msg = "success"; } else { $Msg = "Wrong Username or Password"; } } ?> Cignal Digital TV


<div id="templatemo_menu"></div>
	<!--<div id="templatemo_menu_left"></div>  -->  
	<!--<div id="templatemo_menu_middle"></div>-->
	<div id="dropdownNav">
        <ul>
            <li><a href='index.php' target='_self' class='homeWidth'>
                    HOME
                </a>
                    <ul>
                        
                    </ul>
</li>

                <li><a href='#' target='_self' class=''>
                    SUBSCRIBE
                </a>
                    <ul>
                        
                                <li><a href='postpaid.php' style="z-index: 999999999999;" target='_self'>
                                    Postpaid
                                </a></li>
                            
                                <li><a href='prepaid.php' style="z-index: 999999999999;" target='_self'>
                                    Prepaid
                                </a></li>
                         
                    </ul>
                </li>
                
                <li><a href='#' target='_self' class='supportWidth'>
                    SUPPORT
                </a>
                    <ul>
                        
                                <li><a href='faq.php' style="z-index: 999999999999;" target='_self'>
                                    FAQ
                                </a></li>
                            
                                <li><a href='ebillacct.php' style="z-index: 999999999999;" target='_self'>
                                    E-Bill
                                </a></li>
                            
                                <li><a href='payment.php' style="z-index: 999999999999;" target='_self'>
                                    Payment Channel
                                </a></li>
                                
                                <li><a href='contact.php' style="z-index: 999999999999;" target='_self'>
                                    Contact Us
                                </a></li>
                            
                    </ul>
                </li>
            
                
                <li><a href='#' target='_self' class='subscribeWidth'>
                    ABOUT US
                </a>
                    <ul>
                        
                                <li><a href='about.php' style="z-index: 999999999999;" target='_self'>
                                    Company Profile
                                </a></li>
                            
                               
                            
                    </ul>
                </li>
            
        </ul>    	
    <!--</div>-->
    <!--<div id="templatemo_menu_right"></div>-->
</div>

<div id="templatemo_content">
  <div id="templatemo_left_column">
		<h1 class="style1">Customers Payment Details</h1>

		<div class="right_column_section_body">

		<p style="color:#000">Your Account No.</p>

           

                

SEARCH

	  <?php 
		$result = mysql_query("Select * From customer Where cust_acct = '" . $_GET["acct"] . "'");
		$row = mysql_fetch_array($result);
			
	  ?>
        <div class="post_body">
				
	<?php 
		if (isset($_GET["acct"])){
			$result = mysql_query("Select * From receipt Where receipt_acct ='". $_GET["acct"] . "'");
				if ($row = mysql_fetch_array($result)) {
					echo'<span class= "right"><u>'. $row['receipt_name'] . "</u></span>";
					echo"<br><br><p>Account No.: ". $row['receipt_acct'] ."</p>";
					echo"<p>Amount: " . $row['receipt_amount'] . "</p>";	
				}
				else {
					echo"<p><center><u><font color = 'RED'>No record found</font></u></center></p>";
					echo "<p>&nbsp;</p>";
					echo "<p>&nbsp;</p>";
					
				}
		}	
		else {
			echo "<p>&nbsp;</p>";
			echo "<p>&nbsp;</p>";
			echo "<p>&nbsp;</p>";
								
		}
	?>
  </div></div></div>
    
	<div id="templatemo_right_column">
    	
      <div class="templatemo_section2">

 

		<a href="http://validator.w3.org/check?uri=referer"></a><a href="http://jigsaw.w3.org/css-validator/check/referer"></a><br />
        &nbsp;
    

	</div>
</div>
[/php]

please help me on this… :frowning:

Sponsor our Newsletter | Privacy Policy | Terms of Service