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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:34:33+00:00 2026-06-04T00:34:33+00:00

I was given this form by a designer who built it in html and

  • 0

I was given this form by a designer who built it in html and I need to create some php to process the form. However, when I tested the form to see if it would pass variables, $_POST was empty. When, however, I changed the method to get, I could access the variables fine. Can anyone see where the error is?

Here is the code:

<form action="process/appointment.php" method="post" accept-charset="utf-8" enctype="text/plain" id="appointments">
    <input type="text" placeholder="Contact Name..." name="contactName"  style="width:150px;"/>
    <input type="text" placeholder="Contact Telephone..." name="contactTel"  style="width:150px;"/>
    <!--<input type="image" src="images/send_purple.gif" alt="send appointment request" style="margin-top:0; height:auto; border:none;"/>-->
    <input type="submit" value="submit">
</form>

EDIT

Here is the page I was using to test the receipt of the variables:

<?php
print_r($_POST); print_r($_GET); 
?>

$_POST returns an empty array when the form is set to post, but $_GET returns the values when the for is set to get.

  • 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-06-04T00:34:35+00:00Added an answer on June 4, 2026 at 12:34 am

    Your enctype is wrong, you need enctype=”multipart/form-data”

    Swap this line :

    <form action="process/appointment.php" method="post" accept-charset="utf-8" enctype="text/plain" id="appointments">

    to

    <form action="process/appointment.php" method="post" accept-charset="utf-8" enctype="multipart/form-data" id="appointments">

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

Sidebar

Related Questions

Given this HTML: <form id=formx> <input type=text value= /> </form> And this JavaScript: $(function()
Given some typical search form, I can't construct this form action when submitting a
I need to reduce this boolean expression to its simplest form. Its given that
I need to be able to find all grids for a given form. This
How best would I exclude results from #other_section, given a structure like this? <form>
Given this markup: // Calendar.html?date=1/2/2003 <script> $(function() { $('.inlinedatepicker').datepicker(); }); </script> ... <div class=inlinedatepicker
In several recent answers I see this code given as the way to retrieve
I have a simple html form like this <table> <tr><td >Topic: </td> <td> <input
Some of my forms show errors when i load them in the designer. This
Given this Python class, implementing a Django form, how would you properly break this

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.