15-6. 论坛系统-操作确认、跳转提示和删除验证

Operational Qualification, prompt of page skipping and deletion verification

 

How to prevent the misoperation that user delete module mistakenly and  

increase the quality of user experience in deletion operation?

In fact, each function of operation need to be realized by a php file.

So the function of confirm a operation also need a php file to realize it.

We can use “?url={$url}” to transmit deletion file url to confirm file page.

In the confirm file, user can chose delete or cancel. The delete button linked with the deletion url,

and the current page should go back to previous page. There is a special variable $_SEVER

which stored the information of current page. We can use $SEVER[‘REQUEST_URL’] to represent

current page url and transmit it to the confirm page. In order to make user ensure what they are deleting,

the prompt message and concrete module name can be transmitted to the confirm page.

 

 

It will appear errors if $_GET could not receive the data which transmitted from other pages.

How to solve this problem?

We need to verify whether the variables exist or not. Verify all the elements of $_GET transmitted from other page.

It will stop the next execution if there not exist the data.

 

How to skip to a prompt page which has good user UI interface rather than the rough prompt on the current page?

And how to realize the function of skip to current page automatically or manually?

About the process of deleting a module, there are three steps need to do.

  1.  Enter the confirm page which need to chose yes or cancel
  2. Skip to the page which prompt “delete successfully” after click the delete button
  3. In the page which prompt you did successfully, There is a function of skipping to the current page after 3 seconds or skip right away.

 

In the step 2, We put the html code in skip() function,so the realization of skipping to the prompt page

just need to call the skip() function in deletion file.

In the step 3, the page can skip to the current page by “<meta http-equiv="refresh" content="3;URL={$url}" />” in the html code.

The number 3 is to control the skipping time. Otherwise, some users want to skip to the current page right away.

We can transmit a url to the prompt, and users can skip the page through clicking the link.

 

Sometimes users may delete all the data from database mistakenly by the method of $_GET,

how to prevent the serious problem?

if(!isset($_GET['id']) || !is_numeric($_GET['id'])){

    skip('father_module.php','error','The id parameter does not exist!');

}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值