<p class="htmledit_views">The content of this article is the three cross-page value transfer methods in PHP. Now I share it with everyone, and can also give a reference to friends in need</p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> 1. POST value transfer</p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> Post value is a method used for HTML<form> form jump, which is very convenient to use. For example:</p>
<p style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'微软雅黑', Verdana, sans-serif, '宋体';font-size:13px;background-color:rgb(255,255,255);"><br></p>
<p class="syntaxhighlighter html" style="padding:0px;margin:1em 0px;font-size:1em;"><br></p>
<p class="toolbar" style="margin:0px;padding:0px;border:none;float:none;line-height:1.1em;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:10px;color:rgb(255,255,255);background-color:rgb(108,226,108);"><span style="margin:0px;padding:0px;">?</span></p>
<table border="0" style="margin:0px;padding:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tbody style="padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tr style="border-top:0px;padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;" class="firstRow">
<td class="gutter" style="border-width:0px;font-size:1em;color:rgb(175,175,175);line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">
<p class="line number1 index0 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">1</p>
<p class="line number2 index1 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">2</p>
<p class="line number3 index2 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">3</p>
<p class="line number4 index3 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">4</p>
<p class="line number5 index4 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">5</p>
<p class="line number6 index5 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">6</p>
<p class="line number7 index6 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">7</p>
</td> <td class="code" style="border-width:0px;font-size:1em;line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">
<p class="container" style="margin:0px;padding:0px;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><br></p>
<p class="line number1 index0 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">html</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
<p class="line number2 index1 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">form</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">action</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">''</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">method</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">''</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
<p class="line number3 index2 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">input</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">type</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'text'</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">name</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'name1'</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
<p class="line number4 index3 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">input</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">type</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'hidden'</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">name</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'name2'</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">value</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'value'</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
<p class="line number5 index4 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">input</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">type</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'submit'</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">value</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'提交'</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
<p class="line number6 index5 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"></</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">form</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
<p class="line number7 index6 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"></</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">html</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
</td>
</tr></tbody></table>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"><br></p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> The action in the form is filled in with the url path of the jump page, and the method is filled in with the post method. After the submit button in the form is pressed, all the content with name in the form will be transferred to the filled in URL, which can be obtained through $_POST['name'], for example: </p>
<p style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'微软雅黑', Verdana, sans-serif, '宋体';font-size:13px;background-color:rgb(255,255,255);"><br> </p>
<p class="syntaxhighlighter php" style="padding:0px;margin:1em 0px;font-size:1em;"><br></p>
<p class="toolbar" style="margin:0px;padding:0px;border:none;float:none;line-height:1.1em;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:10px;color:rgb(255,255,255);background-color:rgb(108,226,108);"><span style="margin:0px;padding:0px;">?</span></p>
<table border="0" style="margin:0px;padding:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tbody style="padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tr style="border-top:0px;padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;" class="firstRow">
<td class="gutter" style="border-width:0px;font-size:1em;color:rgb(175,175,175);line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">##1<p class="line number1 index0 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>2<p class="line number2 index1 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>3<p class="line number3 index2 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>4<p class="line number4 index3 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>
</td>
<td class="code" style="border-width:0px;font-size:1em;line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">
<p class="container" style="margin:0px;padding:0px;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><br></p>##<?php<p class="line number1 index0 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><p class="line number2 index1 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$a</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$_POST</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">[</code><code class="php string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'name1'</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">];</code></p><p class="line number3 index2 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$b</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$_POST</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">[</code><code class="php string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'name2'</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">];</code></p><p class="line number4 index3 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">?></td>
</tr></tbody></table>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"><br></p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> There is a very convenient trick here. When the type is selected as 'hidden' in the input tag, the input tag will be hidden and will not be displayed on the page, but the input tag will be displayed on the page. In the form, there are name values and value values, which will also be passed along with the submit button. This hidden tag can pass some content that you do not want to display. </p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> 2. GET value transmission</p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> GET value transmission is passed by following the url. When the page jumps, it jumps with the url. Commonly used in the use of <a> tags. For example:</p>
<p style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'微软雅黑', Verdana, sans-serif, '宋体';font-size:13px;background-color:rgb(255,255,255);"><br></p>
<p class="syntaxhighlighter html" style="padding:0px;margin:1em 0px;font-size:1em;"><br></p>
<p class="toolbar" style="margin:0px;padding:0px;border:none;float:none;line-height:1.1em;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:10px;color:rgb(255,255,255);background-color:rgb(108,226,108);"><span style="margin:0px;padding:0px;">?</span></p>
<table border="0" style="margin:0px;padding:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tbody style="padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tr style="border-top:0px;padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;" class="firstRow">
<td class="gutter" style="border-width:0px;font-size:1em;color:rgb(175,175,175);line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;"><p class="line number1 index0 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">1</p></td>
<td class="code" style="border-width:0px;font-size:1em;line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">
<p class="container" style="margin:0px;padding:0px;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><br></p>
<p class="line number1 index0 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">#a</code> <code class="html color1" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">href</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">=</code><code class="html string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'delete.php?id=value'</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">> ;Click me to jump</</code><code class="html keyword" style="color:rgb(0,102,153);padding:0px;font-size:1em;margin:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;line-height:1.1em;border:0px;float:none;vertical-align:baseline;font-weight:bold;">a</code><code class="html plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">></code></p>
</td>
</tr></tbody></table>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"><br></p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> After jumping into xxx.php, you can get the passed value through $_GET['id']. The GET method is often used in URLs to delete or read a php file with a certain ID. </p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> 3. SESSION value transfer</p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> SESSION is a type of global variable, which is often used to save common data such as user ID after the user logs in. Once saved to SESSION, other pages can be obtained through SESSION. To use SESSION, you need to open the session: </p>
<p style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'微软雅黑', Verdana, sans-serif, '宋体';font-size:13px;background-color:rgb(255,255,255);"><br></p>
<p class="syntaxhighlighter php" style="padding:0px;margin:1em 0px;font-size:1em;"><br></p>
<p class="toolbar" style="margin:0px;padding:0px;border:none;float:none;line-height:1.1em;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:10px;color:rgb(255,255,255);background-color:rgb(108,226,108);"><span style="margin:0px;padding:0px;">?</span></p>
<table border="0" style="margin:0px;padding:0px;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;">
<tbody style="padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><tr style="border-top:0px;padding:0px;margin:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;" class="firstRow">
<td class="gutter" style="border-width:0px;font-size:1em;color:rgb(175,175,175);line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">##1<p class="line number1 index0 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>2<p class="line number2 index1 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>3<p class="line number3 index2 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>4<p class="line number4 index3 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>5<p class="line number5 index4 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>6<p class="line number6 index5 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>7<p class="line number7 index6 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>8<p class="line number8 index7 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;"></p>
<p class="line number9 index8 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">9</p>
<p class="line number10 index9 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">10</p>
<p class="line number11 index10 alt2" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">11</p>
<p class="line number12 index11 alt1" style="margin:0px;padding:0px .5em 0px 1em;border-width:0px 3px 0px 0px;border-right-style:solid;border-right-color:rgb(108,226,108);float:none;line-height:1.1em;text-align:right;vertical-align:baseline;font-size:1em;white-space:pre;">12</p>
</td>
<td class="code" style="border-width:0px;font-size:1em;line-height:1.1em;padding:0px;margin:0px;float:none;vertical-align:baseline;font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;">
<p class="container" style="margin:0px;padding:0px;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;"><br></p>
<p class="line number1 index0 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"><?php</code></p><p class="line number2 index1 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php comments" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,130,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">//session赋值</code></p><p class="line number3 index2 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">session_start();</code></p><p class="line number4 index3 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$_SESSION</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">[</code><code class="php string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'one'</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">]=value1;</code></p><p class="line number5 index4 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$_SESSION</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">[</code><code class="php string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'two'</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">]=value2;</code></p><p class="line number6 index5 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"> </p><p class="line number7 index6 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php comments" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,130,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">//Reading the session value:</code></p><p class="line number8 index7 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$one</code> <code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">= </code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$ _SESSION</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">[</code><code class="php string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'one'</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">];</code></p><p class="line number9 index8 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code> </p><p class="line number10 index9 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="php comments" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,130,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">//Destruction of session value</code></p><p class="line number11 index10 alt2" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php spaces" style="color:rgb(64,170,83);font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;"> </code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">unset(</code><code class="php variable" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(170,119,0);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">$_SESSION</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">[</code><code class="php string" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;color:rgb(0,0,255);padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">'one'</code><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">]);</code></p><p class="line number12 index11 alt1" style="margin:0px;padding:0px 1em;border:0px;float:none;line-height:1.1em;vertical-align:baseline;font-size:1em;white-space:pre;"><code class="php plain" style="font-family:Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:1em;line-height:1.1em;padding:0px;margin:0px;border:0px;float:none;vertical-align:baseline;">?></code></p>
</td>
</tr></tbody>##<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"><br></p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> The above three methods are common methods, you can refer to them. </p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;"> Regarding the pros and cons of the three methods, the value passed by get is displayed in the URL link, which is very unsafe. If you want to link to another page, post is not convenient to use. It is very good and convenient to choose session. Methods</p>
<p style="margin-top:8px;margin-bottom:8px;font-size:12.5px;font-family:'微软雅黑', Verdana, sans-serif, '宋体';background-color:rgb(255,255,255);letter-spacing:.5px;">. <img src="https://img.php.cn/upload/article/000/153/291/9d327346da59a8eb93e1a2f9f28b3f63-0.png" alt=""></p>
<p style="margin-top: 8px; margin-bottom: 8px; font-size: 12.5px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; background-color: rgb(255, 255, 255); letter-spacing: 0.5px;"><img src="https://img.php.cn/upload/article/000/153/291/9d327346da59a8eb93e1a2f9f28b3f63-1.jpg" alt=""></p>
<p style="margin-top: 8px; margin-bottom: 8px; font-size: 12.5px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; background-color: rgb(255, 255, 255); letter-spacing: 0.5px;">Related recommendations: </p>
<p style="margin-top: 8px; margin-bottom: 8px; font-size: 12.5px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; background-color: rgb(255, 255, 255); letter-spacing: 0.5px;"><a href="http://www.php.cn/php-weizijiaocheng-388417.html" target="_self">Detailed explanation of the difference between passing by value and passing by reference in php</a></p>
<p style="margin-top: 8px; margin-bottom: 8px; font-size: 12.5px; font-family: 微软雅黑, Verdana, sans-serif, 宋体; background-color: rgb(255, 255, 255); letter-spacing: 0.5px;"><br> </p>
</table>
The above is the detailed content of Three ways to pass values across php pages. For more information, please follow other related articles on the PHP Chinese website!