Jump to content

Search the Community

Showing results for tags 'Contact Form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 13 results

  1. Good day, I have a contact form that i pasted on this box, i have also attached the php and java script files that work with it. When i send a message via the contact form it does not send at all. it used to send successfully but it stopped. not sure where to look now. please advise what could be the problem. <div class="contact-details"> <!-- Contact Form --> <div class="contact-form wow bounceInRight"> <!--NOTE: Update your email Id in "contact_me.php" file in order to receive emails from your contact form--> <form name="sentMessage" id="contactForm" novalidate> <div class="col-md-6"> <input type="text" class="form-control" placeholder="Full Name" id="name" required data-validation-required-message="Please enter your name" /> <p class="help-block"></p> </div> <div class="col-md-6"> <input type="email" class="form-control" placeholder="email" id="email" required data-validation-required-message="Please enter your email" /> </div> <div class="col-md-12"> <textarea rows="10" cols="100" class="form-control" placeholder="Message (eg: message )" id="message" required data-validation-required-message="Please enter your message" minlength="5" data-validation-minlength-message="Min 5 characters" maxlength="999" style="resize:none"></textarea> </div> <div class="col-md-4 col-md-offset-5"><br><div id="success"> </div><button type="submit" class="btn btn-primary">Submit Message</button></div> </form> </div> </div> </div> </div> contact_me.js jqBootstrapValidation.js contact_me.php
  2. I'm working on a Contact Form for my website. It works, except the "Phone" field doesn't show a phone number in the sent message. It's just blank where the number should be displayed. What am I doing wrong? - Thanks HTML: <div class="contact-form"> <h2 class="style">Contact Us</h2> <form action="contact.php" method="post" id="form"> <div> <span><label>NAME</label></span> <span><input name="cf_name" type="text" class="textbox"></span> </div> <div> <span><label>EMAIL</label></span> <span><input name="cf_email" type="text" class="textbox"></span> </div> <div> <span><label>PHONE</label></span> <span><input name="cf_phone" type="text" class="textbox"></span> </div> <div> <span><label>MESSAGE</label></span> <span><textarea name="cf_message"> </textarea></span> </div> <div> <span><input type="submit" value="Send"></span> </div> </form> </div> PHP: <?php $field_name = $_POST['cf_name']; $field_email = $_POST['cf_email']; $field_phone = $_POST['cf_phone']; $field_message = $_POST['cf_message']; $mail_to = 'somebody@invalid.com'; $subject = 'Message from a website visitor '.$field_name; $body_message = 'From: '.$field_name."\n"; $body_message .= 'E-mail: '.$field_email."\n"; $body_message .= 'Phone: '.$field_phone."\n"; $body_message .= 'Message: '.$field_message; $headers = 'From: '.$field_email."\r\n"; $headers .= 'Reply-To: '.$field_email."\r\n"; $mail_status = mail($mail_to, $subject, $body_message, $headers); if ($mail_status) { ?> <script language="javascript" type="text/javascript"> alert('Thank you for the message. We will contact you shortly.'); window.location = 'index.html'; </script> <?php
  3. Hi. Not sure if this is the right area for this but wasn't sure where it would fit exactly. I have a website hosted by A2Hosting which is currently using Wordpress and utilizing ContactForm7. The contact form used to use an outlook email and when a user filled it out, I would get it. The problem is occurring now since I've signed up for a GSuite email to use for my domain. After adding that email to ContactForm7, it fails to send me the email each time and tells me it's failed to send. I've tried using Easy WP SMTP without luck and also WP Mail SMTP. I haven't found a solution to this problem yet. Does anyone have any ideas? Thank you.
  4. Hello. Well I'm quite new to PHP (maybe you'll see it in my Q), but I do know some bits and pieces. Well I've come to 2 or 3 probs on my way to creating my contact form. I have a form on my website and it's working great, but my mails are sent to my gmail acc and I would love to know if there's a way to specify the sender in my $from line? Cause now my first lines of PHP looks like this: <?php // email address that will be showned as a sender $from = 'New mail from the website <newmail@mywebsitename.eu>'; // email address where the mail should be send to $sendTo = 'mywebsitesname.eu <mypersonalmail@gmail.com>'; // subject of the email $subject = 'New message from my mywebsitename.eu site'; And the thing that I would like to do is to change $from line to something like: $from = $_POST['email']; So that when I would get the mail to my gmail acc it would be showned as it is from the sender and I would be able to reply to him from one click and not to copy paste his email from my form to new message and then prob copy paste the content of his msg to my reply msg etc... Now I know this is a bit ''so-so'' cause I would be faking or spoofing the senders mail, but I'm sure there's a solution. Or at least if that's not possible, to create some sort of code that would prepare my reply_to mail with one click. Hope I didn't wrote to much of stuff with to many words, but I'm a bit of a chatty fella :D.
  5. Hello. A couple of weeks ago I concluded a couple of front end development courses and we only touched upon php coding. Since we didn't do much of it I used w3schools.com to learn some basics. I used the tutorial to make a contact form but I have a little problem. Currently the form is set (or rather was until I removed some code) to show anything that was entered in to the form on the site (basically like in this tutorial: https://www.w3schools.com/php/php_forms.asp). What I want the form to do is send the entered information to a predefined email address. But that's not all. It's going to be used on a singlepage website layout. I want the form to also show a prompt box that warns the user that either something went wrong or that the message was sent and reload the page back to the same position (I realise I need to use index#pageposition to do this but I don't know how to implement the link). Currently this only warns the user of what he did wrong (but not in a prompt box that something wrong happened) and reloads the page to the top. I'm a PHP noob (big noob), and I would appreciate if someone can help me out with this. Thank you :). <?php // define variables and set to empty values $nameErr = $emailErr = $genderErr = $websiteErr = ""; $name = $email = $gender = $comment = $website = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["name"])) { $nameErr = "Vpiši ime!"; } else { $name = test_input($_POST["name"]); if (!preg_match("/^[a-zA-Z ]*$/",$name)) { $nameErr = "Dovoljene so samo črke in presledki!"; } } if (empty($_POST["email"])) { $emailErr = "Vpiši email naslov!"; } else { $email = test_input($_POST["email"]); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Vpišite veljaven email naslov!"; } } if (empty($_POST["subject"])) { $subjectErr = "Vpiši naslov sporočila!"; } else { $subject = test_input($_POST["subject"]); } if (empty($_POST["message"])) { $messageErr = "Vpiši sporočilo!"; } else { $message = test_input($_POST["message"]); } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> <!DOCTYPE html> <html> <link rel="stylesheet" href="style.css" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet"> <meta name="kontakt"> <head> </head> <body> <div class="col-md-12"> <div class="form-area"> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> <br style="clear:both"> <h3>Piši nam</h3> <div class="form-group"> <input type="text" class="form-control" name="name" placeholder="Ime"> <span class="error">* <?php echo $nameErr;?></span> </div> <div class="form-group"> <input type="text" class="form-control" name="email" placeholder="Email"> <span class="error">* <?php echo $emailErr;?></span> </div> <div class="form-group"> <input type="text" class="form-control" name="subject" placeholder="Naslov"> <span class="error">* <?php echo $subjectErr;?></span> </div> <div class="form-group"> <textarea class="form-control" type="textarea" placeholder="Sporočilo" name=message rows="8"></textarea> <span class="error">* <?php echo $messageErr;?></span> </div> <input type="submit" class="btn btn-primary" name="submit" value="Submit"> <!--<button type="button" name="submit" class="btn btn-primary pull-right" value="Submit">Pošlji</button>--> </form> </div> </div> </body>
  6. I created a contact form inside a wordpress container using the column selection. When I apply the code only inside the container it changes the color of the entire page to that background color of the form. Also, the form has side by side fields but for some reason onilne the fields are stacked. See photos. As you can see in the first picture I removed the background color. Thank you.
  7. I am making a contact form in a new template liquid for a shopify website. Everything works and looks great in desktop mode but I've noticed as you drag the screen to a skinnier size some inline-block elements jump down perfectly as they are supposed to, the problem is other smaller text boxes are jumping up over other text fields to try and fill that gap. Also I've had issues with the legend and labels abandoning the text box they belong to jump up the form and fill space. Obviously I do not want this, how can I fix it?
  8. sb4short

    Need help

    How do I get the following contact form to work: <form action="contact_form.php" method="post"> <div class="tm-contact-form"> <div class="form-group"> <input type="text" id="contact_name" class="form-control" placeholder="Name..." /> </div> <div class="form-group"> <input type="email" id="contact_email" class="form-control" placeholder="Email..." /> </div> <div class="form-group"> <input type="text" id="contact_subject" class="form-control" placeholder="Subject..." /> </div> <div class="form-group"> <textarea id="contact_message" class="form-control" rows="8" placeholder="Message..."></textarea> </div> </div> <button type="submit" class="btn text-uppercase templatemo-btn templatemo-send-btn">Send</button> </form>
  9. Im having a problem with respect to sending out emails using XAMPP as my local server. After some resarches and videos... I found out that the mail function doesn't work automatically with local web Servers such as (xampp, wampp. ampps .... and all other kind of "amppss out there!"). I know that in order to the function work properly i have to reformat some php.ini and sandmail.ini files in the root of my server. My question is : Is there any other way of doing this ? i mean using the mail() function with my local server ON ? Do i really have to buy a server in order to use this ? oh! there's also this guy on youtube that discovered a tool called "Test mail server tool". here's the link if you're interested: http://www.toolheap.com/test-mail-server-tool/ What basically this tool allows us to do is: it will catch any email that are sent from the mail function and display them in a textEditor. And that would be fine for me since i just want to test. But that tool doesn't work for windows 8.1 -.- So im getting a little bit frustaded over this Any advice on what i should do ? Thank you Maybe the problem is in my code ? <?php $to = 'example1@example.com';$subject = 'this is the subject';$header =' from: $email';$name = $_POST['name'];$email = $_POST['email'];$message = $_POST['message']; $body = <<<EMAIL Person name: $name Person Email: $email $message From: $name EMAIL;if($_POST){ if($name ==''|| $email=='' || $message==''){ $feedback='feed back message'; }else{ mail($to, $subject, $body, $header); $feedback = ' feedback message'; } } ?>
  10. I am having problems with a contact form. The form uses both HTML and PHP. The form itself, which is visible to the public, is in HTML, however it used PHP as part of the internal code. I have attached both the PHP and the HTML code in a txt document, now these are two different pages. I hope someone can help. Contact Form coding.txt
  11. Hi folks! I have been using relatively clean and simple PHP contact forms for quite some time now. They fit my needs and are easy to work with. However, after submitting the message, it takes me to a gray screen with the nothing but text I programmed it to echo. It isn't an error or bug, but it's an ugly redirect and does not look professional. I would like to learn how to work with this in one of two ways: either submit the message without leaving the contact page, or add a redirect of some sort. This is the contact.php file I use. If anyone has input on how to do this, it'd be greatly appreciated!! <?phpfunction spamcheck($field) { //filter_var() sanitizes the e-mail //address using FILTER_SANITIZE_EMAIL $field=filter_var($field, FILTER_SANITIZE_EMAIL); //filter_var() validates the e-mail //address using FILTER_VALIDATE_EMAIL if(filter_var($field, FILTER_VALIDATE_EMAIL)) { return TRUE; } else { return FALSE; } }if (isset($_REQUEST['email'])) {//if "email" is filled out, proceed //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['email']); if ($mailcheck==FALSE) { echo "Invalid input. Please enter a valid email address."; } else {//send email $name = $_POST['name'] ; $email = $_POST['email'] ; $message = $_POST['message'] ; $totalmessage = " Name: $name n Details: $message n"; mail("email@email.com", "Email: $email", $totalmessage, "From: $email" ); echo "Thank you for contacting me. I'll get back with you ASAP."; } }else { //if "email" is not filled out, display the form?> <form method="post" action="contact.php"> <div class="row half"> <div class="6u"><input type="text" name="name" placeholder="Name" /></div> <div class="6u"><input type="email" name="email" placeholder="Email" /></div> </div> <div class="row half"> <div class="12u"><textarea name="message" placeholder="Message" rows="6"></textarea></div> </div> <div class="row"> <div class="12u"> <ul class="actions"> <li><input type="submit" value="Send Message" name="submit" /></li> </ul> </div> </div> </form><?php}?>
  12. Hello Is there any way to make my form set its width automatically based on the width of my fields? The problem I have is this, when I set the width of my form (e.g. 350px) and reduce the screen resolution to the minimum (Ctrl + mouse wheel) then the fields inside the form get totally messed up, i.e. the form frame becomes even smaller than the actual text areas. I wonder if there's any way I can achieve this so that regardless of the screen resolution they still preserve the same layout? thanks a lot. ps sorry about the formatting of my html code, aren't the tags supposed to indent it?. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /><title>Contact Form</title><link href="css/styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">form{border:#333333 1px dotted;padding:10px;background:#EAEAEA;border-radius:7px;margin:15px;}form td{padding:1px;}th{background:#B1D8FF;padding:5px;}textarea{resize:none;}h1{font-family:"Times New Roman", Times, serif;text-align:left;font-size:20px;}label{color:#292929;}#below-title-text{font-style:italic;font-size:16px;text-align:left;padding:10px 0;}#submit-button{width:130px;height:40px;background:#B1D8FF;border-radius:5px;}</style> </head> <body><p>Any questions, doubts or suggestions?</p><form action="donate.php" method="post" name="donation form"><table><th colspan="2"><h1 >Contact Us!</h1></th><tr><td width="74"><label for ="name">Name</label></td><td width="180"><input type="text" name="name" maxlength="50" size="30"/></td></tr><tr><td><label for ="password">Email</label></td><td><input type="text" name="email" maxlength="50" size="30"/></td></tr><tr><td><label for="donation">Subject</label></td><td><input type="text" name="subject" maxlength="50" size="30"/></td></tr><tr><td colspan="2"><label for="comments">Comments</label></td></tr><tr><td colspan="2"><textarea id="ta1" name="comments" rows=10 cols=40 onKeyDown="textCounter('ta1','ta1count',300);" onKeyUp="textCounter('ta1','ta1count',300);"></textarea></td></tr><tr><td></td><td ><input name="submit" type="submit" id="submit-button" value="Submit" /></td></tr></table></form></body></html>
  13. Hello, Does somebody know a simple security question script for my contact form.like what is 2+2 or what number comes after 7. Thanks.
×
×
  • Create New...