If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Aug 2014
    Member #

    <br> not working?

    Hello everyone. I'm trying to add space to this certain area but it's not working. You can see that here: You can see where it says "The ones that are bolder are required" is way too close to the images. I'm trying to figure out whether I left any unclosed tags or if there are too few images because the amount is only going to increase in the future.

    This is the code that I'm using
    HTML Code:
    <?php include('header.php'); ?>
    			<td valign="top" id="content">
    			<div id="content1">
    			<img src="hosting/packages/package1.jpg" align="left" style="margin-left: 15px;"></img>
    			<img src="hosting/packages/package2.jpg" align="right" style="margin-right: 15px;"></img>
    			<img src="hosting/packages/package3.jpg" align="left" style="margin-left: 15px; margin-top:20px;"></img>
    			<img src="hosting/packages/package4.jpg" align="right" style="margin-right: 15px; margin-top:20px;"></img>
    $yourEmail = ""; // the email address you wish to receive these mails through
    $yourWebsite = "Mischievous-Designs"; // 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
    $requiredFields = "name,email,comments"; // names of the fields you'd like to be required as a minimum, separate each field with a comma
    $error_msg = array();
    $result = null;
    $requiredFields = explode(",", $requiredFields);
    function clean($data) {
    	$data = trim(stripslashes(strip_tags($data)));
    	return $data;
    function isBot() {
    	$bots = array("Indy", "Blaiz", "Java", "libwww-perl", "Python", "OutfoxBot", "User-Agent", "PycURL", "AlphaServer", "T8Abot", "Syntryx", "WinHttp", "WebBandit", "nicebot", "Teoma", "alexa", "froogle", "inktomi", "looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory", "Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot", "crawler", "", "Googlebot", "Scooter", "Slurp", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz");
    	foreach ($bots as $bot)
    		if (stripos($_SERVER['HTTP_USER_AGENT'], $bot) !== false)
    			return true;
    	if (empty($_SERVER['HTTP_USER_AGENT']) || $_SERVER['HTTP_USER_AGENT'] == " ")
    		return true;
    	return false;
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
    	if (isBot() !== false)
    		$error_msg[] = "No bots please! UA reported as: ".$_SERVER['HTTP_USER_AGENT'];
    	// lets check a few things - not enough to trigger an error on their own, but worth assigning a spam score.. 
    	// score quickly adds up therefore allowing genuine users with 'accidental' score through but cutting out real spam :)
    	$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", "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", "content-type", "bcc:", "cc:", "document.cookie", "onclick", "onload", "javascript");
    	foreach ($badwords as $word)
    		if (
    			strpos(strtolower($_POST['comments']), $word) !== false || 
    			strpos(strtolower($_POST['name']), $word) !== 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;
    	if (preg_match("/[bcdfghjklmnpqrstvwxyz]{7,}/i", $_POST['comments']))
    		$points += 1;
    	// end score assignments
    	if (!empty($_POST['name']) && !preg_match("/^[a-zA-Z-'\s]*$/", stripslashes($_POST['name'])))
    		$error_msg[] = "The name field must not contain special characters.\r\n";
    	if (!empty($_POST['email']) && !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.\r\n";
    	if (!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.\r\n";
    	if ($error_msg == NULL && $points <= $maxPoints) {
    		$subject = "Hosting Application";
    		$message = "You received this e-mail message through your website: \n\n";
    		foreach ($_POST as $key => $val) {
    			if (is_array($val)) {
    				foreach ($val as $subval) {
    					$message .= ucwords($key) . ": " . clean($subval) . "\r\n";
    			} else {
    				$message .= ucwords($key) . ": " . clean($val) . "\r\n";
    		$message .= "\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";
    		} else {
    			$headers   = "From: $yourWebsite <$yourEmail>\r\n";	
    		$headers  .= "Reply-To: {$_POST['email']}\r\n";
    		if (mail($yourEmail,$subject,$message,$headers)) {
    			if (!empty($thanksPage)) {
    				header("Location: $thanksPage");
    			} else {
    				$result = 'Your mail was successfully sent.';
    				$disable = true;
    		} else {
    			$error_msg[] = 'Your mail could not be sent this time. ['.$points.']';
    	} 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]);
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
    <html xmlns="" xml:lang="en" lang="en">
    	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    	<title>My Email Form</title>
    	<style type="text/css">
    		p.error, p.success {
    			padding: 10px;
    			border: 1px solid;
    		p.error {
    			background: #ffc0c0;
    			color: #900;
    		p.success {
    			background: #82166f;
    			color: #ffffff;
    	Free PHP Mail Form v2.4.4 - Secure single-page PHP mail form for your website
    	Copyright (c) Jem Turner 2007-2014
    	This program is free software: you can redistribute it and/or modify
    	it under the terms of the GNU General Public License as published by
    	the Free Software Foundation, either version 3 of the License, or
    	(at your option) any later version.
    	This program is distributed in the hope that it will be useful,
    	but WITHOUT ANY WARRANTY; without even the implied warranty of
    	GNU General Public License for more details.
    	To read the GNU General Public License, see
    if (!empty($error_msg)) {
    	echo '<p class="error">ERROR: '. implode("<br />", $error_msg) . "</p>";
    if ($result != NULL) {
    	echo '<p class="success">'. $result . "</p>";
    <table border="0" cellspacing="0" cellpadding="5" align="center">
    <center><b>The ones are that are bolded are required</b></center>
    <form action="<?php echo basename(__FILE__); ?>" method="post">
    		<p><input type="hidden" name="nojs" id="nojs" /></p>
    	<tr><td><b>Name:</b> </td>
    		<td><input type="text" name="name" id="name" size="30" value="<?php get_data("name"); ?>"><br /></td></tr>
    	<tr><td><b>E-mail:</b> </td>
    		<td><input type="text" name="email" id="email" size="30" value="<?php get_data("email");?>"><br /></td></tr>
    	<tr><td>Website URL: <br></td>
    		<td><input type="text" name="url" id="url" size="30" value="<?php get_data("url"); ?> include http://"><br /></td></tr>
    	<tr><td><b>Hosting Package:</b></td>
    		<td><select name="Avatar Size:" class="form" rows="10">
    		<option selected="selected">Please Choose:</option>
       		<option value="Beginner Package">Beginner Package</option>
       		<option value="Intermediate Package">Intermediate Package</option>
      		<option value="Advanced Package">Advanced Package</option>
    		<option value="Expert Package">Expert Package</option>
    		<tr><td><b>Desired FTP Username:</b> <br></td>
    		<td><input type="text" name="FTP Username" id="url" size="30" value="only if you want"><br /></td></tr>
    				<tr><td><b>Desired FTP Password:</b><br></td>
    		<td><input type="text" name="FTP Username" id="url" size="30" value="min of 7 characters"><br /></td></tr>
    						<tr><td><b>Desired Email:</b> <br></td>
    		<td><input type="text" name="FTP Username" id="url" size="30"><br /></td></tr>
    						<tr><td><b>Desired Email Password:</b> <br></td>
    		<td><input type="text" name="FTP Username" id="url" size="30" value="min of 7 characters"><br /></td></tr>
    	<tr><td>Comments/Further Instructions:<br> </td>
    		<td><textarea name="comments" id="comments" rows="5" cols="30" value="<?php get_data("comments"); ?>"></textarea><br /></td></tr></table>
    <p style="margin-left: 310px;">
    	<input type="submit" name="submit" id="submit" value="Send" <?php if (isset($disable) && $disable === true) echo ' disabled="disabled"'; ?> />
    	<input type="reset" value="Clear" name="clear" />
    		<?php include('footer.php'); ?>
    Anyways, thanks for your help.
    Last edited by mischievousx3; Sep 24th, 2014 at 05:37 PM.


  3. #2
    Join Date
    Sep 2014
    Member #
    1 times
    hi, the <br> tag is used in


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search tags for this page

php-mail-form phentermine a

Click on a term to search for related topics.
All times are GMT -6. The time now is 09:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: