+ Reply to Thread
Results 1 to 6 of 6

Thread: PHP echo placement

  1. #1
    APMANAGER is offline x10Hosting Member APMANAGER is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    19

    PHP echo placement

    So im pretty new to php and im trying to learn. Im currently working on a login site i have everything figured out except that when u login it echos a logout link at the top left hand corner of the logged into page. I know i have to define the echo to be able to place the logout link anywhere i want. Does anyone have a script tthat can help me. Thank you in advance.

  2. #2
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: PHP echo placement

    I don't get what you are trying to look for, if you are looking to echo:

    echo "string of text";
    echo $myvariable;

  3. #3
    APMANAGER is offline x10Hosting Member APMANAGER is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    19

    Re: PHP echo placement

    well what i have is

    echo "<a href=logout.php>Logout</a>";

    and all it does is put a hyperlink at the top left of the logged into page. So what if i wanted to put the link in a form in the middle right of the logged in page. What would do to get that to happen. My idea is that i would have to add something to this to define it and then put a script in the form where i want the echo to take place "the logout link", but like i said im still in the learning stages of php so im not sure. thank you

  4. #4
    easykey is offline x10Hosting Member easykey is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    45

    Re: PHP echo placement

    You are echoing a standard html hyperlink, not really php. Usually when you want to write straight html you would keep it outside your php script and not use echo, but its a matter of choice really...

    e.g.
    <?php
    //some script
    ?>
    <table border="0">
    <tr><td><a href=logout.php>Logout</a></td></tr>
    </table>
    <?php
    //some script
    ?>

    You can position the link either using html tables or, preferably for new web designers, CSS.

    It's hard to give specific code advice on positioning without knowing exactly what you want. Is this logout link part of a side bar etc. etc.?

    If you don't know much about this you should check out the w3schools tutorials first.
    Last edited by easykey; 03-07-2008 at 07:10 AM.

  5. #5
    VPmase's Avatar
    VPmase is offline x10 Elder VPmase is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Dixon, IL, USA
    Posts
    914

    Re: PHP echo placement

    Or you can give it a specific style attrib.

    echo '<a href="logout.php" style="position:absolute; top:50px; left: 70%;">Logout</a>';

  6. #6
    APMANAGER is offline x10Hosting Member APMANAGER is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    19

    Re: PHP echo placement

    Thank you Vp that was exactly what i was looking for. I know it was very simple I just didnt know how to do it. Thank you again.

+ Reply to Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  3. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM
  4. [PHP] Placing the Ads in PHP Pages
    By Chris in forum Tutorials
    Replies: 22
    Last Post: 06-04-2005, 11:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers