Insert to all cells when records are more than one PHP

前端 未结 2 1829
甜味超标
甜味超标 2020-12-22 10:27

here is my big program!

note: all codes are in one page.

freinds, all thing is ok but problem is in \'while\' line and when i ha

2条回答
  •  误落风尘
    2020-12-22 11:07

    With respect to @Twisty answer, I would like to come with my final solution to your submission problem.

    First of all we need to define which raw to be updated, therefore you need to tell your update statement which ind to be updated.

    To do that we need to pass ind in out submission form to out update statement, we added a hidden input field and pass out ind value like this.

    ;
    

    Next we need to fetch the value and update our data by adding following:

    ($_POST['ind'])
    

    So the final solution will look like this:

    echo '';
    echo ''; //new line
    echo '
    '; echo ''; echo '
    '; echo '
    ';

    and in your update statement:

    $ins = "UPDATE $db_table
            SET
            customer_comment='" . mysql_escape_string($_POST['explain']) . "',
            vote='" . mysql_escape_string($_POST['vote']) . "'
            WHERE ind=".($_POST['ind']); // to define the ind value
    

    And wala, it works.

    NOTE:
    Just be a ware of, I used the updated code of @Twisty and the final solution on it.

提交回复
热议问题