Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Lec 26 - Passing data between page. After studying this chapter you will be able to understand: Operators in PHP, conditional statements in PHP, looping statements, arrays in PHP, super global variables, passing form data, passing data with sessions. | Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 1 Operators in PHP Conditional Statements in PHP Looping Statements Arrays in PHP Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 2 2 Department of Computer Science, CIIT Islamabad. Super Global variables Passing form data Passing data with sessions Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 3 3 Department of Computer Science, CIIT Islamabad. Forms provide a mean of submitting information from the client to the server We can create HTML forms using tag Method and action are the most common attributes of Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 4 action - gives the URL of the application that is to receive and process the forms data method - sets the HTTP method that the browser uses to send the forms data to the server for processing most common methods are POST or GET Basharat Mahmood, Department of Computer | Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 1 Operators in PHP Conditional Statements in PHP Looping Statements Arrays in PHP Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 2 2 Department of Computer Science, CIIT Islamabad. Super Global variables Passing form data Passing data with sessions Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 3 3 Department of Computer Science, CIIT Islamabad. Forms provide a mean of submitting information from the client to the server We can create HTML forms using tag Method and action are the most common attributes of Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 4 action - gives the URL of the application that is to receive and process the forms data method - sets the HTTP method that the browser uses to send the forms data to the server for processing most common methods are POST or GET Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 5 Get method : all form data is encoded into the URL, appended the action URL as query string parameters Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 6 Action page name Input field name Value entered by user Asad asd@gmail.com submit Post method: form data appears within the message body of the HTTP request Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 7 PHP automatically makes few variables available in your program These are array variables and can be accessed by name These variables are called super-global variables because they can be accessed without regard to scope Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 8 $_GET: contains all the query string variables that were attached to the URL $_POST: contains all the submitted form variables and their data Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 9 Basharat Mahmood, Department of .