Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>recipients recipients_banned recipient_id | member_id recipient_id | member_id ------------------------ ------------------------ 11 | 21 31 | 32 21 | 22 41 | 42 </code></pre> <p>Actually, you didn't explain your question in detail. So, I have tried to guess something about your question and give you some tips. For example, we have a PHP file with a name of <em>form.php</em>:</p> <pre><code>&lt;form action="form.php?q=yes" method="get"&gt; Recipient ID: &lt;input type="text" name="recipient_id"&gt; Member ID: &lt;input type="text" name="member_id"&gt; &lt;input type="submit" value="Move"&gt; &lt;/form&gt; &lt;?php $con = mysqli_connect("$host", "$user", "$password", "$database"); $r = mysql_real_escape_string($_GET["recipient_id"]; $m = mysql_real_escape_string($_GET["member_id"]; $q = $_GET["q"]; if ($q = yes) { $i = "INSERT INTO `recipients_banned` ( `recipient_id` , `member_id` ) VALUES ( '$r' , '$m' );"; $d = "DELETE FROM `recipients` WHERE `recipient_id` = $r AND `member_id` = '$m' LIMIT 1;"; mysqli_query($con, "$i $d"); } mysqli_close($con); ?&gt; </code></pre> <p>If we try to input <em>"21"</em> in <strong>Recipient ID</strong> field and <em>"22"</em> in <strong>Member ID</strong> field and then click the <strong>Move</strong> button, the database tables' contents would look like this:</p> <pre><code>recipients recipients_banned recipient_id | member_id recipient_id | member_id ------------------------ ------------------------ 11 | 21 21 | 22 31 | 32 41 | 42 </code></pre> <p>Feel free to revise this answer if something isn't right!</p>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      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