SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Html Contact Form Programming trouble Need Help

    Here is my Html Code and my Contact.php

    This is My code in my html

    <td height="345" valign="top">
    <form style="margin:0; padding:0; " action="contact.php" method="get" id="form">
    <table width="476" style="height:100% " border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="238" valign="top">
    <div style="margin:29px 0px 0px 23px; ">
    <img src="images/6tx2.gif" alt=""><br>
    <img src="images/spacer.gif" alt="" width="1" height="21"><br>
    Your Namebr>
    <input type="text" class="form"><br>
    <img src="images/spacer.gif" alt="" width="1" height="15"><br>
    Your Emailbr>
    <input type="text" class="form"><br>
    <img src="images/spacer.gif" alt="" width="1" height="16"><br>
    Your Subject Linebr>
    <input type="text" class="form"><br>
    </div>

    </td>
    <td width="238" valign="top">
    <div style="margin-top:63px; ">
    Your Messagebr>
    <textarea rows="5" cols="5" class="textarea" style="overflow:hidden "></textarea><br>
    <div style="margin:5px 35px 0px 0px; " align="right">
    <a href="" onclick="document.getElementById('form').reset()">reset</a><img src="images/spacer.gif" alt="" width="16" height="1"><a href="" onclick="document.getElementById('form').submit()">submit</a>
    </div>
    </div>

    Theirs is not Image Link you mentioned above that causes my page to be off in alignment.

    My Contact.PHp looks like this

    <?
    $subject="from ".$_GET['Your_Name'];
    $headers= "From: ".$_GET['Your_Email']."\n";
    $headers.='Content-type: text/html; charset=iso-8859-1';
    mail("defina8953@rogers.com", $subject, "
    <html>
    <head>
    <title>Septagon Studios: Contact Form</title>
    </head>
    <body>

    <br>
    ".$_GET['Your_Message']."
    </body>
    </html>" , $headers);
    echo ("Your message was successfully sent!");
    ?>
    __________________
    ]

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,329
    Mentioned
    191 Post(s)
    Tagged
    4 Thread(s)
    Huh?
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok Pretty Much there is two files I posted above that link to this website

    http://www.nyxxunderground.com/SEPTA...l/index-6.html

    I want to get my contact form to work.

    I posted above the Php linked to the form as well as the form in html. file
    ]

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    email message

    I have never seen mark-up inserted into the mail function like that. If you try
    PHP Code:
    mail("email address removed"$subject$_GET['Your_Message'], $headers); 
    Does it work?
    BTW I stongly recommend you DON'T use any unsanitized user supplied input. And you may want to edit out that email address if it's real to "email_address" instead.

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope nothing
    ]

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    bare essentials

    Try this for a test:
    PHP Code:
    <?php
    $email_address 
    "[your receiving email address here]";
    $subject "Contact form Email test";
    $headers "Content-type: text/html; charset=iso-8859-1 \r\n";
    $headers .= "From: <ContactForm@your_domain.com> \r\n\r\n";
    /* the empty line is needed to indicate the end of headers */
    $message "This is just a test to see if the mail function works. " $email_address " used your contact form.";
    mail($email_address$subject$message$headers) or die("mail failure");
    echo (
    "Your message was successfully sent from your script to the mail server!");
    ?>

  7. #7
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried it nothing work. I placed this into my contact.php file. I'm going to try to place this at the top of my page.

    Tried it nothing works. When I click submit it brings me back to my homepage.
    ]

  8. #8
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,014
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    mail

    If you try the code I posted (after putting in your email address) as a seperate file and make a direct HTTP request to the file, and the mail() function doesn't work, you may need to change how PHP is compiled.
    Quote Originally Posted by PHP docs
    For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.

  9. #9
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Try this:

    Did you edit your PHP file or is that how it looked when it came with the template?

    What you'll need to do is edit the .fla file itself. Open up your template and go to the top navigation menu, edit, find & replace. Search for " @ " and then select "find all" . Replace the generic email address with yours, save and publish and then test.


    This might be your answer in this case...


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
  •