开发者

Form Action with Relative Path Not Working

开发者 https://www.devze.com 2023-04-09 17:00 出处:网络
I am using PHP and MySql and running inside of VS.PHP. I have written the following: <form action=\"../register.php\" method=\"post\">

I am using PHP and MySql and running inside of VS.PHP. I have written the following:

<form action="../register.php" method="post">
<input type="button" value="Submit" id="submit" />
</form>

But when I click,开发者_Python百科 nothing actually happens. Am I not allowed to use relative paths for actions?


You need to change

<input type="button" value="Submit" id="submit" />

to

<input type="submit" value="Submit" id="submit" />

The button input type is mostly used with javascript, but will not submit your form automatically.

EDIT:

Here is a reference on the input button tag

0

精彩评论

暂无评论...
验证码 换一张
取 消