Home >Backend Development >PHP Tutorial >我一个表单,提交修改数据,怎么让get的时候显示页面,POST的时候修改数据?

我一个表单,提交修改数据,怎么让get的时候显示页面,POST的时候修改数据?

WBOY
WBOYOriginal
2016-06-23 14:13:271125browse

if($_SERVER['REQUEST_METHOD']=='GET'')
{


    


    

    

            
            
    

             
    




这该怎么混编呢?能有大侠给我个示例吗

回复讨论(解决方案)

if($_SERVER['REQUEST_METHOD']=='GET'')
{
?>


    


    

    

            
            
    

             
    



......POST的时候修改数据.......
}
?>

if($_SERVER['REQUEST_METHOD']=='GET'')
{
?>


    


    

    

            
            
    

             
    



......POST的时候修改数据.......
}
?>

非常感谢!
Statement:
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