Microsoft Word - php tutorials

PHP Tutorial Software / Tools Needed: - PHP - MySQL or any other database server - Server to run your Application If your going to use PHP, MYSQL and Apache server on local machine, I would recommend using WAMP for windows which stands for Windows Apache MySQL PHP or LAMP for linux which stands for Linux Apache MySQL PHP. Here are some some basic scripts to get started on PHP. CONFIGURATION FILE: config.php Include the above file in all the pages which are going to use the database. You can do that by including the following line on all those pages. SESSION VARIABLES: You will most probably need session variables to handle the login. You can set the session variable say username as $_SESSION[‘username’] = “userid” For example: And then on every page you can check it by the following code The header function above is used to redirect….You can redirect to the homepage / login page if somebody tries to access a page directly by entering the exact address. FORM HANDLING: If the form is passed using GET, use the following to retrieve the valie: $variableName = $_GET[‘form_field_name’] If the form is passed using POST, use the following to retrieve the valie: $variableName = $_POST[‘form_field_name’] QUERYING THE DATABASE AND RESULTSETS: You can

Microsoft Word - php tutorials

Category: PHP Tutorials
Source: www.cc.gatech.edu
Download: 0 | Filesize: 51KB

Download PDFboom bookmark and share

Related Post