This is a pretty in-depth question, but I can give some pointers.
You will need to pick a server (Windows, Apache, Glassfish, etc), pick a server-side language compatible with your server (PHP, ASP, Python, Java), install that language, study up, and trial-and-error with help from your friends at SO.
However, I will detail one way you can get practicing pretty quickly.
Head over to c9.io (web-based IDE). Create a free account and sign in.
Create a new workspace. Give it a name and description (you can have one free private workspace, for more, you will have to pay. You can, however, make many public ones - in a testing case, it doesn't really matter). Choose a template from the list and click Create Workspace. For this demo, please choose PHP, Apache & MySQL.
Once created, you should see your workspace on the left, along with the files contained in it. You should have a hello-world.php, readme.txt, and php.ini in the workspace. You can read the readme, and delete the hello-world.php (or rename it to whatever your server page should be).
For this, I deleted hello-world.php, and created two files: index.php and server.php (index.php for the frontend and server.php for the backend). In index.php, copy and paste this code:
<!doctype html>
<html>
<head>
<title>Test Index</title>
</head>
<body>
Number: <input id='number'>
Letter: <input id='results' readonly>
<script src='https://code.jquery.com/jquery-1.12.0.min.js'></script>
<script>
$('#number').on('keyup', function(){
$.post(
'server.php',
{number:$('#number').val()},
function(data){
$('#results').val(data);
}
);
});
</script>
</body>
</html>
That's a pretty basic page, but will have your input for a number, and will have a readonly input to display the results from the server. The JS sets up a keyup listener on the number input, and uses jQuery's POST method to send the inputted number to the server. The first parameter is the server page, the second is an object with any information necessary to the server, and the third is a function stating what to do with the information when it returns to the page. This completes the client-side page.
Open the server.php file (the server-side page), and copy and paste the following:
<?php
function toLetter($number) {
$arr = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
return $arr[$number - 1];
}
if(isset($_POST['number'])){
if(is_numeric($_POST['number']) && $_POST['number'] >= 0 && $_POST['number'] <= 26){
echo toLetter($_POST['number']);
}
else{
echo "Please enter a number between 1 and 26";
}
}
else{
echo "No input detected.";
}
?>
This page contains one function (toLetter), and accepts a parameter passed via the POST method called 'number'. If this number is set, is numeric, and is between 0 and 26 (inclusive) it will use the toLetter function to send the corresponding letter in the alphabet back to the client-side page (which will in turn display the results in the input #results
). If the number is not sent (a POST is submitted without any data) it will return the message "No input detected.". If the number is invalid (too high, too low, or NaN), it will return the message "Please enter a number between 1 and 26".
Once you've saved these two pages in c9, you can press the "Run Project" button at the top to start the virtual server up. Once it's running (you can see the console at the bottom of the screen), click Preview > Preview Running Application.
You should see two inputs, one labeled Number and one Letter. If you enter a number between 1 and 26 in the Number field, you will see the corresponding letter of the alphabet.
This will get you started with the front-end back-end situation; at least with HTML, AJAX, and PHP. If you use GET instead of POST, you would look in PHP's $_GET array instead of the $_POST array. You can send as much data as you want in the object in the second parameter of $.post. If you use a database on the backend make sure you learn prepared statements, or at the least input sanitization first.
Next step. Generate some awesome client-side to server-side code until it breaks... then come back here with some code for your next question :)
EDIT: tl;dr - Use jQuery AJAX to send to PHP from client. Use $_POST or $_GET to read variables. Use echo to send data back.