html1-php-html2 value passing problem
七月剑
七月剑 2020-04-09 14:32:43
0
2
1246

html1 obtains the data filled in by the user, sends it to PHP for calculation and outputs json, and html2 reads the json and displays the data to the user.

Now I want the user to jump directly to html2 after submission. How to achieve this.

I know that AJAX can return to the current page html1, but how to let html2 get the data.

七月剑
七月剑

reply all(1)
Yang_Sir

If simple data is written directly in the url:

echo "<script>window.location.href='html2.html?name=admin'</script>";

Or save it in session

  • reply Well, thank you, solved. Also uses URL to pass parameters. html1 uses js to pass parameters to html2, and html2 uses ajax to directly interact with php after accepting the parameters.
    七月剑 author 2020-04-10 07:49:16
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template