Dear all,
I have php file which is returning result from server which are shown as group list, this result i want to pass to the dialog box as in drop-down selection, posting the code as below of group.php. I am getting php result correctly but need to integrate in dialog box code
Group.php
<?php
$serverName = "BSD-GESERVER01\SQLEXPRESS";
$connectionInfo = array( "Database"=>"master", "UID"=>"sa", "PWD"=>"sa");
$conn = sqlsrv_connect( $serverName, $connectionInfo );
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT Group_ID FROM Test where configured = '1'";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
{
echo $row['Group_ID']."<br />";
//}
sqlsrv_free_stmt( $stmt);
?>
Html part of dialog is as under where i have some more inputs
function(map, marker) {
$('#dialog').append('<form id="dialog'+marker.__gm_id+'" method="get" action="/" style="display:none;"><p><label for="country">Country</label><input id="country'+marker.__gm_id+'" class="txt" name="country" value=""/></p><p><label for="state">State</label><input id="state'+marker.__gm_id+'" class="txt" name="state" value=""/></p><p><label for="address">Address</label><input id="address'+marker.__gm_id+'" class="txt" name="address" value=""/></p><p><label for="Group">Group</label> [B]//PHP result should be displayed here as drop down box [/B]</p><p><label for="comment">Comment</label><textarea id="comment" class="txt" name="comment" cols="30" rows="2"></textarea></p></form>');
Thanks in advance