I was working on XAMPP when I encountered this.
My code was intended to take some information as input from the user via a form.
Then show the output in the same page after the "SUBMIT" button has been pressed.
(I used " method="POST"> in the HTML part of the code...)
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated.
Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost Apache/2.4.33 (Win32) OpenSSL/1.1.0g PHP/7.2.4
Thanks in Advance
The problem is that you are sending the form to a page that doesn't exist. Make sure you use $_SERVER['PHP_SELF'] in the action attribute of your form.
Example:
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Related
I have a php landing page with a simple button in a form area on the page for a user to contact
I'm using this:
<form method="post" action="mailto:info#<?php echo preg_replace('/^www./','',$_SERVER["HTTP_HOST"]); ?>?subject=Landing contact&body=Hi, I found your website and would like some more information, please." >
but I find that it shows an (security warning) unsecure message if clicked on..evem though a cert is in place and active
so I tried this:
<form method="post" action="mailto:info#<?php echo "{$_SERVER['SERVER_NAME']}"; ?>?subject=Landing contact&body=Hi, I found your website and would like some more information, please." >
Is threre a way to do this using the https protocol and not get that error message?
Any help would be highly appreciated
I've got an annoying problem.
My website https://exmple.com has a contact form.
The logic is placed in the same directory as the send.php file.
In general, an email form works, however, sometimes I get "Server not found" error (1/10). What may be to resign for this weird behaviour?
The form looks like:
<form method="post" action="send.php">
...
</form>
I've already tried:
action = "send.php"
action = "/send.php"
action = "https://exmple.com/send.php"
Each try gives the same result.
This is a SSL connection, index.php file is in the same directory as send.php.
Thanks for your help!
I have installed vtigercrm on my hostgator hosting when I create a webform from setting it did not show on html and on browser it display this error message.
I need step by step guide on creation of successful webform
error message I get is here
{"success":false,"error":{"message":"Webform not found."}}
Did any one know how to solve this. Any help will be appreciated .
I had the same problem and here is the solution that I used. VTiger has an error in their code for displaying the right url for the action url.
Here is the original code...
<form name="Webform Name" action="http://yourDomainName.commodules/Webforms/capture.php" method="post" accept-charset="utf-8"…
This is how the code should be…
<form name="Webform Name" action="http://yourDomainName.com/modules/Webforms/capture.php" method="post" accept-charset="utf-8"…
Notice they didn't include the forward slash (/) after .com. Once that is put into place then the link works. Hope that helped.
I keep getting a 404 error when trying to submit this form. In my website directory i have a folder called mobile, which inside has forms.php and process.php.
The form is located on this page
http://localhost/mobile/forms.php?ft=0&id=2
here is the form
<form action='/mobile/process.php?o=9&ft=0' method='POST'>
//details
</form>
When i try to submit i get a 404 error, when it should go to http://localhost/mobile/process.php?o=9&ft=0? How do i fix this?
By looking at the URL's what I conclude is that both the php files are on the same page so change your action url from
<form action='/mobile/process.php?o=9&ft=0' method='POST'>
To
<form action='process.php?o=9&ft=0' method='POST'>
A forward slash before the mobile means it selects the folder from the root.. So you probably don't need that here.
Last but not the least, be sure the file names are proper, and also make sure the cases are same, because the file names are case sensitive.
Note: You may also get 404 error if you are using header('Location:
xyz.php'); on the form processing page, for redirecting the user to
some page after the form processes and you may encounter 404 because
the page on which the script has redirected doesn't exist. so make sure
that the URL is correct if you are using header()
Try changing
<form action='/mobile/process.php?o=9&ft=0' method='POST'>
to
<form action='process.php?o=9&ft=0' method='POST'>
Since they are in the same directory.
You can't pass a GET parameter in the form action.
In order to pass parameters, you will have to create a hidden input like :
<input type="hidden" name="o">
Hi I have a form that is submitted after a JS file has completed validation checks
in the form the main line is
<form style='background-color:ccc' id='form1' name='form1' method='post' action='dual_process.php' > ;
The code for submitting the form is (This calls a JS script)
<input class="buttn" type="button" name="su" id="su" value="Confirm and Submit Details" <? echo "onclick='$validate;' " ?> />
After the JS script have validated the form the following line is executed
if (!msg) {
var frm = document.getElementById("form1");
frm.submit() ;
This all worked fine until I moved to a new web host now when I submit the form I get the following error
Forbidden
You do not have permission to access this document.
Could anyone suggest what I am doing wrong OR if there is something that the new host does not like (Old host Simple Web Hosting New one IDAQ )
Thanks I advance for any help
Mick
Hy,
Try use double quotes to the form attributes: action="dual_process.php", and the others.
The most common reason for the 403 error is that directory browsing is forbidden for the Web site.
Check if you can directly access the "dual_process.php" page, and maybe a better response can give you the administrator of that server.