Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2008
    Posts
    10
    Thanks
    5
    Thanked 0 Times in 0 Posts

    PHP Registration Form Output In a Chosen Place?

    I have a registration script that when a username is already taken it will return to the register.php file and then echo "Username taken" etc...

    Well the script returns to the register page but then the echo is just stuck to the bottom, not really a place I want it. I want it in the same box that where the register form is.

    How do I go about doing this? What I am looking for is an external command I can use just before the echo so that it appears in the right place without having to make a second page with the error message already on it. Here is my script and a picture of the output:

    PHP Code:
    if($login_exist 0){
        unset(
    $login);
        include 
    'register.php';
        echo 
    "I'm sorry but the name you specified has already been taken. Please choose another one.";
        exit();



    Thank you very much for any help.
    Last edited by msredimp; 03-05-2008 at 07:47 PM.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You'll need to move the PHP code in your script that echos that text to where you want it to be displayed in relation to the other HTML markup that your PHP script is generating, and add the div tags and whatever else to that echo statement. Your script is creating an HTML page, after all, and every echo/print command streams the HTML markup in the order your code instructs.

  • #3
    New Coder
    Join Date
    Mar 2008
    Posts
    10
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thank you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •