duanji2014 2011-03-04 21:53
浏览 49

我不能提交表格

Hey guys Im trying to develop an advance consumer website using php and I stuck somewhere while trying to get the data with submitting to another page. All I want to do is to get the checkbox values which are stored in an array and checked by user. I urgently need your help please here is the code:

$sql2="SELECT * FROM alinanfis WHERE alinanfis.fis_id='".$fis."'" ;
$resultFis=mysql_query($sql2);
if(mysql_num_rows($resultFis)>0)
{
    print "<form method='POST' action='deletionResult.php'>";
    print "<table>";
    print "<tr>";
    print "<th style='background: transparent;'></th>"; 
    print "<th>Fis No</th>";
    print "<th>isim</th>";
    print "<th>soyisim</th>";
    print "<th >Tarih</th>";
    print "<th>Fis Tipi</th>";
    print "<th>Nerede</th>";
    print "<th>Litre</th>";
    print "<th>Tutar</th>";
    print "</tr>";

    while($rowAlinan=mysql_fetch_array($resultFis))
    {
        $sqlFisTipi="SELECT * FROM atype WHERE a_id='".$rowAlinan['a_id']."'" ;

        $resultFisTipi=mysql_query($sqlFisTipi);
        $rowFisTipi=mysql_fetch_array($resultFisTipi);

        $sqlNerede="SELECT * FROM isyeri WHERE i_id='".$rowAlinan['nerde']."'" ;

        $resultNerede=mysql_query($sqlNerede);
        $rowNerede=mysql_fetch_array($resultNerede);

        $sqlMID="SELECT * FROM musteri WHERE m_id='".$rowAlinan['m_id']."'" ;

        $resultMID1=mysql_query($sqlMID);
        $rowMID1=mysql_fetch_array($resultMID1);

        print "<tr>";

        print "<td><input name='checkBox[]' type='checkbox' value='".$rowAlinan['fis_id']."' />

        php</td>";   

        print "<td>".$rowAlinan['fis_id']."</td>";
        print "<td>".$rowMID1['m_name']."</td>";
        print "<td>".$rowMID1['m_lastName']."</td>";
        print "<td>".$rowAlinan['alinan_tarih']."</td>";
        print "<td>".$rowFisTipi['a_name']."</td>";
        print "<td>".$rowNerede['i_name']."</td>";
        print "<td>".$rowAlinan['litre']."</td>";
        print "<td>".$rowAlinan['tutar']."</td>";
        print "</tr>";
    }

    print '<div class="form_settings">';
    print "<input class='submit' type='submit' name= 'send' value='Send'>";
   /
    print '</div>';
    print "</table>";
    print "</form>";
}//end of if(num_rows>0)

else
    echo '*no such receipt found!!';

mysql_close($con);

Here's the entire code: http://pastebin.com/SBiiSBHu .

  • 写回答

2条回答 默认 最新

  • dsj1961061 2011-03-04 22:15
    关注

    You have not included all your code, but could it be that $cols is not set to TRUE in the top of the script?

    Edit: I would really like to see the html generated by the php, but here are a few additional remarks:

    1. You definitely need to clean / check your $_GET["fname"] variable before you feed it to a database
    2. You need to specify a doctype

    Apart from that, what kind of error do you have exactly?

    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭