Say I had the following:
$stmt = $pdo->prepare("SELECT jobName, jobDesc FROM Jobs");
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$jName = $row['jobName'];
$jDesc = $row['jobDesc'];
print '<span class="job">Headline:</span> ' . $jName . '<br />
<span class="job">Description:</span>
<p class="job">' . $jDesc . '</p>';
}
The HTML output would be (for testing purposes)
<span class="job">Headline:</span> test 1
<span class="job>Description:</span>
<p class="job">test 1 Description</p>
<span class="job">Headline:</span> test 2
<span class="job>Description:</span>
<p class="job">test 2 Description</p>
<span class="job">Headline:</span> test 3
<span class="job>Description:</span>
<p class="job">test 3 Description</p>
If I wanted to remove one of these entries from the page, but keep it in the DB, how would I accomplish this with PHP? I'd probably have to put a link or button on each entry to remove it, and I know I can't actually take it off the page permanently with jQuery unless I use something to save the DOM state.
Thank you