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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:07:05+00:00 2026-06-12T03:07:05+00:00

I am trying to implement a ‘reset password’ page for my website. So far

  • 0

I am trying to implement a ‘reset password’ page for my website. So far I have a simple page with a form for the user to enter their email address. Submitting the form calls ‘requestpasswordreset.php’ which does things such as checking if there exists a user with that email, sending the password reset email out etc.

<body>
<form name="input" action="requestpasswordreset.php" method="post">
    Email Address: <input type="text" name="email"> </br>
    <input type="submit" value="Submit"></form>
</body>

requestpasswordreset.php pseudocode

if no user with email = $_POST['email']
    echo 'No user exists with this email';
else
   ...
   doStuff();
   echo 'Password reset email sent';

I would like to know how I could do the following:

If the user entered an invalid email address, the form would remain visible and an error message would be displayed.

If the request was successfull the form would be hidden, and a message saying something like ‘success’ would be displayed.

It seems like it would be unnecessary/bad practice to redirect to a new page in either case? rather than just updating the current one.

  • 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-12T03:07:06+00:00Added an answer on June 12, 2026 at 3:07 am

    It is not bad practise to redirect, or in other way make a postback, at all. The solution you are looking for is called AJAX, and both solutions are equally viable. You could use javascript (and maybe jquery) to query the server, and then hiding the form/give an error message depending on the servers response.

    You cannot validate or send emails without a postback in html and php only, if that is your question.

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

Sidebar

Related Questions

Trying to implement what I thought was a simple concept. I have a user
Trying to implement a simple print in SL4. I have a DataGrid that I
Trying to implement page turning animation exactly as the flipboard ipad app. I have
I am trying implement a most recent widget into my tumblr post. So far,
I trying to implement some relatively simple 2D sprite batching in OpenGL ES 2.0
Trying to implement NSCopying for the first time, and I have a question about
Trying to implement clean URLs (without .form, .do, etc.) with Spring MVC 3.0 (actually
I have this weird kind of error. I am trying implement basic Euclidean algorithm
Trying to implement this gallery on my website. http://coffeescripter.com/code/ad-gallery/ It is noted in the
Trying to implement simple error handling without adding buku try / except statements to

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.