我有一页,在卢尔有许多员额数据。
For example, www.test.com/test.php?userid= tester &name=test&so on
上面一页有这样的形式:
<?
$set=get_value_set;
if($set ==1) {
$set_value="SET";
} else {
$set_value="UNSET";
}
?>
<form name="test">
<input type="text" readonly="READONLY" value="<? echo $user_id; ?>">
<input type="submit" value="Email" name="submit_user">
<input type="submit" value="<? echo $set_value; ?>" name="submit_user">
<?
function setuser()
{
//sets the value
}
function email_user()
{
//sets the value
}
?>
上面有两顿,在我点击电子邮件时,即希望将顿电子邮件的价值传递给电子邮件——用户功能,并在那里做一些预想。 在我点击了 set子时,情况类似。
NOTE:But in both cases above, I want the form to remain in the same page with the same post data in the url, but I also want the page to be refreshed so that the set button can have a value of Set or Unset depending on the database update.
这是可能的吗?