Form action="<?php echo $_SERVER['PHP_SELF']; ?> Display problem

Posted on 2006-04-04
Last Modified: 2012-05-11

Firstly thank you to everyone who has helped previously on this litlle mini project of mine.

I have a form that can be seen at the test location below:

The form is nearly at the bottom of the page. When the form is submitted with blank fields it returns errors which are displayed in red. Unfortunately after submission and the page redisplays the errors can not be seen as they are off the bottom of the page, thus the user would not know that errors have occured and the form has yet to be submitted correctly.

Other than move the form further up the page (which I can not do due to design restrictions) does anyone have any ideas as to how I can get the page to display so that the errors can be seen?



Question by:Luv2Muff
    LVL 49

    Accepted Solution

    You can have a anchor:

    <a name="subscribeme">Subscriber details:</a>

    and then use:

    <form action="<?php echo $_SERVER['PHP_SELF'];?>#subscribeme">


    Author Comment


    EXCELLENT !!!!!!

    That works a treat, much appreciated.


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now