Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将投标价格插入带有详细信息的表中 我想在表格中插入带有产品标题、竞价时间、用户名的竞价,只要标题和竞价时间不在输入表单中,用户名是session.plz help。即使我尝试了很多,我也没有找到解决方案。 如果运行几次,调用script.php?id=_Php_Mysql - Fatal编程技术网

如何将投标价格插入带有详细信息的表中 我想在表格中插入带有产品标题、竞价时间、用户名的竞价,只要标题和竞价时间不在输入表单中,用户名是session.plz help。即使我尝试了很多,我也没有找到解决方案。 如果运行几次,调用script.php?id=

如何将投标价格插入带有详细信息的表中 我想在表格中插入带有产品标题、竞价时间、用户名的竞价,只要标题和竞价时间不在输入表单中,用户名是session.plz help。即使我尝试了很多,我也没有找到解决方案。 如果运行几次,调用script.php?id=,php,mysql,Php,Mysql,如何将投标价格插入带有详细信息的表中 我想在表格中插入带有产品标题、竞价时间、用户名的竞价,只要标题和竞价时间不在输入表单中,用户名是session.plz help。即使我尝试了很多,我也没有找到解决方案。 如果运行几次,调用script.php?id=id应该会给出一个不错的DOS!请帮帮我Eugen..我没有准确地找到你。如果有人用GET参数调用你的脚本id=id,你的SELECT*FROM bids WHERE id=$\u GET[id]将转换为SELECT*FROM bids WHE

如何将投标价格插入带有详细信息的表中
我想在表格中插入带有产品标题、竞价时间、用户名的竞价,只要标题和竞价时间不在输入表单中,用户名是session.plz help。即使我尝试了很多,我也没有找到解决方案。

如果运行几次,调用
script.php?id=id
应该会给出一个不错的DOS!请帮帮我Eugen..我没有准确地找到你。如果有人用GET参数调用你的脚本
id=id
,你的
SELECT*FROM bids WHERE id=$\u GET[id]
将转换为
SELECT*FROM bids WHERE id=id
,它将选择所有出价。。。在一个结果集中可能有数十亿个。这将淹没您的基础设施,杀死您的站点。是的,我已经这样做了,但没有插入值。@尤金·里克
i want to insert bid price with product title,bidding time ,username into table wherever title and bidding time is not into a input form and username is session.plz help.i m not geting solution even i tried a lot.

    <?php

     // check that the session variable does exist
     // check that the user 'LoggedIn' has been set to 1 (true)
     if (!isset($_SESSION['userName']) && $_SESSION['userName'] != 1)
     {
      $username= $_SESSION['userName'];
      header("Location: logindetail.php?redir=detailproduct.php?username=$username");
      ?>
      <?php
       }
       else
        {
        $con = mysql_connect("localhost","root","");
        if (!$con)
         {
          die('Could not connect: ' . mysql_error());
          }

        mysql_select_db("gunjanbid", $con);

        $result = mysql_query("SELECT * FROM bids WHERE id =  $_GET[id]");
         //$query=mysql_query("SELECT * FROM bid 
         $numrow = mysql_num_rows($result);

           if ($numrow == 0)
         {
    die('No record found.');
         }
         $row=mysql_fetch_array($result);
           $closedate = date_format(date_create($row[2]), 'm/d/Y H:i:s');

          ?>



           <table border="0" cellpadding="0.1">
            <tr>
           <td height="52"><div id="title"><?php echo $row[1];?> </div></td>
             </tr>
               <tr>
           <td><div id="clock"><table><tr><td style="font-size:18px;text-align:center;  padding-left:25px;">Days&nbsp;&nbsp; &nbsp;Hr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Min&nbsp;&nbsp;&nbsp; Sec</td></tr><tr><td style="font-size:32px; font:bold; text- align:center;padding-left:30px;">

             <div id="counter1">
             <div class="box days">0</div>
          <div class="box hours">0</div>
            <div class="box minutes">0</div>
          <div class="box seconds">0</div>
            </div>
            <script> cdtd("#counter1",new Date("<?php echo $closedate; ?>"));</script>
            </td></tr></table></div></td>
             </tr>
        <tr>
          <td style="padding-left:45px;">Single Bid eg. (1.23)</td>
         </tr>
          <tr>
          <td ><table><tr><td>Rs.</td><td>&nbsp;</td><td>
    <?php
        /*$con=mysql_connect("localhost","root","","database");
        // Check connection
         if (mysql_error())
         {
         echo "Failed to connect to MySQL: " . mysql_error();
          }*/



         $con = mysql_connect("localhost","root","");
       if (!$con)
          {
          die('Could not connect: ' . mysql_error());
           }

           mysql_select_db("gunjanbid", $con) or DIE('Database name is not available!');;



         if(isset($_POST['submit']))
        {
         function check_input($value)
        {
        // Stripslashes
        if (get_magic_quotes_gpc())
        {
        $value = stripslashes($value);
           }
        // Quote if not a number
        if (!is_numeric($value))
           {
         $value = "" . mysql_real_escape_string($value) . "";
            }
         return $value;
           }

        //$f=check_input($_POST['$title']);
         //$m=check_input($_POST['$closedate']);
          $l=check_input($_POST['bid1']);
        //$u=$_POST['userName'];
          //$p=$_POST['passWord'];
           //$g=check_input($_POST['bid2']);
         //$g1=check_input($_POST['bid3']);
          //$c=implode($_POST['newsletter']);
          //$username=$_SESSION['userName'];
         //$u=check_input($_POST['$username']);
        /*$sql="INSERT INTO bid ( product,date,bid1,bid2,bid3,userName
       ) 
          VALUES ( 
         (SELECT id,description, 
              closing_date 

         FROM bids 
         ORDER BY id ASC),'$l','$g','$g1','$u')";*/

        $sql="INSERT INTO biden(bid1)VALUES('$l')";
       //$sql1="INSERT INTO bident(bid2,bid3)VALUES('$g','$g1')";
         $result=mysql_query($sql) or die ("Could not insert data into DB: " .             mysql_error());
         //$query=mysql_query($sql1) or die ("Could not insert data into DB: " .  mysql_error());
          if($result!=1)
         {

        echo"failure!";
          }
       /*if($query!=1)
            {

         echo"failure!";
          }*/

        }
        ?>



      <form action="" method="post"><input name="bid1" type="text" size="5" /></td>      <td>&nbsp;</td><td><input type="submit" value="Bid Now"></form></td><td style="padding-  left:90px;" ><div class="dhtmlgoodies_question"><img src="image/more.png" alt="more" />    </div>
            div class="dhtmlgoodies_answer">
        <div>
        <table border="0" cellpadding="0.1">
            <tr>
           <td><table><td>Rs.</td><td>&nbsp;</td><td><form action="auctionbid.php"   method="post"><input name="bid2" type="text" size="5" /></td><td>&nbsp;</td></table></td>
          </tr>
           <tr>
         <td>&nbsp;</td>
          </tr>
           <tr>
              <td><table><td>Rs.</td><td>&nbsp;</td><td><input name="bid3" type="text"  size="5" /><input type="submit" value="Bid Now"></form></td><td>&nbsp;</td></table></td>
               </tr>
             </table>
        </div>
            </div> 


             </td>  </table></td>
          </tr>
              <tr>
           <td style=padding-left:45px;>Multiple Bid (Max100) ?</td>
           </tr>
           <tr>
            <td style="padding-left:45px;"><table><td>Rs.</td><td>&nbsp;</td><td><form      action="auctionbid.php" method="post"><input name="bid4" type="text" size="5"  />&nbsp;&nbsp;to&nbsp;&nbsp;<input name="bid5" type="text" size="5" /></td><td>&nbsp;</td>        <td><input type="submit" value="Bid Now"></form></td>
            </table></td>
             </tr>
           <tr>
              <td>&nbsp;</td>
           </tr>
            <tr>
           <td style="padding-left:45px;">Lowest Unique Bidder :</td>
          </tr>
          <tr>
         <td>&nbsp;</td>
         </tr>
         </table>
         <?php } ?>
          </div><!----left end---->


           <div id="right">
            <table border="0" cellpadding="0.1">
              <tr>
          <td><img src="productimage/1/001.jpg"  width="405"  height="300" style="padding-  top:5px; padding-left:5px; padding-right:5px;"alt="image" /></td>
           </tr>

              <tr>
           <td><table border="0" cellpadding="0.1" style="padding-left:5px; margin- top:15px;">
            <tr>
             <td><p><a href="productimage/1/001.jpg "   rel="thumbnail" title="This is product for sale!"><img src="productimage/1/1.1.jpg" style="width: 70px; height: 60px" />          </a></p></td>
            <td>&nbsp;</td>
            <td><p><a href="productimage/1/002.jpg" rel="thumbnail"><img  src="productimage/1/1.2.jpg" style="width: 70px; height: 60px" /></a></p></td>
          <td>&nbsp;</td>
               <td><p><a href="productimage/1/003.jpg" rel="thumbnail"><img  src="productimage/1/1.3.jpg" style="width: 70px; height: 60px" /></a></p></td>
           </tr>
           </table></td>
           </tr>
         </table>