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
Related
I have a html page in which I have complex form. For sending the data to my email I use mailer from the site at which I created my form. After completing and sending the data I see an error:
"Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
But after sending the data I'd like to go to another page. I know how to move to another page when I create my own php file (header("Location: page.html")). Do you know how to implement it, when I don't have an access to php file?
Part of the code looks like this:
<FORM name="mlwebform" onSubmit="return checkForm(this)" method="POST" action="http://www.mouselabweb.org/mlwebmailer.php"><INPUT type=hidden name="procdata" value="">
I tried to add a hyperlink in submit button, but it doesn't work.
<input style="height:50px; width: 100px; font-size:12pt;" type="submit" value="Dalej" onClick=timefunction('submit','submit','submit')>
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']; ?>">
Couldn't find the answer I was looking for on any questions regarding php contact forms so have to ask a new question.
I have a contact form that works fine. When submitted the user is taken to success.php by using header("Location: success.php");
The problem lies when errors exist in the contact form. What I have done is use
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
This keeps the user on the same page and displays errors. The problem though is that being a single page website it redirects users to the top of the page and not back down to the contact form where the errors are displayed. How would I use php to scroll down to the contact form so the user knows that their email wasn't sent?
You can use an anchor in your html-code
<a name="jump_here"></a>
after this modify you code:
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]).'#jump_here'; ?>"
You can use a bookmark.
<h2 id="contactform">Contact Form</h2>
Contact Form
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 implemented the contact form into a CMS page here.
As you can see, the forms shows up fine. However, when I fill the form out to test and click "send", there is no message indicating if the mail was sent correctly or failed. But a new page loads, so I think it is doing something. When I check my email, no email comes. I’ve checked spam folder too.
Current Setup:
In the CMS page, I have this code:
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
In the form.phtml file, I have modified the form tag action attribute to:
<form action="/contacts/index/post/" id="contactForm" method="post">
Stuff I’ve tried already:
And I don’t think its the server because I tried the "forgot password” when logging into the Admin, and I received an email to reset the password.
In System Config, I’ve verified that "Enable Contact Us” is Yes. "Disable EMail Communications” is No. And makes no difference if "Set Return Path” is Yes or No.
It is set to send to an email address that is not hosted by the same server as the Magento site is on. The email address is a Google Apps email.
Ok, I figured it out. For some reason, the path in the action attribute of needed another parent folder. So in my case, it should be
<form action="/2/contacts/index/post/" id="contactForm" method="post">
just go to app/design/frontend/your_theme/default/template/contacts/form.phtml
and set form action to <?php echo $this->getFormAction(); ?>
<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">