Jump to content

Confused


westminster86

Recommended Posts

I have a page with several links(myaccount.php). One of which is a link that allows the user to change his/her email address and password. So, if the user clicks the link, there taken to the changeemail.php page which displays a form for the user to fill in. The forms action is set to myaccount.php page. If for instance the user fails to enter information into all the fields, and clicks the submit button, an error message is displayed on the myaccount.php page. My problem is that it is displaying the links as well as the error message. I want it to just to display the error message.

Link to comment
Share on other sites

Wouldn't it be easier to have chageemail.php deal with the form?

 

You can work out what information to display using the isset() function. For example:

 

<?php
if(isset($_POST['submit']){
//where submit is the name given to the relevant submit button.
//process form
}else{
//show form
}
?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.