Vince Baker

Vince Baker

  • NA
  • 2
  • 839

MVC Form with Database

Apr 25 2018 9:21 PM
For the life of me, I cannot seem to get my form on my index page to post to my database and then display in a separate page on my website sorted by an input category.
 
What am I doing wrong?
  1. <div class="container">  
  2. <div class="row clearfix">  
  3. <div class="col-md-12 column">  
  4. <table class="table table-bordered table-hover" id="tab_logic">  
  5. <thead>  
  6. <tr>  
  7. <th class="text-center">  
  8. <h2>Category</h2>  
  9. </th>  
  10. <th class="text-center">  
  11. <h2>Store</h2>  
  12. </th>  
  13. <th class="text-center">  
  14. <h2>Amount</h2>  
  15. </th>  
  16. <th class="text-center">  
  17. <h2>Date</h2>  
  18. </th>  
  19. </tr>  
  20. </thead>  
  21. <tbody>  
  22. <tr id='addr0'>  
  23. <td name='category0'>  
  24. <select name="mydropdown" class="form-control">  
  25. <option value=""></option>  
  26. <option value="Tithes">Tithes</option>  
  27. <option value="Emergency Fund">Emergency Fund</option>  
  28. <option value="Retirement Fund">Retirement Fund</option>  
  29. <option value="College Fund">College Fund</option>  
  30. <option value="Mortgage">Mortgage</option>  
  31. <option value="Repairs">Repairs</option>  
  32. <option value="Electricity/Gas">Electricity/Gas</option>  
  33. <option value="Water">Water</option>  
  34. <option value="Trash">Trash</option>  
  35. <option value="Sewer">Sewer</option>  
  36. <option value="Phone">Phone</option>  
  37. <option value="Intenet">Intenet</option>  
  38. <option value="TV">TV</option>  
  39. <option value="Life Insurance">Life Insurance</option>  
  40. <option value="Auto Insurance">Auto Insurance</option>  
  41. <option value="Groceries">Groceries</option>  
  42. <option value="Restaurants">Restaurants</option>  
  43. <option value="Clothing">Clothing</option>  
  44. <option value="Dry Cleaning">Dry Cleaning</option>  
  45. <option value="Gas & Oil">Gas & Oil</option>  
  46. <option value="Repairs & Tires">Repairs & Tires</option>  
  47. <option value="License & Taxes">License & Taxes</option>  
  48. <option value="Car Replacement">Car Replacement</option>  
  49. <option value="Medical">Medical</option>  
  50. <option value="Cosmetics/Hair Care">Cosmetics/Hair Care</option>  
  51. <option value="Gifts">Gifts</option>  
  52. <option value="Replacement Furniture">Replacement Furniture</option>  
  53. <option value="Hunting">Hunting</option>  
  54. <option value="Pocket Money(His)">Pocket Money (His)</option>  
  55. <option value="Pocket Money(Hers)">Pocket Money (Hers)</option>  
  56. <option value="Archie">Archie</option>  
  57. <option value="Swim Lessons">Swim Lessons</option>  
  58. <option value="Union Dues">Union Dues</option>  
  59. <option value="Childcare">Childcare</option>  
  60. <option value="Entertainment">Entertainment</option>  
  61. <option value="Vacation">Vacation</option>  
  62. <option value="Essential Oils">Essential Oils</option>  
  63. </select>  
  64. </td>  
  65. <td name='store0'>  
  66. <input type="text" class="form-control" />  
  67. </td>  
  68. <td name='amount0'>  
  69. <input type="number" min="0.01" step="0.01" class="form-control" />  
  70. </td>  
  71. <td name='date'>  
  72. <input type="date" class="form-control" />  
  73. </td>  
  74. </tr>  
  75. <tr id='addr1'></tr>  
  76. </tbody>  
  77. </table>  
  78. </div>  
  79. </div>  
  80. <a id="add_row" class="btn btn-default pull-left">Add Row</a><a id='delete_row' class="pull-right btn btn-default">Delete Row</a></div>  
  81. <div class="row">  
  82. <div align="center">  
  83. <button onclick="myFunction()">Submit Reviews</button>  
  84. </div>  
  85. </div>  
This is supposed to post to the following page:
  1. <div class="tab">  
  2. <button class="tablinks" onclick="openCity(event, 'London')">London</button>  
  3. <button class="tablinks" onclick="openCity(event, 'Paris')">Paris</button>  
  4. <button class="tablinks" onclick="openCity(event, 'Tokyo')">Tokyo</button </div>  
  5. <div id="London" class="tabcontent">  
  6. <h3>London</h3>  
  7. <p>London is the capital city of England.</p></div>  
  8. <div id="Paris" class="tabcontent">  
  9. <h3>Paris</h3>  
  10. <p>Paris is the capital of France.</p>  
  11. </div>  
  12. <div id="Tokyo" class="tabcontent">  
  13. <h3>Tokyo</h3>  
  14. <p>Tokyo is the capital of Japan.</p>  
  15. </div>

Answers (1)