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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:15:11+00:00 2026-05-14T18:15:11+00:00

Hello i have an html form and i’m posting data but i’m unable to

  • 0

Hello i have an html form and i’m posting data but i’m unable to get the posted data on a php page (same page)
can you please help me.
thanks in advance

<div class="left">
<form name="form_signin" method="post" onsubmit="return signinValid();" >
    <table>
        <tr>
            <td>
                Email :
            </td>
            <td>
                <input type="text" id="email" length ="40">
            </td> 
        </tr>
        <tr>
            <td>
                Mot de Passe :
            </td>
            <td>
                <input type="password" id ="pass" length ="40">
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <input type="submit" value="Connexion" length ="40">
            </td>
        </tr>

    </table>


</form>

<?php
include 'includes.php';
include DB_CONNECT_FILE;
//session_start();
print_r($_POST); // prints an empty array even if fields are filled

$smart->assign('tpl_file',TEMPLATES_DIR.'signin.html');
$smart->display(TEMPLATES_DIR."with_right.html");

include DB_DISCONNECT_FILE;

?>
  • 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-14T18:15:12+00:00Added an answer on May 14, 2026 at 6:15 pm

    Your form element needs to have an action attribute defined, even if the form is just reposting to the same page. According to the W3C spec, it is a required attribute:

    http://www.w3.org/TR/html401/interact/forms.html#h-17.3

    I’m suprised this line isn’t throwing an error:

    $smart->assign('tpl_file',TEMPLATES_DIR.'signin.html');
    

    As far as I’m aware, you can only use comma seperation when echo-ing.

    UPDATE
    Can’t believe I missed it the first time around! You’ll need to add the name attribute to the input elements. They can be the same as the id attribute for the element in question:

    <input type="text" id="email" name="email" size="40">
    

    Also, there is no such attribute as length. There is maxlength, but I suspect you mean to use size.

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

Sidebar

Related Questions

Hello o have an html form and a php script and html passes some
Hello i have a html form in side php everything is working fine and
Hello I have a jsp with an html form. I set the content type
For example, I have a HTML form with several input buttons, <form action=/index.php method=post>
Hello i have a JSP page that contain a form, i want to validate
I'm working on a simple JavaScript validation function for a html form, but have
hello i have the html code below <form> <input type=text id=filepathz size=40 placeholder=Spot your
I'm trying to have an array display information inputted from a PHP-created HTML form.
Hello i have the code below <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
I have this simple html: <div class=wrapper> <span class=higher> [higher] <span class=lower> hello </span>

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.