


Summary and answers to frequently asked questions about learning dynamic webpage PHP technology_PHP tutorial
1: Why can’t I get the variable
I POST data name from one web page to another web page, why can’t I get any value when I output $name?
In PHP4.2 and later versions, reGISter_global defaults to off
If you want to get variables submitted from another page:
Method 1: Find register_global in PHP.ini and set it to on.
Method 2: Put this extract($_POST);extract($_GET); at the front of the receiving web page (note that there must be Session_Start() before extract($_SESSION)).
Method 3: Read the variables $a=$_GET["a"];$b=$_POST["b"] one by one. Although this method is troublesome, it is safer.
2: Debug your program
The value of a variable must be known at runtime. This is what I did, create a file debug.php with the following content:
PHP code:
Ob_Start();
Session_Start();
Echo "
";<br> <br> Echo "The _GET variables obtained on this page are:";<br> Print_R($_GET);<br> <br> Echo "The _POST variables obtained on this page are:";<br> Print_R($_POST);<br> <br> Echo "The _COOKIE variables obtained on this page are:";<br> Print_R($_COOKIE);<br> <br> Echo "The _SESSION variables obtained on this page are:";<br> Print_R($_SESSION);<br> <br> Echo "";
?>
Then set: include_path = "c:/php" in php.ini, and put debug.php in this folder. You can include this file in every web page in the future and view the obtained variable names and values.
3: How to use session
For anything related to session, the function session_start() must be called before;
Paying value for a session is very simple, such as:
PHP code:
Session_start();
$Name = "This is a Session example";
Session_Register("Name");//Note, do not write: Session_Register("$Name");
Echo $_SESSION["Name"];
//Then $_SESSION["Name"] is "This is a Session example"
?>
After php4.2, you can pay directly for the session:
PHP code:
Session_Start();
$_SESSION["name"]="value";
?>
You can cancel the session like this:
PHP code:
session_start();
session_unset();
session_destroy();
?>
There is a bug in canceling a certain session variable in php4.2 and above.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Local fine-tuning of DeepSeek class models faces the challenge of insufficient computing resources and expertise. To address these challenges, the following strategies can be adopted: Model quantization: convert model parameters into low-precision integers, reducing memory footprint. Use smaller models: Select a pretrained model with smaller parameters for easier local fine-tuning. Data selection and preprocessing: Select high-quality data and perform appropriate preprocessing to avoid poor data quality affecting model effectiveness. Batch training: For large data sets, load data in batches for training to avoid memory overflow. Acceleration with GPU: Use independent graphics cards to accelerate the training process and shorten the training time.

There are a variety of reasons why DeepSeek cannot log in, including server failure, network connection issues, account disables, login credentials errors, or system updates. When you cannot enter the DeepSeek login portal, users can access the official website through https://www.deepseek.com/. If you encounter login problems, users should check the server status and troubleshoot network connection or login credential errors. If the problem persists, users should contact the DeepSeek support team for further assistance.

DeepSeekAI Tool User Guide and FAQ DeepSeek is a powerful AI intelligent tool. This article will answer some common usage questions to help you get started quickly. FAQ: The difference between different access methods: There is no difference in function between web version, App version and API calls, and App is just a wrapper for web version. The local deployment uses a distillation model, which is slightly inferior to the full version of DeepSeek-R1, but the 32-bit model theoretically has 90% full version capability. What is a tavern? SillyTavern is a front-end interface that requires calling the AI model through API or Ollama. What is breaking limit

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Why can’t the Bybit exchange link be directly downloaded and installed? Bybit is a cryptocurrency exchange that provides trading services to users. The exchange's mobile apps cannot be downloaded directly through AppStore or GooglePlay for the following reasons: 1. App Store policy restricts Apple and Google from having strict requirements on the types of applications allowed in the app store. Cryptocurrency exchange applications often do not meet these requirements because they involve financial services and require specific regulations and security standards. 2. Laws and regulations Compliance In many countries, activities related to cryptocurrency transactions are regulated or restricted. To comply with these regulations, Bybit Application can only be used through official websites or other authorized channels

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

This article introduces free digital asset quotation software apps and websites that can provide investors with key information such as real-time prices, price charts, transaction volume, fluctuations, market depth and news information to help investors make informed decisions. Compared with paid software, free software has the advantages of no cost, rich features, and easy operation. The article also guides users how to choose the right market software, and reminds users to pay attention to data sources, information accuracy and avoid excessive dependence, which ultimately helps investors better grasp the trends of the digital asset market. Want to know how to use free market software efficiently? Read the full text quickly!

Original title: Bittensor=AIBitcoin? Original author: S4mmyEth, Decentralized AI Research Original translation: zhouzhou, BlockBeats Editor's note: This article discusses Bittensor, a decentralized AI platform, hoping to break the monopoly of centralized AI companies through blockchain technology and promote an open and collaborative AI ecosystem. Bittensor adopts a subnet model that allows the emergence of different AI solutions and inspires innovation through TAO tokens. Although the AI market is mature, Bittensor faces competitive risks and may be subject to other open source
