我有以下 javascript 函数和 php 文件。我想获取 URL 中的 id 并将其发送到 PHP,以便我可以通过页面上的特定 ID 查询数据。这是我到目前为止所拥有的。让我知道需要更改哪些内容才能使其正常工作。谢谢
javascript:
/*adding data*/
dhx.ready(function () {
dhx.ui.fullScreen();
dhx.ui({
view: "scheduler",
id: "scheduler"
});
$$("scheduler").load("placevents.php?id=" + getID, "scheduler");
/*preselects Month view*/
$$("scheduler").$$("month").show();
$$("scheduler").$$("buttons").setValue("month");
});
PHP:
//Retrieve logged in user
$test = ".@$_REQUEST['id']";
$scheduler = new schedulerConnector( $res, "MySQL" );
$scheduler -> enable_log( "log.txt", true );
$scheduler -> render_table("events LEFT JOIN tblfollowers ON events.id_user = tblfollowers.username"
. " WHERE events.status = 'active' AND((events.id_user) ='$test')"
. " GROUP BY events.event_id, events.event_name, events.user_name, events.id_user, events.time, events.details, events.location, events.dresscode"
. " Order By events.timestamp DESC","event_id","start_date, start_date,event_name,details");
$scheduler -> render_sql("select event_id, start_date, end_date, event_name, details from events ");