Vote for BP.Net for the 2013 Forum of the Year! Click here for more info.

» Site Navigation

» Home
 > FAQ

» Online Users: 926

0 members and 926 guests
No Members online
Most users ever online was 47,180, 07-16-2025 at 05:30 PM.

» Today's Birthdays

None

» Stats

Members: 75,905
Threads: 249,105
Posts: 2,572,113
Top Poster: JLC (31,651)
Welcome to our newest member, Pattyhud
  • 02-09-2007, 09:46 PM
    firehop
    Anyone familiar with PHP programming
    Hey all,

    I am about to pull my hair out....ok thats a lie I have no hair. Anyway Does anyone have web building experiance? I cannot get my php script to work and I have been at it for 10 hours trying different things. If anyone could help that would be great! Thanks

    www.bartolinis.com/mail_test.html
    www.bartolinis.com/php_test.php
  • 02-09-2007, 10:09 PM
    TekWarren
    Re: Anyone familiar with PHP programming
    your forms seem to be working fine...is your host's php configured to allow the email function or are you trying to relay through some other email server?
  • 02-09-2007, 10:15 PM
    firehop
    Re: Anyone familiar with PHP programming
    According to my server company they accept php. I just dont receive the e-mails. I will give them a call to see if she had any clue what she was talking about. Thanks
  • 02-09-2007, 10:25 PM
    iceman25
    Re: Anyone familiar with PHP programming
    Can you post ur code?
  • 02-09-2007, 10:34 PM
    firehop
    Re: Anyone familiar with PHP programming
    I will send it to you.
  • 02-10-2007, 12:03 AM
    iceman25
    Re: Anyone familiar with PHP programming
    Sent you a rework. Let me know how it goes. :)
  • 02-10-2007, 12:37 AM
    firehop
    Re: Anyone familiar with PHP programming
    Didnt work. Im gonna get ahold of my provider tomarrow and find out what the heck is going on. Anything I can do for you Ice let me know. I knew there would be someone here in the know that could help. That why I like reptile and motercycle people, always helping out.
  • 02-10-2007, 12:45 AM
    jhall1468
    Re: Anyone familiar with PHP programming
    If you can post your code I can attempt to help (PHP developer for 7 years now). It's likely that the headers are screwed up in the mail() function, or the lesser possibility that the mail function is disabled (although, this would throw an error if you haven't put an error suppressor before the function).
  • 02-10-2007, 12:53 AM
    iceman25
    Re: Anyone familiar with PHP programming
    Quote:

    Originally Posted by firehop
    Didnt work. Im gonna get ahold of my provider tomarrow and find out what the heck is going on. Anything I can do for you Ice let me know. I knew there would be someone here in the know that could help. That why I like reptile and motercycle people, always helping out.

    Sorry to hear that man. It looks like pretty standard stuff. Maybe jhall might be able to shed some light on it. :)
  • 02-10-2007, 12:59 AM
    iceman25
    Re: Anyone familiar with PHP programming
    Quote:

    Originally Posted by jhall1468
    If you can post your code

    Pretty standard stuff actually...I won't post his code...so here's a simplified/tutorialized version of it.


    <?php
    if(isset($_POST['submit'])) {

    $to = "you@you.com";
    $subject = "Form Tutorial";
    $name_field = $_POST['name'];
    $email_field = $_POST['email'];
    $message = $_POST['message'];

    $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

    echo "Data has been submitted to $to!";
    mail($to, $subject, $body);

    } else {

    echo "blarg!";

    }
    ?>
  • 02-10-2007, 01:15 AM
    iceman25
    Re: Anyone familiar with PHP programming
    Quote:

    Originally Posted by firehop
    According to my server company they accept php. I just dont receive the e-mails. I will give them a call to see if she had any clue what she was talking about. Thanks

    Find out what version of php they are running, and also what OS. You code may have to be build around that.

    http://us3.php.net/function.mail
  • 02-10-2007, 04:41 PM
    firehop
    Re: Anyone familiar with PHP programming
    Tech department is supposed to be working on it. I dont understand she said her test worked and she sent it to me and it doesnt work for me. Thanks for you help...
  • 02-10-2007, 05:00 PM
    jason221
    Re: Anyone familiar with PHP programming
    iceman's code would work, also this:

    <?php
    $name = $_POST["name"];
    $name = stripslashes($name); // <- borrowed from green-beast.com
    $email = $_POST["email"];
    $website = $_POST["website"];
    $sub = $_POST["sub"];
    $message = $_POST["message"];
    $message = stripslashes($message); // <- borrowed from green-beast.com
    $ip = getenv("REMOTE_ADDR"); // <- borrowed from green-beast.com

    $to = "email@email.com";
    $re = "$sub from $name";
    $msg = "Name: $name \n
    Email Address: $email \n
    Website (if provided): $website \n
    Message: $message \n \n
    IP Address: $ip ";

    if ($message != "" && $name != "" && $sub != "" && $email != "") {
    // if required fields are filled out, send message
    mail ($to, $re, $msg);
    }
    else {
    // if one of required fields is blank, do nothing
    echo "no spam";
    exit;
    }
    ?>

    Mine's a little more complicated; if you want to view it in action, look at the below image:

    http://farm1.static.flickr.com/125/3...1ed5d4f50b.jpg

    If your code follows the standard, not sure why it wouldn't work.
  • 02-10-2007, 11:25 PM
    firehop
    Re: Anyone familiar with PHP programming
    Hey All,


    Ok here is the story. Comcast is blocking all e-mail from that server. Even if its redirected it will be blocked. They asked comcast to release the server so hopefully it will be soon. So it wasnt my fault after all and hopefully that will fix it all.

    Thanks Again!!!!!!!!!!!!!!!!!!!!!!
  • 02-10-2007, 11:48 PM
    jason221
    Re: Anyone familiar with PHP programming
    Well that would explain it! ;)
  • 02-10-2007, 11:48 PM
    iceman25
    Re: Anyone familiar with PHP programming
    Great news! It's always a relief when technical problems like that get resolved! :)
  • 02-19-2007, 10:38 AM
    firehop
    Re: Anyone familiar with PHP programming
    Hey I just wanted to drop a line to thank you all for your help. Especially Iceman, I got it working. It appeared to be mostly comcast's issue but I did some minor things to tweak it and I bought a php book for reference in the future. There are 2 great families to belong to.......Reptile people and Bikers.
  • 02-19-2007, 10:55 AM
    iceman25
    Re: Anyone familiar with PHP programming
    Great to hear that things got ironed out. And it was my pleasure to help out in any way I could! :D
Powered by vBadvanced CMPS v4.2.1