Jump to content

Zyggy

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Zyggy

  1. 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}?>
  2. Hey there,

     

    I know this is somewhat of a rookie problem, but I'm a little rusty on the subject of float, since my more recent projects haven't dealt with it much. I have created a two-column layout (main content and a navigation sidebar) with floating divs. However, at a certain zoom level the sidebar is kicked down below the main content div. I'm trying to figure out how to keep the two columns side-by-side on the page, no matter what the zoom level is. I used to know how to do this, but as I said, I'm a little rusty in this department.

     

    Any help would be greatly appreciated. The url is: http://www.zyggywebs.com

    body { background-color: white; background-image: url(banner-new2.jpg); background-position: center top; background-attachment: fixed; background-size: 160%; color: black; padding: 20px;}a { color: yellow;}a:hover { color: steelblue;}#header { background-color: black; background-position: left bottom; color: white; padding: 10px; height: 130px; border-radius: 1em;}#main { float: left; width: 960px; background-color: black; opacity: 0.800; color: white; padding-left: 20px; padding-top: 20px; padding-bottom: 20px; padding-right: 20px; min-height: 700px;}#sidebar { float: left; background-color: black; color: white; height: 500px; width: 200px; margin-right: 10px; margin-left: 10px; text-align: center; border-radius: 1em; opacity: 0.800;}#sidebar img { max-width: 150px; border: none;}#footer { clear: both; background-color: black; color: white; padding: 10px; margin-top: 20%; border-radius: 1em;}#galleries img { width: 20%;}.section { padding-bottom: 25px;}
  3. I'm not seeing a screenshot; could you maybe post a link to your webpage? Sometimes it's easier to get an idea for things if a person can see them and work with them.

     

    Is Expression web a program of some sort? A lot of that PHP looks questionable. I'm not positive, but I don't think any code is supposed to come before your !DOCTYPE declaration.

  4. Hello, L.Adlon.

     

    1. To the best of my knowledge, HTML5 is declared by setting up your base webpage like this:

    <!DOCTYPE html><html><head><meta charset="UTF-8"><title>Title of the document</title></head><body></body></html>

    <!DOCTYPE html> is what declares HTML5 in a document.

     

     

    2. So far as I know, there aren't any real disadvantages to it. It's more efficient, and I've found that some of it is actually easier to work with. Also, it hasn't thrown all of the elements of HTML4 out the window. There are certain features not supported by all older browsers; some features just require an extra bit of code to support it in a certain browser. When you're building a site, it's important to keep compatibility in mind. It's a very possible to make a website that conforms to HTML5 standards, but is also viewable on older browsers.

    Personally, I like keeping everything up to date, because it makes it easier to validate a website.

     

    I don't know much about mp3-related things, so I'll leave these questions for someone else.

     

    Take care,

    -Zyggy

×
×
  • Create New...