Note that there are some explanatory texts on larger screens.

plurals
  1. POTrack/Verify/Update a MySQL result by user
    primarykey
    data
    text
    <p>I have a database of a schedule where volunteers can check their shifts. I'm going to email them a link to the page where they enter their email addresses into an HTML form to access this information. </p> <p>Is there a way I can track which emails are queried so I can resend the schedule link to those who haven't accessed the database? </p> <p>If necessary, I could add an additional 'confirmed' check box to the results and have that update the database. I like that idea, but I'm not sure how to implement (or the terminology for what that action would be). </p> <p>Edit: Here's the code I'm using to implement. However I'm not getting results in the confirmed column. </p> <pre><code> $db = new mysqli("host", "user", "pass", "db"); $stmt = $db-&gt;prepare('UPDATE volConfirm SET confirmed = TRUE WHERE email = ?'); $stmt-&gt;bind_param('s', $_POST['email']); $stmt-&gt;execute(); $stmt = $db-&gt;prepare('SELECT * from volConfirm WHERE email = ?'); $stmt-&gt;bind_param('s', $_POST['email']); $result = $stmt-&gt;get_result(); while ($row = $result-&gt;fetch_array(MYSQLI_NUM)) { // construct your output here using $row to access database record echo "&lt;h2&gt;" . $row['agreeName'] . "&lt;/h2&gt;"; echo "&lt;p&gt; You have been assigned as a volunteer for:" . $row['position'] . "&lt;/p&gt;"; echo "&lt;p&gt;Your shift times are scheduled for:" . $row['shift_times'] . "&lt;/p&gt;"; echo "&lt;p&gt;Your shift has been confirmed:" . $row['confirmed'] . "&lt;/p&gt;"; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload