开发者

PHP Form (post) Repeating input in a tabel

I have a form (with post method) that takes the following input:

- a certain name

- a number

- 3 checkboxes

All this input gets generated and calculated in a table.(html code within the php)

Everything gets properly calculated and displayed in a table.

So my question:

How do i make it possible after giving all those input to give in more input?

Meaning i have made a hyperlink that goes back to the form itself (where i can give the input).

So i can give in new data, and after submiting that again the table now contains 2 rows of values insteed of just 1.

开发者_运维问答Not really sure what exactly i need for this. (i use 2 php files, one for the form, then another one where the table gets displayed (and where all my calculations are placed).

Regards.


How do i make it possible after giving all those input to give in more input? Meaning i have made a hyperlink that goes back to the form itself (where i can give the input). So i can give in new data, and after submiting that again the table now contains 2 rows of values insteed of just 1.

You could place new text input after form has been submitted like this:

<?php
if (isset($_POST['submit']))
{
?>
  <!-- Your initial/previous form -->
  <form>
    <!-- Your initial/previous form iputs -->

    <!-- now your news input text -->
    <input type="text" name="whatever" />
  </form>
<?php
}
?>


If I got your question right, then i hope You need to place an UPDATE query instead of INSERT

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜