How to check if my php function is correct using web browser?
<p>I have just started my HTTPREQUEST application and I am trying to set up my php files first. </p>

<p>I have this insert function on my <code>wamp/www/MenuBook/</code> folder :</p>

<pre><code>&lt;?php

// array for JSON response
$response = array();

// check for required fields
if (isset($_POST['table_ID']) &amp;&amp; isset($_POST['MenuBook']) &amp;&amp; isset($_POST['order_status'])&amp;&amp; isset($_POST['order_date'])&amp;&amp; isset($_POST['order_receipt'])) {

    $tableID = $_POST['table_ID'];
    $menuBook = $_POST['MenuBook'];
    $order_status = $_POST['order_status'];
    $order_date = $_POST['order_date'];
    $order_receipt = $_POST['order_receipt'];

    // inlude db connect class
    require_once __DIR__ . '/DBConnect.php';

    // connecting to db
    $db = new DB_CONNECT();

    // mysql inserting a new row
    $result = mysql_query("INSERT INTO orderdb(table_ID,MenuBook,order_status,order_date,order_receipt) VALUES('$table_ID', '$menuBook', '$order_status','$order_date','$order_receipt')");

    // check if row inserted or not
    if ($result) {
        // successfully inserted into database
        $response["success"] = 1;
        $response["message"] = "Order successfully created.";

        // echoing JSON response
        echo json_encode($response);
    } else {
        // failed to insert row
        $response["success"] = 0;
        $response["message"] = "Oops! An error occurred.";

        // echoing JSON response
        echo json_encode($response);
    }
} else {
    // required field is missing
    $response["success"] = 0;
    $response["message"] = "Required field(s) is missing";

    // echoing JSON response
    echo json_encode($response);
}
?&gt;
</code></pre>

<p>Now I would like to check if it would insert data into the database using my browser something like this :</p>

<p><code>localhost/MenuBook/insertOrder.php?$table_ID=003&amp;$MenuBook=01&amp;$order_status=PENDING&amp;$order_date=2013-01-17&amp;$order_receipt=NO</code></p>

<p>as of now it returns this in the browser:</p>

<p><code>{"success":0,"message":"Required field(s) is missing"}</code></p>

<p>Any ideas how I could try and check this?</p>
