ฟอมแสดงผลผิดพลาด

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderators: mindphp, ผู้ดูแลกระดาน

offing
PHP VIP Members
PHP VIP Members
Posts: 1527
Joined: 18/08/2014 10:01 am

ฟอมแสดงผลผิดพลาด

Post by offing »

ฟอมแสดงผลผิดพลาด
1.png
1.png (82.5 KiB) Viewed 269 times
โคตแบ่งหน้าและแสดงผลphp

Code: Select all

$start   = request_var('start', 0);
$limit   = request_var('limit', (int)5);


$data = 'SELECT * FROM '.OFFING_TABLE.' where sa_total order by search_id DESC'; 
$row = "SELECT COUNT(*) AS sumrow FROM ". OFFING_TABLE; 


$result = $db->sql_query($row);

$total_data = (int) $db->sql_fetchfield('sumrow');
$result = $db->sql_query_limit($data, $limit, $start);

while($show = $db->sql_fetchrow($result)){
   $x = ($show['pic'] == 0) ? true : false;
   $template->assign_block_vars('somerow', array(
      'VAR1' => "$show[name]",
      'VAR2' => "$show[sa_m]",
       'VAR3' => "$show[sa_f]",
       'VAR4' => "$show[age_m]",
       'VAR5' => "$show[age_f]",
       'VAR6' => "$show[status_l]",
       'VAR7' => "$show[status_c]",
       'VAR8' => "$show[status_ma]",
       'VAR9' => "$show[status_f]",
       'VAR10' => "$show[status_ceo]",
       'VAR11' => "$show[time]",
       'VAR12' => "$show[money]",
       'VAR13' => "$show[ip]",
       'VAR14' => "$show[search_id]",
       'VAR15'  =>  "$x",
       
      
   ));
}

$pagination_url = append_sid($phpbb_root_path . 'calculate_dowry.' . $phpEx,'');




$template->assign_vars(array(
      'PAGINATION'        => generate_pagination($pagination_url, $total_data, $limit, $start),
      'PAGE_NUMBER'       => on_page($total_data, $limit, $start), 
));
 
    
    
$template->set_filenames(array(
'body' => 'calculate_dowry.html'
)); 
โคตหน้าhtml

Code: Select all

<!-- INCLUDE overall_header.html -->
{TITLE}<br>



<h2>{L_SUBTITLE}</h2>
<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<style type="text/css">
.style1 {color: #FF0000}
.style10 {color: #FF6666}
.style11 {font-size: 24px}
.style12 {font-size: 18px;color: #FF6666;}
.style13 {font-size: 16px}
</style>

<script language="javascript">
function CheckNum(){
		if (event.keyCode < 48 || event.keyCode > 57){
		      event.returnValue = false;
	    	}
	}
</script>

<form id="form1" name="form1" method="post" action="calculate_dowry.php" enctype="multipart/form-data">
<center> 
  <div class="dl.icon" height="10">
		<div class="inner"><span class="corners-top"></span>

                    <table class="table1"  id="memberlist" height ="0">
      <tr>
      <td width="200">
        <div align="right" class="style13">
     {L_NAME}:</div></td></br>
      <td width="400"><input type="text" name="name" id="nameth"  />
          <input type="text" name="event" id="nameth" hidden="hidden" value="insert" />
    </td>
      
      
    </tr>
    <tr>
      <td width="200">
        <div align="right" class="style13">
     {L_SA_M}:</br>{L_AGE_M}:</div></td>
      <td width="300"><input type="text" name="sa_m" id="nameth"  onKeyPress="CheckNum()"  /></br>
       <input type="text" name="age_m" id="nameth"  onKeyPress="CheckNum()" /></td>
      
      
    </tr>
   
    <tr>
      <td width="30%">
        <div align="right" class="style13">
     {L_SA_F}:</br> {L_AGE_F}:</div></td>
      <td width="76%"><input type="text" name="sa_f" id="nameth"  onKeyPress="CheckNum()" /></br>
      <input type="text" name="age_f" id="nameth"  onKeyPress="CheckNum()" /></td>
      
    </tr>
    
    <tr>
        <td><div align="right" class="style13"></div></td>
      <td>
          
<input type="checkbox" name="status_l" value="1" checked="checked">{L_STATUS_L}<br>
<input type="checkbox" name="status_c" value="1" checked="checked">{L_STATUS_C}<br>
<input type="checkbox" name="status_ma" value="1" checked="checked">{L_STATUS_MA}<br>
<input type="checkbox" name="status_f" value="1" checked="checked">{L_STATUS_F}<br>
<input type="checkbox" name="status_ceo" value="1" checked="checked">{L_STATUS_CEO}<br>
{L_TIME} <input type="text" name="time" id="nameth"  onKeyPress="CheckNum()" /><br>
เลือกภาพ<input type="file" name="pic"  /> 

<hr><br>
      </td>
      
      
      
    </tr>
    
    
    <tr>
      <td colspan="2"><div align="center">
        <input type="submit" name="button" value="{L_SUBMIT}" />
        <input type="reset" name="button2"  value="{L_RESET}" />
      </div></td>
      
      
    </tr>
    
 </table>

	<span class="corners-bottom"><span></span></span></div>
</div>
</center>
    </form>

<form id="form1" name="form1" method="post" action="calculate_dowry.php?event=search"  >
    
   <h3>{L_HISTORY}</h3></br> 
<center>
<div class="forumbg forumbg-table" height="10">
		<div class="inner"><span class="corners-top"></span>

                    <table class="table1"  id="memberlist" height ="0">
    <div class="post">
        <thead>
      <tr>
      <td width="400">
       </td></br>  </tr>  
     
     </thead>
   
        <tr class="bg2">
            <td align="center">
     {L_SEARCH}:<select name="search">
             
<!-- BEGIN somerow --><option value="{somerow.POPO}">{somerow.POPO}</option> <!-- END somerow --></select>
</select><input type="submit" name="button" value="{L_SUBMIT}" /></td>
         </tr>
          
     
    </tr>
    </div>  
    </table>

	<span class="corners-bottom"><span></span></span></div>
</div>

    </center>
    </form>
   </div>

    
   <span class="corners-bottom"><span></span></span></div>
</div>
<div class="forumbg forumbg-table" height="10">
		<div class="inner"><span class="corners-top"></span>

                    <table class="table1"  id="memberlist" height ="0">
		<thead>
		<tr>
	<td>{L_NAME}:</td>
            <td>{L_SA_M}:</td>
            <td>{L_SA_F}:</td>
            <td>{L_AGE_M}:</td>
            <td>{L_AGE_F}:</td>
            <td>{L_STATUS_L}:</td>
            <td>{L_STATUS_C}:</td>
            <td>{L_STATUS_MA}:</td>
            <td>{L_STATUS_F}:</td>
            <td>{L_STATUS_CEO}:</td>
            <td>{L_TIME}:</td>
               <td>{L_MONEY}:</td>
            <td>{L_IP}:</td>
            <td>{L_PIC}</td>
		</tr>
		</thead>
	 <!-- BEGIN somerow -->
        <tr class="bg2">
             <td><span class="rank-img">{somerow.VAR1}</td>
             <td>{somerow.VAR2}</td>
             <td>{somerow.VAR3}</td>
             <td>{somerow.VAR4}</td>
             <td>{somerow.VAR5}</td>
             <td>{somerow.VAR6}</td>
             <td>{somerow.VAR7}</td>
             <td>{somerow.VAR8}</td>
             <td>{somerow.VAR9}</td>
             <td>{somerow.VAR10}</td>
             <td>{somerow.VAR11}</td>
             <td>{somerow.VAR12}</td>
             <td>{somerow.VAR13}</td>
             <!-- IF somerow.VAR15 -->
             <td>{L_NOPIC}</td>
             <!-- ELSE -->
             <td><a href="calculate_dowry_showpic.php?id={somerow.VAR14}">{L_PIC}</td>
             <!-- ENDIF -->
     
         </tr>
         <!-- END somerow -->
         
		

	</table>

	<span class="corners-bottom"><span></span></span></div>
</div>
 {PAGINATION}>{PAGE_NUMBER}
 





<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

Return to “Programming - PHP”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests