Submit the form, the jump is unsuccessful, 404. Do you want to ask where the configuration error is? Beginners using PhpStorm without configuration
400°眼镜的沙子
400°眼镜的沙子 2019-07-17 11:38:33
0
4
1136
form.html:
<html>
<head>
    <meta charset="utf-8">
    <title>php中文网(php.cn)</title>
</head>
<body>
<form action="welcome.php" method="post">
    名字: <input type="text" name="fname">
    年龄: <input type="text" name="age">
    <input type="submit" value="提交">
</form>
</body>
</html>

welcome.php

Welcome<?php echo $_POST["fname"]; ?>!<br>
Your age is<?php echo $_POST[ "age"]; ?> years old.

400°眼镜的沙子
400°眼镜的沙子

我就是我,看自己都上火

reply all(2)
V

Another issue that needs attention is that when opening form.html, you must open it by entering the URL, otherwise welcome.php will be displayed as a pure code page

  • reply http://localhost/Projects/welcome.php The requested URL /Projects/welcome.php was not found on this server. Apache/2.4.23 (Win64) PHP/7.0.10 Server at localhost Port 80 The page probably looks like this
    400°眼镜的沙子 author 2019-08-23 17:29:28
樂成

The two files must be in the same directory, such as
page/form.html
page/welcome.php

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