Use $_POST['fieldname']
You said you're a beginner, so I wrote a very short description on how the whole process works. You may already be familiar with the basics of forms, but if not, read on. Don't be afraid to do Google searches, either. Remember, you're a web developer, your browser should be already RUNNING. (-:
Take this code snippet: (Which is not guaranteed to be error free, it's for example purposes only.)
<form action="example.php" method="POST">
<input type="text" name="input_value">
<input type="submit" name="submit">
<?php
if (isset($_POST['submit']))
{
// Execute this code if the submit button is pressed.
$formvalue = $_POST['input_value'];
}
?> The first several lines are a simple basic input form. We're passing variables by the POST method, which keeps them from being appended to the URL on submit. (There's also GET)
When the user clicks on "Submit" (or "Submit Query" because I didn't give the button a label), the browser will load the file indicated by action= , which for the sake of this example is the one with the form.
The script will then start executing at the if (isset($_POST['submit'])) line, as the submit button was pressed. To access form values, you'd use $_POST['<em>name</em>'] .