Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ian W

Members
  • Joined

  • Last visited

  1. Ian W replied to Ian W's topic in Frontend
    Brilliant Thanks Shaun, all sorted and working great. Thanks for all your help, its very much appreciated.
  2. Ian W replied to Ian W's topic in Frontend
    Hi Shaun, Thank you for the quick reply. I have made the changes and it now goes to a white page with "message sent". If I make a new web page with a message and poin to that page as you suggest, can I make that open in a seperate window so the user doesn't move away from the site? Thanks again, Ian.
  3. Ian W posted a topic in Frontend
    I have tried to add a mail form to my first ever web site www.outwoodsparishcouncil.co.uk . Unfortunately I don't seem to be able to get it to work correctly. I would really appreciate it if someone would be kind enough to take a look and point me to where ive gone wrong? Mailform.php code: <?php // This work is licensed under the MIT License - [url="http://www.opensource.org/licenses/mit-license.php"]http://www.opensource.org/licenses/mit-license.php[/url] // OPTIONS - PLEASE CONFIGURE THESE BEFORE USE! $yourEmail = "[email="admin@outwoodsparishcouncil.co.uk"]admin@outwoodsparishcouncil.co.uk[/email]"; // the email address you wish to receive these mails through $yourWebsite = "Outwoods Parish Council"; // the name of your website $thanksPage = ''; // URL to 'thanks for sending mail' page; leave empty to keep message on the same page $maxPoints = 4; // max points a person can hit before it refuses to submit - recommend 4 // --- DO NOT EDIT BELOW HERE ----------------------- $error_msg = null; $result = null; function isBot() { $bots = array("Indy", "Blaiz", "Java", "libwww-perl", "Python", "OutfoxBot", "User-Agent", "PycURL", "AlphaServer", "T8Abot", "Syntryx", "WinHttp", "WebBandit", "nicebot"); $isBot = false; foreach ($bots as $bot) if (strpos($_SERVER['HTTP_USER_AGENT'], $bot) !== false) $isBot = true; if (empty($_SERVER['HTTP_USER_AGENT']) || $_SERVER['HTTP_USER_AGENT'] == " ") $isBot = true; exit("Bots not allowed.</p>"); } if ($_SERVER['REQUEST_METHOD'] == "POST") { function clean($data) { $data = trim(stripslashes(strip_tags($data))); return $data; } $points = (int)0; $badwords = array("adult", "beastial", "bestial", "blowjob", "clit", "cum", "cunilingus", "cunillingus", "cunnilingus", "****", "ejaculate", "fag", "felatio", "fellatio", "****", "fuk", "fuks", "gangbang", "gangbanged", "gangbangs", "hotsex", "hardcode", "jism", "jiz", "orgasim", "orgasims", "orgasm", "orgasms", "phonesex", "phuk", "phuq", "porn", "pussies", "pussy", "spunk", "xxx", "viagra", "phentermine", "tramadol", "adipex", "advai", "alprazolam", "ambien", "ambian", "amoxicillin", "antivert", "blackjack", "backgammon", "texas", "holdem", "poker", "carisoprodol", "ciara", "ciprofloxacin", "debt", "dating", "porn", "link=", "voyeur"); $exploits = array("content-type", "bcc:", "cc:", "document.cookie", "onclick", "onload", "javascript"); foreach ($badwords as $word) if (strpos($_POST['comments'], $word) !== false) $points += 2; foreach ($exploits as $exploit) if (strpos($_POST['comments'], $exploit) !== false) $points += 2; if (strpos($_POST['comments'], "http://") !== false || strpos($_POST['comments'], "www.") !== false) $points += 2; if (isset($_POST['nojs'])) $points += 1; if (preg_match("/(<.*>)/i", $_POST['comments'])) $points += 2; if (strlen($_POST['name']) < 3) $points += 1; if (strlen($_POST['comments']) < 15 || strlen($_POST['comments'] > 1500)) $points += 2; foreach ($_POST as $key => $value) $_POST[$key] = trim($value); if (empty($_POST['name']) || empty($_POST['email']) || empty($_POST['comments'])) { $error_msg .= "Name, e-mail and comments are required fields. \n"; } elseif (strlen($_POST['name']) > 15) { $error_msg .= "The name field is limited at 15 characters. Your first name or nickname will do! \n"; } elseif (!preg_match("/^[a-zA-Z-'\s]*$/", stripslashes($_POST['name']))) { $error_msg .= "The name field must not contain special characters. \n"; } elseif (!preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+' . '(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($_POST['email']))) { $error_msg .= "That is not a valid e-mail address. \n"; } elseif (!empty($_POST['url']) && !preg_match('/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(\d+))?\/?/i', $_POST['url'])) $error_msg .= "Invalid website url."; if ($error_msg == NULL && $points <= $maxPoints) { $subject = "Automatic Form Email"; $message = "You received this e-mail message through your website: \n\n"; foreach ($_POST as $key => $val) { $message .= ucwords($key) . ": " . clean($val) . "\r\n"; } $message .= 'IP: '.$_SERVER['REMOTE_ADDR']."\r\n"; $message .= 'Browser: '.$_SERVER['HTTP_USER_AGENT']."\r\n"; $message .= 'Points: '.$points; if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) { $headers = "From: $yourEmail \r\n"; $headers .= "Reply-To: {$_POST['email']}"; } else { $headers = "From: $yourWebsite <$yourEmail> \r\n"; $headers .= "Reply-To: {$_POST['email']}"; } if (mail($yourEmail,$subject,$message,$headers)) { if (!empty($thanksPage)) { header("Location: $thanksPage"); exit; } else { $result = 'Your mail was successfully sent.'; } } else { $error_msg = 'Your mail could not be sent this time.'; } } else { if (empty($error_msg)) $error_msg = 'Your mail looks too much like spam, and could not be sent this time. ['.$points.']'; } } function get_data($var) { if (isset($_POST[$var])) echo htmlspecialchars($_POST[$var]); } ?> HTML Code: <div id="contact-form"> <form name="feedback" method="post" action="php/mailform.php"> <ol> <li><label for="name">Name</label> <input type="text" name="name" id="name"></li> <li><label for="telephone">Telephone</label> <input type="text" name="telephone" id="telephone"></li> <li><label for="email">Email</label> <input type="text" name="email" id="email"></li> <li><label for="comments">Comments</label> <textarea name="comments" id="comments" cols="45" rows="5"></textarea></li> <li><input name="submit" type="submit" class="submit" id="submit" value="Submit"></li> </ol> </form> </div>
  4. Hi All, I am a complete beginner and trying to adapt a template I purchased to try and teach myself a little code etc. This problem has got me completely stumped, so please help me if you can before I go mad I am having a problem getting pictures to show up in IE9. They appear fine in Chrome, Firefox etc but not in IE? Can anyone see where I have gone wrong please? I have attached the CSS Code in a txt file to save space and my HTML Code is: <!DOCTYPE HTML> <html> <!-- #BeginTemplate "main.dwt" --> <head> <!-- #BeginEditable "doctitle" --> <title>Web Site By Timothy Web Design - [url="http://www.timothywebdesign.com</title"]www.timothywebdesign.com</title[/url]> <!-- #EndEditable --> <link href="css/styles.css" rel="stylesheet" type="text/css" media="screen"> <style type="text/css"> </style> </head> <body style="background-color:#FFFFFF; "> <div id="wrapper"> <div id="top"> <img alt="Outwoods Logo Jpeg" src="images/JPEG-Outwoods-Logo.jpg"> </div> <div id="topnav"> <ul> <li><a href="index.html">WELCOME</a></li> <li><a href="about.html">ABOUT</a></li> <li><a href="products.html">PRODUCTS</a></li> <li><a href="services.html">SERVICES</a></li> <li><a href="team.html">TEAM</a></li> <li><a href="contact.html">CONTACT</a></li> </ul> </div> <div id="banner"> </div> <div id="subbanner"> <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc feugiat magna et mi semper rutrum. Sed elementum semper tincidunt. Curabitur consequat, sapien non consectetur elementum.</h3> </div> <div id="content"> <!-- #BeginEditable "Content" --> <h1>Welcome To Fullerton Corporation</h1> <p>Lorem pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.</p> <p>Lorem pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. </p> <img src="images/1.jpg" /> <img src="images/3.jpg" /> <img src="images/2.jpg" /> <h2>Second Level Heading on Page</h2> <p>Lorem pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.</p> <!-- #EndEditable --> </div> <div id="rightside"> <!-- #BeginEditable "rightside" --> <h2>Sidebar Heading</h2> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.</p> <img src="images/calendar-icon.jpg" /> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.</p> <h2>Sidebar Heading</h2> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.</p> <!-- #EndEditable --> </div> <div id="footer"> <p>©Copyright 2011 Sample Company Name. Pellentesque habitant morbi tristique senectus.</p> </div> </div> </body> <!-- #EndTemplate --> </html> <!-- Timothy Framework - [url="http://www.timothyframework.com"]www.timothyframework.com[/url] --> <!-- This work is licensed under the MIT License - [url="http://www.opensource.org/licenses/mit-license.php"]http://www.opensource.org/licenses/mit-license.php[/url] --> CSS Code.txt

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.