开发者

PHP conditional on query string with id

I have this code:

    if('open' == $po开发者_Python百科st->comment_status || !isset($_GET['wp_accept_favor']))
    {

// show comment form

    }
else
{
    // dont show comment form
    }

domain.com/?wp_accept_favor then show comment form

domain.com/?wp_accept_favor=2 then dont show comment form

How do I do that? Thanks


if('open' == $post->comment_status || 
             (isset($_GET['wp_accept_favor']) && empty($_GET['wp_accept_favor'])) )
{

    // show comment form

}
else if(isset($_GET['wp_accept_favor']) && !empty($_GET['wp_accept_favor']))
{
    // do not show comment form 
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜