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 7512881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:00:27+00:00 2026-05-30T00:00:27+00:00

I’ve build a contact form on my project, but I get 500 Internet Server

  • 0

I’ve build a contact form on my project, but I get 500 Internet Server Error when I examine my script. I show my code below, so please give me some tips.

Thank you.

form: permission (705)

<form id="contactForm" method="POST" action="mail.php" >
            <div>
            <label for="name">氏名<span>必須</span></label><br />
                <input type="text" size="50" name="name" id="name" class="text" class="required" value="" />
            </div>

            <div>
                <label for="company">社名</label><br />
                <input type="text" size="50" name="company" id="comany" class="text" value="" />
            </div>

            <div>
                <label for="pref">住所<span>必須</span></label><br />
                <select name="pref" size="1" id="pref">
                    <option value="selected">都道府県</option>
                    <option value="北海道">北海道</option>
                    <option value="青森県">青森県</option>
                    <option value="岩手県">岩手県</option>
                    <option value="宮城県">宮城県</option>
                    <option value="秋田県">秋田県</option>
                    <option value="山形県">山形県</option>
                    <option value="福島県">福島県</option>
                    <option value="茨城県">茨城県</option>
                    <option value="栃木県">栃木県</option>
                    <option value="群馬県">群馬県</option>
                    <option value="埼玉県">埼玉県</option>
                    <option value="千葉県">千葉県</option>
                    <option value="東京都">東京都</option>
                    <option value="神奈川県">神奈川県</option>
                    <option value="新潟県">新潟県</option>
                    <option value="富山県">富山県</option>
                    <option value="石川県">石川県</option>
                    <option value="福井県">福井県</option>
                    <option value="山梨県">山梨県</option>
                    <option value="長野県">長野県</option>
                    <option value="岐阜県">岐阜県</option>
                    <option value="静岡県">静岡県</option>
                    <option value="愛知県">愛知県</option>
                    <option value="三重県">三重県</option>
                    <option value="滋賀県">滋賀県</option>
                    <option value="京都府">京都府</option>
                    <option value="大阪府">大阪府</option>
                    <option value="兵庫県">兵庫県</option>
                    <option value="奈良県">奈良県</option>
                    <option value="和歌山県">和歌山県</option>
                    <option value="鳥取県">鳥取県</option>
                    <option value="島根県">島根県</option>
                    <option value="岡山県">岡山県</option>
                    <option value="広島県">広島県</option>
                    <option value="山口県">山口県</option>
                    <option value="徳島県">徳島県</option>
                    <option value="香川県">香川県</option>
                    <option value="愛媛県">愛媛県</option>
                    <option value="高知県">高知県</option>
                    <option value="福岡県">福岡県</option>
                    <option value="佐賀県">佐賀県</option>
                    <option value="長崎県">長崎県</option>
                    <option value="熊本県">熊本県</option>
                    <option value="大分県">大分県</option>
                    <option value="宮崎県">宮崎県</option>
                    <option value="鹿児島県">鹿児島県</option>
                    <option value="沖縄県">沖縄県</option>
                </select>
            </div>

            <div>
                <label for="city">市区町村群(番地含む)<span>必須</span></label><br />
                <input type="text" size="50" name="city" id="city" class="text" value="" />
            </div>

            <div>
                <label for="apart">アパート/マンション名(部屋番号含む)</label><br />
                <input type="text" size="50" name="apart" id="apart" class="text" value="" />
            </div>

            <div>
                <label for="email">メールアドレス<span>必須</span></label><br />
                <input type="text" size="50" name="email" id="email" class="text" value="" />
            </div>

            <div>
                <label for="tel">電話番号<span>必須</span></label><br />
                <input type="text" size="50" name="tel" id="tel" class="text" value="" />
            </div>

            <div>
                <label for="message">内容</label><br />
                <textarea rows="5" cols="50" name="message" class="text" id="message">
</textarea>
            </div>
            <input type="submit" value="送信" name="submit" />
        </form>

mail.php: permission (705)

<?php

$name = $_POST['name'];
$company = $_POST['company'];
$pref = $_POST['pref'];
$city = $_POST['city'];
$apart = $_POST['apart'];
$email = $_POST['email'];
$tel = $_POST['tel'];
$message = $_POST['message'];
$formcontent = "氏名: $name \n\n 社名: $company \n\n 住所: $pref \n $city \n $apart \n\n $email \n\n $tel \n\n $message";
$recipient = 'yawatajyuku@gmail.com';
$subject = '八幡宿っていいねに関する問い合わせ';
$mailheader ='From $email"
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo 'ご送信ありがとうございます!担当からの連絡をお待ちください。'; // true -> show up thanks.
?>
  • 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-30T00:00:28+00:00Added an answer on May 30, 2026 at 12:00 am

    This line:

    $mailheader =’From $email”

    Should be like this:

    $mailheader = “From $email”;

    You have to match quotes quotes when enclosing text,

    ‘ does not match ”

    You also forgot the semicolon ; at the end of the line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from

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.