I have a php code below that outputs json array on the browser.
The php script is called like this: http://localhost/site/property.php
I would like to call it like this: http://localhost/site/property.php?propertyId=1&clientId=2
Where propertyId and clientId are columns of the property table. How can I change this script to achieve this
Thanks. I will really appreciate.
<?php 
    $connection = mysql_connect("localhost", "root", "");
    if(!$connection)
    {
        die('Could not connect: ' .mysql_error());
    }
    mysql_select_db("Mobile", $connection); 
    $result = mysql_query("SELECT * FROM property");
    while($row = mysql_fetch_assoc($result))
    {
        $output[]=$row;
    }
    Print(json_encode($output));
    mysql_close($connection);
?>
 
     
     
     
     
     
     
    