php - changing browser behavior
扔个三星炸死你
扔个三星炸死你 2017-07-05 09:56:07
0
4
940

The client is a simple form, the file name is send.php

<form action="http://vps_ip/phplearn/do.php" method="post">
用户名:  <input type="text" name="userName" size="12"/>
密码:    <input type="text" name="PS" size="12"/>
<input type="submit" value="登录">
</form>

Server-side program, file name do.php

<?php
$userName = $_POST["userName"];
$PS = $_POST["PS"];
echo "the name is:  ".$userName;
echo "<br>key word is:  ".$PS;
?>

Now open two web pages respectively
Client


Service-Terminal

After clicking on the client's login, the client's page will change to

Now, I want to do this: after the client clicks to log in, the client's web page remains unchanged, but the server's web page changes. Can this be done?

扔个三星炸死你
扔个三星炸死你

reply all(4)
过去多啦不再A梦

Try using websocket, long connection

学霸

Although I don’t know what you want to do, I still recommend something to you

webscocket
習慣沉默

The client web page remains unchanged, submit the form data to the server using AJAX, and then the server returns the processing results.

为情所困

This is similar to instant messaging. The client sends the account password and the other end (server) obtains the sent information. (I don’t know if this is what you want)
If this is the case, it is best to use a long connection. You can try the webscocket or workman mentioned by the two above

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template