PHP post submission. Related issues

Source: Internet
Author: User
PHP post submission. Problem
If Post is submitted:
user=name1&password1=123456&password2=123456
Such a connection

I want to Name{num}
num{}=1,2,3,4,5,6, wait.

How do you write the variables here?
The source code is as follows:

PHP Code
  
  Response Header:\ n ";   Echo $headers;      echo "\ n"; echo "

Response Body:

\ n "; Echo $body;? >


------Solution--------------------
3 floor was deleted??
Write the initial content of the file for 1,post before reading the file out of the value $num, get the name. $num, post the $num plus 1 and write the file.
------Solution--------------------
Before post
$filenum = "Num.txt";
$fnum =fopen ($filenum, "R");
if (! $num =fgetc ($fnum))
{$num = 0;}
....... Your operation
After post
$filenum = "Num.txt";
$fnum =fopen ($filenum, "R");
if (! $num =fgetc ($fnum))
{$num = 0;}
Else
{$num =intval ($num) + +;
Fclose ($fnum);
$FNUMW =fopen ($filenum, "w");
Fwrite (Fnumw,strval ($num));
Fclose ($filenum);
}
?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.