how to select fields of table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muneebkiani
    New Member
    • Sep 2009
    • 1

    how to select fields of table

    Code:
    <?php 
    session_start();
    $username=$_SESSION['username'];
    if($username=="")
    header("location:login.php");
    if($_SESSION['role']!=1)
    header("location:login.php");
    
    include('include/connect.inc.php');
    $user=$_SESSION['username'];
    $query="select * from tbl_recharge where isapproved IS NULL";
    $result=mysql_query($query,$con);
    
    
    $approve_request['approve']['id'];
    // Approve selcted Requests
    if($_POST['submit']){
    	if($row)
    	{
    	
    	}
    }
    
    ?>
    
    <!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">    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
    </head>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <body bgcolor="#EBEFFD">
    <table width="1000" border="0" cellpadding="0" cellspacing="0" >
      <tr>
        <td>
    	<table cellpadding="0" cellspacing="0" border="0">
    		<!-- It is Header Row -->
     		<tr>
    	    <td height="36" align="left" valign="top" background="images/header_bg.jpg">
    		<table width="100%" height="31" cellpadding="0" cellspacing="0">
    		<tr>
    			<td align="center" class="logoheading" background="images/bg_03.gif">Franchise Recharge System</td>
    		</tr>
    		</table>
    		</td>
          </tr>
    	  
    	  	<!-- It is Center Row -->
    		<tr>
            <td width="1000">
    		<form id="form1" name="form1" method="post" action="">
    			<table width="1000" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="180" align="left" valign="top" bgcolor="#D0DEF0">
    			<?php include('include/menu.php'); ?>		
    			 </td>
                <td width="800" align="left" valign="top" bgcolor="#E4E8F6">
    			<table id="list complaints" >
    			<tr>
    			<td background="images/bg_03.gif">Approve</td>
    			<td background="images/bg_03.gif">Request ID</td>
    			<td background="images/bg_03.gif">Request From</td>
    			<td background="images/bg_03.gif">Request To</td>
    			<td background="images/bg_03.gif">Amount</td>
    			<td background="images/bg_03.gif">Approved</td>
    			<td background="images/bg_03.gif"> Description</td>
    			<td background="images/bg_03.gif"> Deposite Slip No</td>
    			
    			<?php
    			//$row=mysql_fetch_array($result);
    			
    			while($row=mysql_fetch_array($result)){
    			
    			?>
    			<tr>
    			<td>
    			  <input type="checkbox" name="approve" value="checkbox" />
    			 
    			</td>
    			<td>
    			<?php
    			echo $row['request_from_kioskid'];
    			?>
    			</td>
    			<td>
    			<?php
    			echo $row['request_to_kioskid'];
    			?>
    			</td>
    			<td>
    			<?php
    			echo $row['amount'];
    			?>
    			</td>
    			<td>
    			<?php
    			echo $row['isapproved'];
    			?>
    			</td>
    			
    			<td>
    			<?php
    			echo $row['request_description'];
    			?>
    			</td>
    			<td>
    			<?php
    			echo $row['depositslipno'];
    			?>
    			</td>
    			<td>
    			<?php
    			echo $row['depositslipno'];
    			?>
    			</td>
    			</tr>
    			<?php
    			}
    			?>
    			<tr>
    			<td align="center"><input name="approve_request" type="submit" value="Approve"/> </td>
    			</tr>
    			</table>
    		 </form>
    		  </td>
            </tr>
          </table>
    	</td>
      </tr>
    </table>
    		</td>
          </tr>
       		<?php include('include/footer.php');?>
    </td>
      </tr>
    </table>
    </body>
    </html>

    I am using this code to display some memebers now i want to approve all this displayed records if check box is select against submit button
    if some one can give me a idea it will be help ful
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    could you elaborate that, I didn’t understand what you want.

    Comment

    Working...