<M/> 170

A story in "Time Magazine" once reported that while Donald Trump was in college he enjoyed reading federal foreclosure listings just for fun.

<M/> 170

Romanesco is one good looking veggie.

I had a pizza from a restraunt known as Pieology.

<M/> 170

If a woman ruled the whole world, there'd be no negotiating.
Everyone is home for dinner and in bed before midnight or there's hell to pay.

Sounds like my home...

<M/> 170

How about we have women run the world... we wouldn't have wars, just intense negotiations every 28 days. I rather see that than countries killing each other.

<M/> 170

We can't really help you if we can't see your work. A screenshot of an output doesn't really help if there are many ways to come out with the same output.

<M/> 170

@Pixel, well... i had them repeated 3 times... because... ummm... I have no idea why I did that to begin with. But anyways, I got it to work, but what was weird is that I started getting the emails literally a few hours late.

<M/> 170

So, I made some progress on the php. The security part works and so does the part where i get a copy of the inputs into my csv. The only part that still doesn't work is the email part of it... Here is what it is now:

<?php 
$contactname  = $_POST["contact-name"];
$contactemail = $_POST["contact-email"];
$contactphone = $_POST["contact-phone"];
$child_info   = $_POST["child_info"];
$to           = 'yahoo@gmail.com';
$subject      = 'Contact Form Submission!';

//******************************************************************************************************************************//

if(isset($_POST['contact-email'])) {
    $to      = "yahoo@gmail.com";
    $subject = "Contact Form Submission";

    function died($error)
    {
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
        echo "These errors appear below.<br /><br />";
        echo $error . "<br /><br />";
        echo "Please go back and fix these errors.<br /><br />";
        die();
    }

    if(!isset($_POST['contact-name']) || !isset($_POST['contact-email']) || !isset($_POST['contact-phone']) || !isset($_POST['child_info'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');
    }

    $contactname   = $_POST['contact-name']; //required
    $contactemail  = $_POST['contact-email']; //required
    $contactphone  = $_POST['contact-phone']; //required
    $child_info    = $_POST['child_info']; //required
    $error_message = "";

    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';

    if(!preg_match($email_exp, $contactemail)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
    }

    $string_exp = "/^[A-Za-z .'-]+$/";
    $numb_exp   = '/^[0-9.-]/';

    if(!preg_match($string_exp, $contactname)) {
        $error_message .= 'The First Name you entered does not appear to be valid.<br />';
    }

    if(!preg_match($numb_exp, $contactphone)) {
        $error_message .= 'The Phone Number you entered does not appear to be valid.<br />';
    }

    if(strlen($child_info) < 2) {
        $error_message .= 'The Comments you entered do not appear to be valid.<br />';
    }

    if(strlen($error_message) > ...
<M/> 170

Where do i put that superglobal?

<M/> 170

Incase anyone was going to try this... don't try merging the two codes, it doesn't work...

<M/> 170

I would do that, but I... well... have no clue how to use them (don't ask :P):/ That is why I prefer to do it like the way I do, that way, I never have to ask a basic question like I have already. All I would need is a solution but I haven't had much success so far. Based on Lau's version, do you know what could have went wrong?

<M/> 170

Google Images... just type what you are looking for, and baaam. You get pictures.

<M/> 170

... This whole argument from a guy trying to scam us about a false business completely changed gears into a more political debate about... erm... nukes? elections? politics? Middle East?

<M/> 170

Alright, so I tried running the code, the results are much more positive. I don't get any of the errors I get before but the form security doesn't seem to work because I can just click submit and it just keeps refreshing the page and it doesn't collect any of the inputs (it doesn't show in my email)? Did I forget to add anything?

Oh, and this is the form I worked on before. This was the one where I can submit the form and I can collect the inputs but the form lacks security and has odd glitches to it (incase you wanted to see it...):

<?php 
        $contactname = $_POST["contact-name"];
        $contactemail = $_POST["contact-email"];
        $contactphone = $_POST["contact-phone"];
        $child_info = $_POST["child_info"];
        $to      = 'yahoo@gmail.com';
        $subject = 'Contact Form Submission!';

        $v1 = "
                <html> <body> <style>
                    h1 {color:#000066;}
                    table {border:1px solid black; background: #e3f0ff;}
                </style> <h1>Hello, this form has been submitted!</h1> <img src= 'logo1.png' /> <table rules='all' style='border-color: #ffb300;' cellpadding='10' width='500px'> <tr style='background: #ffb300;'><td>First Name: $contactname</td> <tr style='background: #fafafa;'><td>Email: $contactemail</td> <tr style='background: #fafafa;'><td>Phone: $contactphone</td><tr style='background: #fafafa;'><td>Child Information: $child_info</td></table> </body> </html> ";
        $message = $v1; 
        $headers  = "From: $from\r\n"; 
        $headers .= "Content-type: text/html\r\n"; 
        mail($to, $subject, $message, $headers); 
        echo "Message has been sent..."; //Page RE DIRECT 
        echo $v1;
    //******************************************************************************************************************************//

        $contactname = $_POST["contact-name"];
        $contactemail = $_POST["contact-email"];
        $contactphone = $_POST["contact-phone"];
        $child_info = $_POST["child_info"];
        $verificationmsg = 'Thank you for your inquiry, we will contact you shortly! <br>Best,<br>M<br>©Name of Company was here :)(TM) All Rights Reserved 2015';
        $subject = 'Message Confirmed!';
        $v1 = "
                <html> <body> <style>
                    #disclosure ...
<M/> 170

@Lau, Sorry about that, I was trying to work on an old form of mine and wanted to see there was a better alternative. I saw that one and wanted to see if i can work off of that.

U may follow the example, but please, type it by urself, you will learn from that.

I will do that

I had fixed the problem, error for ur code is cause by the space. Try this code below:

I am gonna take a look at the code when I get home (its 2:00 am and I coming home from a wedding...)

<M/> 170

Yes, the code is the same as the above. There were comments, i removed them, that is the only difference.

<M/> 170

It says: Parse error: syntax error, unexpected T_IF in /home/content/86/5284386/html/thenameofmywebsite/contact.php on line 16

<M/> 170

@Lau, i tried those changes, and still had errors :/

<M/> 170

I was using the form from here: http://www.freecontactform.com/email_form.php

Is the form that this person created correctly written?

<M/> 170

@diafol, I am gonna go download phpstorm...

@pixelsoul... should i remove that >.>

<M/> 170

I spread the word the best I can about how great daniweb is... i did lose a few stackoverflow and codeprojects accounts in the process of talking about how great daniweb is, but totally worth it.

<M/> 170

On this line: $subject = "Contact Form Submission;
Its supposed to be: $subject = "Contact Form Submission";

I pasted it in wrong.

<M/> 170

I am working on adding security onto my contact form and I can't seem to find the reason as to why I get errors. Currently, when I test the php form, I get this error: Parse error: syntax error, unexpected T_IF in /home/content/86/5284386/html/websitenamewashere/contact.php on line 16
Here is my php:

<?php
 
if(isset($_POST['email'])) {
 
     
 
 
    $to = "yahoo@gmail.com";
 
    $subject = "Contact Form Submission;
 

 
    function died($error) {
 
 
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
 
        echo "These errors appear below.<br /><br />";
 
        echo $error."<br /><br />";
 
        echo "Please go back and fix these errors.<br /><br />";
 
        die();
 
    }
 
     
 
    // validation expected data exists
 
    if(!isset($_POST['contact-name']) ||
  
        !isset($_POST['contact-email']) ||
 
        !isset($_POST['contact-phone']) ||
 
        !isset($_POST['child_info'])) {
 
        died('We are sorry, but there appears to be a problem with the form you submitted.');       
 
    }
 
     

        $contactname = $_POST["contact-name"]; //required

        $contactemail = $_POST["contact-email"]; //required

        $contactphone = $_POST["contact-phone"]; //required

        $child_info = $_POST["child_info"]; //required

 
     
 
    $error_message = "";
 
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
 
  if(!preg_match($email_exp,$contactemail)) {
 
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
 
  }
 
    $string_exp = "/^[A-Za-z .'-]+$/";
    $numb_exp = '/^[0-9.-]';
 
  if(!preg_match($string_exp,$contactname)) {
 
    $error_message .= 'The First Name you entered does not appear to be valid.<br />';
 
  }
 
  if(!preg_match($numb_exp,$contactphone)) {
 
    $error_message .= 'The Phone Number you entered does not appear to be valid.<br ...
<M/> 170

Chipotle Steak Burrito and guac'... yes... i know it costs extra... but it tastes good...

<M/> 170

Help with Java/PHP/Programming problem

  • Gaining advice on different business endeavours I've tried/want to try
  • Expressing my disdain for joining a company and building a conventional career
    Does that not sound like I really am a Computer Science graduate, with ambitions to start a company, and make a big impact in the world?

I have done all of those... and look at me... I am arguably a mess ;)

Mike Askew commented: Can confirm, is mess. See OP avatar for proof +0
<M/> 170

Yes, I used to think that every person in England used to have a piss pot under their bed... turns out that I was wrong... I watched too much Mr. Bean before going there...

Have you ever been fired from a job

<M/> 170

Arguably, I have lost a bit of "clothing" when "wrestling" a "sumo." During football, we were doing a drill, and those who play reciever were put up (idk why we did this drill but oh well, it could be why the coach is gone) to go and basically tackle Offensive and defensive tackle players. I was put up to basically push the center, he is also the strongest on the team because he is a fat kid, and when we were about to start, he goes before the whistle and tackles me and knocks my offseason training cap off. In the next attempt, I hurt him pretty badly because I got a better leverage and managed to bring him to the ground... It was a good day...

Have you ever been in a fight (physical one, not the type of arguments you get in with your wife because you forgot to put the milk in the fridge).

<M/> 170

I wasn't considering something very advanced because its a pretty basic site and the main source of contacting is through a phone call. The contact form is an optional thing, but I guess i will just implement captcha then.

<M/> 170

Hmm, I need to add some form security. What do you guys think is the best approach since I don't need a very advanced form security?

<M/> 170

No.
Have you ever been to prison

<M/> 170

Yes

Have you ever used Stackoverflow