SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Extremely confused about how to make PHP work

    I am extremely confused about how to make my contact form work. I don't know how make it actually send an email to my email address.

    I downloaded the form from here:
    Demos - jFormer

    I uploaded it to my server:
    Bryson Price jFormer

    Can anyone please help me make a PHP document that will work with this form? I am extremely confused about how all of this works : /
    thanks

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2005
    Location
    Osoyoos BC Canada
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A quick look shows that the form handler is jformer.php which is part of the download package, so I expect that somewhere in that file you have to add your email address then the form's contents will be mailed to you.

    The documentation is rudimentary so I'd email the authors using their contact page.

  3. #3
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bigbonthabeat, I just looked at that thing... Maybe someone around here with more experience can give you a better assessment, but if I were you, I'd scrap that.

    To me, it seems way over bloated, makes extensive use of expressions, and seems overall unfriendly for both the one using and the one maintaining. Again, this is my opinion and it may be flawed!

    What exactly are you in need of here? Just a simple contact form or something more extensive? What was it that made you use this "jFormer"?

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wolf_22 View Post
    What exactly are you in need of here? Just a simple contact form or something more extensive? What was it that made you use this "jFormer"?
    Wolf,

    I wanted a form that doesn't look so 'elementary'. After I made this post, I went on a mission to at least learn the basics of forms and PHP, and I did. I built this one (click on the link below, and click on the 'gmail' logo. A form will pop out)

    Untitled Document

    The problem with this one is that it looks too basic. I want something a little fancier to let people know I'm legit. I liked the "jFormer" form because it highlights the fields when you click in them. Also, it fits the theme of my website ('clean and fresh, but professional').

    If you have suggestions for other forms, I am completely open to changes : )
    thanks

  5. #5
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, so you need a basic contact form with some styling and minimalist UI functionality, right?

    How good are you with CSS, JavaScript, and PHP? (Rate from 1 - 10, 10 being the best.)

  6. #6
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wolf_22 View Post
    Okay, so you need a basic contact form with some styling and minimalist UI functionality, right?

    How good are you with CSS, JavaScript, and PHP? (Rate from 1 - 10, 10 being the best.)
    Yes, I would say it needs to be a very simple form, but with some cool features like highlighting when you click the field. All I need on the form is "NAME, EMAIL, and MESSAGE."

    I would say a 2 or 3 lol. I just started a month ago

  7. #7
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for not replying sooner (at work at the moment ).

    I have a basic contact form that I'm currently working on. I'll try to send it to you later this evening to check out and maybe learn something from, but in the meantime, I thought I would try to encourage you to use a tutorial I found awhile ago so that you can begin teaching yourself this stuff. Trust me, it's way better than posting on forums all the time.

    That said, I stumbled across this page earlier this morning. It looked like an okay tutorial but even better, it provides a sub tutorial on creating your own localhost e-mail server to test with (which is invaluable).

    Until I get done with my contact form, you could go ahead and try to work on that tutorial above (unless you find something better between now and whenever, that is).

    If you do work on the tutorial, keep the following in mind:

    1. You need to go download and install the "ArGoSoft Mail Server" (it's an okay program that's easy to install and remove later on should you choose to. No hardcore server setup experience required and no strings attached.)
    2. After that, go download and install Mozilla Thunderbird. Don't worry, like above, this one's easy to install and remove, too.
    3. After these are both installed, create a new domain and user in the ArGoSoft app. Name the domain "localhost" and give your user a name of whatever you want (password is optional). Once this has been done, turn the e-mail server on by pressing the tiny "green arrow" at the upper-left portion of the window. (Tools / Account Settings). Make sure you use whatever name you used with the server and your e-mail address will be <your name>@localhost. I believe that's it with the e-mail setup stuff.
    4. Now, assuming you have WAMP (or something equivalent) installed on your computer to test out your actual PHP applications, throw the code at the bottom of this page into a PHP file to test out your e-mail server. (Keep in mind that once you load up the page, you won't see anything. Instead of looking for something to happen, you'll have to instead go back into Mozilla Thunderbird and have it "Get Mail" instead.) If everything's been setup correctly, you should receive a simple message in your inbox. If not, go back and repeat a few steps... Or, ask for more help.
    5. Assuming everything worked okay, go create a simple PHP index page that has some simple markup for your form. The actual form markup element allows for 2 notable attributes: "action" and "method". With action, you'll provide the name of the file you want to submit your form values to, in our case, just use something like "processor.php". For the method attribute value, use "post" (the twin brother of this is "get", which allows you to submit values through the URL address bar, otherwise known as "query strings"--we don't really want this.)
    6. Don't worry about styling at this point. Worry more about getting your values submitted to that processor page. To ensure this happens, you'll need some inputs to submit values from (i.e. - first name input, last name input, website input, and a message text area) and once the user (you) fills these in, you'll need a submit input button to make it all be submitted to that processor.php page. So do some reading on simple forms using PHP for data handling and don't forget about that mail code I mentioned below.


    PHP Code:
    <?php
    // The message
    $message "Blah, blah, and more blah... Better than Hello World!";

    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message wordwrap($message70);

    // Send
    mail('Wolf_22@localhost''My Subject'$message);
    ?>
    (Again, just load this to-be file into your browser. That's all.)

    I'll try to be back online later.

  8. #8
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wolf,

    Thank you for taking the time to post all this info. I will not be able to follow the steps until later tomorrow because I will be busy, but I just want to let you know that I REALLY appreciate you taking the time to help me with this.

    I'm definitely going to check this out and study it. Do you think we could keep in touch through email instead of posting on this forum? It's easier for me to keep up with because my email goes directly to my phone. Or if you don't want to post you email, send me an email by clicking on the "GMAIL" logo on the website below:

    Untitled Document

    once again, I GREATLY appreciate the help

  9. #9
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure. I'll IM ya on here with my info.

  10. #10
    SitePoint Zealot Ethan-27's Avatar
    Join Date
    Jan 2011
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Wolf

    I just checked out the page you recommended in a previous post, its really great.

    I know there is alot to more to add but to get the basics it is so clear!

    Thanks man


Bookmarks

Posting Permissions

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