Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>lets have this simple example: the example given uses jquery, you might google that up. html:</p> <pre><code> &lt;html&gt; &lt;body&gt; &lt;input type = "text" name = "username" id = "username"&gt;&lt;/input&gt; &lt;input type = "button" name = "submit" id = "save_button" value = "insert"&gt;&lt;/input&gt; &lt;div id = "save_stat"&gt;&lt;/div&gt; &lt;!--This will be the status of the insertion. "loading or sucess!"----&gt; &lt;script&gt; $('#save_button').click(function(){ //assign an event handler //grab values var name = $('#username').val(); //get the value of whatever the user entered //perform HTTP ajax request //could be $.get instead $.post('phpfile.php', (name:name)/*this could be modified to (name:name, password: password) etc.*/, function(data){ //send the data to the php file. $('#save_stat').html(data); }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Now all that is left to do is create the php registration page and link it instead of the "phpfile.php" And to load values in that file, sinply use $_POST['name']; OR $_POST['password']; etc.</p> <p>The above answers(suggested by others) are perfect, as they suggest the essence of what you actually require to create an in-sync Javascript and php application.</p> <p><em><strong></em>**<em>*</em></strong><em>EDIT NOTICE</em><strong><em>*</em>**<em>*</em>****</strong> When creating the php, use echo statement when giving the user messages, i.e</p> <pre><code>if(!empty($_POST['name'])){ echo "You successfully entered your name!"; }else echo "you forgot to enter a name"; </code></pre> <p>Sample #2</p> <pre><code>if(!empty($_POST['name'])){ $message = "You successfully entered your name!"; }else $message = "you forgot to enter a name"; echo $message; </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.
    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