On a common screen, I would like to send the data I entered in the input form with the Send button, but when I debug it on the actual machine, I get an error message: file:///data/data/mobi.monaca.debugger/file/projects/cloud/.../wwww/mail.php. Is there anything I can set up?
(Code below)
<!DOCTYPE HTML>
<html lang="ja">
<metacharset="UTF-8">
<body>
<form action="mail.php" method="post">
<p><label>Name:<input type="text" name="name" size="40"></label></p>
<p>label>Comments:<br><textarea name="comments" rows="2"cols="40"></textarea></label></p>
<p><input type="submit" value="send"><input type="reset" value="reset" value &"reset">>/p>
</form>
</body>
</html>
The action attribute is specified in the relative URL, so you are trying to send it to mail.php
on the debugger.
mail.php
should work if you upload it to the location where it is located, but if you want to run it on the debugger, you must specify the action attribute in the absolute URL, such as http://hogehoge.com/mail.php
.
© 2024 OneMinuteCode. All rights reserved.