How to read input in php

(*-*)浩
Release: 2023-02-26 17:18:02
Original
7487 people have browsed it

How to read input in php

The user fills in the data in the form and then submits it to a php file. The PHP file uses functions to obtain the data (recommended learning:PHP video tutorial)

Name: E-mail:
Copy after login

After the user fills in the username, it is submitted to the welcome.php file. In the welcome.php file,

  Welcome  Your email address is:   
Copy after login

$_POST["name"] is the name entered by the user

You can use these three constants in PHP scripts to accept user input or display the results of processing and calculation.

STDIN Standard input device

STDOUT Standard output device

STDERR Standard error Device

The PHP process is as follows: The fwrite() function will first write a message to the standard output device and ask for the user's name. It then reads the user input information obtained from the standard input device into a PHP variable and combines it into a string. Then use fwrite() to print the string to the standard output device

Copy after login

        
Copy after login

The above is the detailed content of How to read input in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!