Sending variable to PHP through jQuery and back
<p>I am trying to create a kind of request where registered members see posts of other registered members. They might choose to connect with them before they can be able to comment on the post. What I want is to use jQuery to send the request to PHP which in turn inserts into the database with a status <code>connection requested</code>. When the member sees the request he can then choose to accept or reject that request. If he accepts it, the status will change to <code>you are connected with this member</code>.</p>

<p>Please I know that there are similar questions like this but not exactly as mine, somebody should please help.</p>

<pre><code>'cont_email' is email of member sending request
'email_cont' is email receiving the request
'status' is the status of the connection
'counter' is request increment
</code></pre>

<p>This is my HTML part:</p>

<pre><code>&lt;input name="connect" type="button" value="Connect with&amp;nbsp;&lt;?php     echo"$mem_com[name]";?&gt;" class="intag2" onclick="connt()"/&gt;
</code></pre>

<p>The PHP part is working ok. My only problem is sending the request through jQuery to PHP and back to jQuery which now displays the status of the connection based on members activity.</p>
