| |

VerySource

 Forgot password?
 Register
Search
View: 16|Reply: 4

Questions about page passing

[Copy link]

2

Threads

4

Posts

5

Credits

Newbie

Rank: 1

Credits
5

 China

Post time: 2020-2-19 00:00:02
| Show all posts |Read mode
The younger brother is new, and I want to ask if if the form is a post, if another page receives a value, this value is not a textfield or other control, but a common variable, such as $ name = "123" Pass it to another page? Thank you all masters
Reply

Use magic Report

0

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

Post time: 2020-4-25 00:15:01
| Show all posts
Write this variable to form or url.
Or in session / cookie

Only these methods
Reply

Use magic Report

2

Threads

4

Posts

5

Credits

Newbie

Rank: 1

Credits
5

 China

 Author| Post time: 2020-4-25 09:00:01
| Show all posts
Sorry, can you say something specific? . ? do not really understand
Reply

Use magic Report

0

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

Post time: 2020-4-26 02:00:01
| Show all posts
Write it in the form url, don't you understand?
Write to the form <input type = "hidden" name = "name" value = "123">
Write to the url xxx.php? Name = 123

Write to session
session_start ();
session_register ("name");
name = 123;

Write to cookie
setcookie ("name", "123", time () + 3600, "/", "localhost");
Reply

Use magic Report

0

Threads

7

Posts

7

Credits

Newbie

Rank: 1

Credits
7

 United States

Post time: 2020-4-26 11:15:01
| Show all posts
<input type = "hidden" name = "name" value = "$ variable">

that's it
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list