The Goal: Make a "Golf Scorecard" for a buddies trip Where any golfer (or anyone with website access) can enter a score for a hole. (Aka: Golfer Alex name is already there, as he plays someone in the group enters his score on in the box under "Hole 1". The scores will stay there for when the whole group gets home to the house and can pull up the website and see how each golfer did.
Basics: I'm self taught, basic understanding. I'm building this in a website using Visual Studio Code to write the code. Tried for a while to figure this out as I have the table so it can be edited, but clears on refresh or bringing up the site again. I understand that I need a php page, a javascript, and I'm thinking from what I've read, an AJAX? I don't need "Edit" buttons or anything, just simple as deleting what's there, and stores/displays new data entered. (Bonus: Having the "out" column be a sum of the entered scores)
I have this for the Table (remember this is just super basic for now as i want to understand the bones before making it pretty): jsFiddle of Code Below
<div class="card">
<h3 class="card-header text-center font-weight-bold text-uppercase py-4">Editable table</h3>
<div class="card-body">
<div id="table" class="table-editable">
<span class="table-add float-right mb-3 mr-2"><a href="#!" class="text-success"><i
class="fas fa-plus fa-2x" aria-hidden="true"></i></a></span>
<table class="table table-bordered table-responsive-md table-striped text-center">
<thead>
<tr>
<th class="text-center">Player 1</th>
<th class="text-center">Hole 1</th>
<th class="text-center">Hole 2</th>
<th class="text-center">Hole 3</th>
<th class="text-center">Hole 4</th>
<th class="text-center">Hole 5</th>
<th class="text-center">Hole 6</th>
<th class="text-center">Hole 7</th>
<th class="text-center">Hole 8</th>
<th class="text-center">Hole 9</th>
<th class="text-center">Out</th>
</tr>
</thead>
<tbody>
<tr>
<td class="pt-3-half" contenteditable="Flase">John Smith</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
<td class="pt-3-half text-center" contenteditable="true">-</td>
</tr>
I Found this on here: How to save and retrieve contenteditable data but when copy and pasting it into my code to edit, I get lost.