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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:53:06+00:00 2026-05-28T18:53:06+00:00

some of my code in addUser.php it pure html addUser.php <form action=process/addNewUser.php method=POST id=userForm>

  • 0

some of my code in addUser.php it pure html
addUser.php

<form action="process/addNewUser.php" method="POST" id="userForm">
<table width="79%" border="0" cellspacing="6" cellpadding="1"
    class="tabcont">
    <tr>
        <td width="47%" align="right">Title:</td>
        <td width="53%">
            <select name="title"><option value='0'>- - select - -</option>
            </select>
        </td>
    </tr>
    <tr>
        <td width="47%" align="right">
        First Name:</td>
        <td width="53%"><input type="text" id="firstname" name="firstName" class="required" /></td>
    </tr>

    <tr>
        <td align="right">Middle Name:</td>
        <td><input type="text" id="middlename" name="middleName" class="name" /></td>
    </tr>
    <tr>
        <td align="right">Password:</td>
        <td><input name="password" value="" readonly="readonly"
            id="password" class="required" " /></td>
    </tr>
    <tr>
        <td align="right" colspan="2">
            <input name="addNewUser" type="submit" class="submit" id="submit" value="Submit" />
        </td>
    </tr>
</table>
</form> 

addNewUser.php

Here i am doing validations and displaying error messages and if it is success sending him to another page.

But i want to show an error message on addUser.php instead of validations page. Please give me a sample code how i can do it.

  • 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-28T18:53:07+00:00Added an answer on May 28, 2026 at 6:53 pm
    addNewUser.php
    

    Add the message in the session

    $_SESSION["ErrorMsg"]="Name already exists";
    

    And in your addUser.php , you put the following code in the place you need to show the msg :

    if($_SESSION["ErrorMsg"])
    {
      echo $_SESSION["ErrorMsg"];
      $_SESSION["ErrorMsg"]="";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some code here, I want store mysql query result into an array with php,
Some code I am working with replaces some HTML elements that have Dojo event
Was trying out some code with the EF code first method and ran into
Some code for context: class WordTable { public: WordTable(); ~WordTable(); List* GetListByAlphaKey(char key); void
Some code for context: class a { } class b { public a a{get;set;}
some code snippets. The java coding doing the jaxb unmarshaling. pretty straightforward, copied out
In some code I've inherited, I see frequent use of size_t with the std
Got some code that is not mine and its producing this warning atm: iehtmlwin.cpp(264)
After some code review I removed unnecessary properties which resulted in empty rules. So
In some code I've been reading, I've come across this : class Someclass {

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.