Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:18:24+00:00 2026-05-29T21:18:24+00:00

doing some quick web dev work for a local body modification parlour just in

  • 0

doing some quick web dev work for a local body modification parlour just in my spare time; I’m trying to setup a Contact Us form, except when I hit submit, it just returns the die(); method. I’m not too sure what I’m doing wrong, because i’m used to programming Java, and I’d just get the error method for that. Haha. My code is as below if anyone is able to help me, the problem area is within the “contact” case.

<html>
<head>
<title>Darklite Tattoo & Piercing</title>
<link href="src/style.css" type="text/css" rel="stylesheet" /></link>
</head>
<body bgcolor="000048" />
<?php include("src/config.php"); ?>
  <div align="center" /><img src="src/img/darklite_banner.jpg" /><br />
    <div id="main" />
        <?php echo("<a href=\"index.php\" />Home</a> &middot; <a href=\"index.php?x=profiles\" />Profiles</a> &middot; <a href=\"index.php?x=services\" />Services</a> &middot; <a href=\"index.php?x=contact\" />Contact Us</a>"); ?>
            <hr>
            <?php
                $x = $_GET['x'];
                switch($x) {
                    case "profiles":
                        echo("Le profiles.");
                    break; case "services":
                        echo("Body piercings and tattoo's.");
                    break; case "contact":
                        if ($_POST["email"]<>'') { 
                            $ToEmail = 'ihatejava@hotmail.com'; 
                            $EmailSubject = 'Site contact form '; 
                            $mailheader = "From: ".$_POST["email"]."\r\n"; 
                            $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; 
                            $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
                            $MESSAGE_BODY = "Name: ".$_POST["name"]."<br>"; 
                            $MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>"; 
                            $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"])."<br>"; 
                            mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); 
                        ?> 
                        Your message was sent
                        <?php 
                        } else { 
                        ?> 
                        <form action="index.php?x=contact" method="post">
                        <table width="400" border="0" cellspacing="2" cellpadding="0">
                        <tr>
                        <td width="29%" class="bodytext">Your name:</td>
                        <td width="71%"><input name="name" type="text" id="name" size="32"></td>
                        </tr>
                        <tr>
                        <td class="bodytext">Email address:</td>
                        <td><input name="email" type="text" id="email" size="32"></td>
                        </tr>
                        <tr>
                        <td class="bodytext">Comment:</td>
                        <td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
                        </tr>
                        <tr>
                        <td class="bodytext">&nbsp;</td>
                        <td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
                        </tr>
                        </table>
                        </form> 
                        <?php 
                        }; 
                    break; default:
                        echo("Welcome to Darklite Tattoo & Piercing!");
                    break;
                }
            ?>
    </div>
  </div>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:18:25+00:00Added an answer on May 29, 2026 at 9:18 pm

    To send a mail via php you need an smtp server. You can set it in your php_ini config file or by invoking ini_set beofre using mail function:

    ini_set('sendmail_from', '$from');
    ini_set('SMTP', '$smtp_server_address');
    ini_set('smtp_port', $smtp_port);
    mail(...);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing some quick design work/rapid prototyping with WPF. I'm curious if anyone has
I just need some quick help on syntax. I'm doing a WPF project and
Just a quick question, I have seen some web page if I click view
I'm at a client doing some quick fixes to their access application. It was
I'm doing some real quick and dirty benchmarking on a single line of C#
This should a quick question for some easy rep. I'm doing some PHP Website
After doing some work with Ruby, Rails, and RSpec last summer and I learned
I`m doing some web.config modifications with SPWebConfigModification class. When adding them to WebApplication and
I'm doing some quick Java-.NET interop and have decided on POX with WCF. However,
I've been working writing fairly small applications and doing some maintenance work for some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.