automatically create new pages with php and mysqli

前端 未结 2 1161
醉酒成梦
醉酒成梦 2021-01-16 06:28

still getting my feet wet with php and mysqli, have so much to learn, but at this point this question is one of my most important priorities.

I did some research abo

2条回答
  •  清酒与你
    2021-01-16 06:44

    So PHP will look for a file called index.php by default in any directory that it accesses. You can place such a file in the root of public_html or www or where ever your site accesses. Now in this file you can do something like:

    execute(); //run it
                $result = $stmt->get_result(); // get results
    
                //use result to echo and stuff
            }
        } else {
            //Do something incase there is not a group specified.
            echo "Nothing here";
        }
    ?>
    

    Now when you go to your site you will get something like 'localhost/index.php' and see Nothing here but if you type localhost/index.php?group='55' you will have access to the page 55 data in result.

提交回复
热议问题