Php+mysql How to update the form contents to the database in a cyclic way

Source: Internet
Author: User
Php+mysql How to update the form contents to a database in a circular fashion
I currently need to dynamically create a form on a Web page, such as 10 lines, fill out the form and submit it via the form
The code is as follows:
PHP Code
  
               



I want to deal with it in the process.php,
$w = 0;
while ($row = Mysql_fetch_array ($result))
{
$filename = $row [' filename '];
$time 1 = $_post["$w"];
$w + +;
$time 2 = $_post["$w"];
$w + +;
$time 3 = $_post["$w"];
$w + +;
echo "w= at this time." $w. "
";
$sql = "UPDATE fileinfo SET time1=". $time 1. "', time2= '". $time 2. "', time3= '". $time 3. "' WHERE filename= ' ". $filename." ' ";
$re = mysql_query ($sql) or Die ("error:". Mysql_error ());
echo $sql. " ---result is: ". $re."
";
}

POST over the $time1, $time 2, $time 3 are empty values, changed to $time1 = $_post[$w] Also not, $time 1 = $_post[' $w '] also not, do not know $_post[] inside the value can be a variable, how to say ah .... How to deal with the situation of submitting a form!!

------Solution--------------------
Would you look at the foreground page and name it?
------Solution--------------------
Give it a try.
PHP code
 $i = 0;        while ($row = Mysql_fetch_array ($result)) {echo ""; echo "". $row [' filename '].        ""; echo "". $row [' FileSize ']. "";//The data table already has the file name and file size, but the playback time is default to 0, update the database through Web page modification echo "\ "Type=\"        Text\ ">";        echo "\ "type=\" text\ ">";        echo "\ "type=\" text\ ">"; echo "";    $i + +; 
------Solution--------------------
You first Print_r ($_post) and look at
------solution--------------------
Echo \" type=\ "text\" > ";
echo "\ "type=\" text\ ">";
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.