The example in this article describes how to modify the jump link after submitting the DEDECMS custom form. Share it with everyone for your reference. The specific implementation method is as follows:
Recommended learning: 梦Weavercms
dedecms custom form, after clicking submit, it will jump to the homepage by default, and we open plus/diy. php, there is such a piece of code:
The code is as follows:
if($dsql->executenonequery($query)) { $id = $dsql->GetLastID(); if($diy->public == 2) { //diy.php?action=view&diyid={$diy->diyid}&id=$id $goto = "diy.php?action=list&diyid={$diy->diyid}"; $bkmsg = '发布成功,现在转向表单列表页…'; } else { $goto = !emptyempty($cfg_cmspath) ? $cfg_cmspath : '/'; $bkmsg = '发布成功,请等待管理员处理…'; } showmsg($bkmsg, $goto); }
Find this line:
The code is as follows:
$goto = !empty($cfg_cmspath) ? $cfg_cmspath : '/';
jumps to the homepage That makes sense. Let's modify it, for example:
$goto = "/abc.htm"
can jump to the page you want. If you want to jump to the current page:
The code is as follows:
if($dsql->executenonequery($query)) { $id = $dsql->GetLastID(); if($diy->public == 2) { //diy.php?action=view&diyid={$diy->diyid}&id=$id $goto = "diy.php?action=list&diyid={$diy->diyid}"; $bkmsg = '发布成功,现在转向表单列表页…'; echo ""; } else { $goto = !emptyempty($cfg_cmspath) ? $cfg_cmspath : '/'; $bkmsg = '发布成功,请等待管理员处理…'; } showmsg($bkmsg, $goto);
The above is the detailed content of How to modify the jump link after DEDECMS custom form submission. For more information, please follow other related articles on the PHP Chinese website!