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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:02:07+00:00 2026-05-24T07:02:07+00:00

I have following login form pointing to the file ‘../exe/form-exec.php’. <form id=loginForm name=loginForm method=post

  • 0

I have following login form pointing to the file ‘../exe/form-exec.php’.

<form id="loginForm" name="loginForm" method="post" action="../exe/login-exec.php">
  <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
    <tr>
      <td width="112"><b>Login</b></td>
      <td width="188"><input name="login" type="text" class="textfield" id="login" /></td>
    </tr>
    <tr>
      <td><b>Password</b></td>
      <td><input name="password" type="password" class="textfield" id="password" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Login" /></td>
    </tr>
  </table>
</form>

Where login-exec.php should validate where inputs login & password has been field and if NOT return to the form file with $errflag.

File login-exec.php:

//Start session
    session_start();

    //Include database connection details
    require_once('../inc/config.php');

    //Array to store validation errors
    $errmsg_arr = array();

    //Validation error flag
    $errflag = false;



..... 



//Input Validations
    if($login == '') {
        $errmsg_arr[] = 'Login ID missing';
        $errflag = true;
    }
    if($password == '') {
        $errmsg_arr[] = 'Password missing';
        $errflag = true;
    }

    //If there are input validations, redirect back to the login form
    if($errflag) {
        $_SESSION['ERRMSG_ARR'] = $errmsg_arr;
        session_write_close();
        header("location: ../form/login-form.php");
            exit();
}

And partly is working correctly – it is returning to the form – but no error is displayed.
Any suggestion much appreciated.

  • 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-24T07:02:10+00:00Added an answer on May 24, 2026 at 7:02 am

    On the same page as your html form, do something similar to this:

    session_start();
    foreach ($_SESSION['ERRMSG_ARR'] as $msg) {
      echo $msg . "<br />";
    }
    etc...
    

    To actually display the messages.

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

Sidebar

Related Questions

I have the following login form: <!-- login box --> <form action=php/login.php method=POST id=signin>
I have the following fom: form id=login_form class=fancy_form action=@Url.Action(Logon, Account) method=POST> <div class=bl_label> Eneter
I have the following rule in my current .htaccess file to redirect /videos/login/ requests
I have a form which goes to the following login script when it is
i have a login form, which is in login.php. after authorization i moove client
I have added following code to my login form $csrf = $this->createElement('hash', 'csrf', array('salt'
I was going through following post Spring login form example and many other post
I have the following GET request that returns HTML for a login form, indicating
I have Login.php form like this: class Form_Login extends Zend_Form { public function init()
I have following PHP code: if($_SESSION['msg']['login-err']) { echo '<p class=error>'.$_SESSION['msg']['login-err'].'</p>'; unset($_SESSION['msg']['login-err']); } Everything working

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.