Home > CMS Tutorial > DEDECMS > body text

How to modify the jump link after DEDECMS custom form submission

藏色散人
Release: 2019-12-17 10:26:57
Original
1778 people have browsed it

How to modify the jump link after DEDECMS custom form submission

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); 
}
Copy after login

Find this line:

The code is as follows:

$goto = !empty($cfg_cmspath) ? $cfg_cmspath : '/';
Copy after login

jumps to the homepage That makes sense. Let's modify it, for example:

$goto = "/abc.htm"
Copy after login

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);
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template