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 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Extreme Newbie Question

    First off let me say I am completely new to PHP. So new that I don't know what PHP means. My background is in graphics, animation and movies.

    I am working with this other guy on a PHP site. He set up a bunch of template like pages for me and he put the words "Put your stuff here" in a table cell for me....I can handle this. He said just do what I would normally do in html and it would work. I tried it with some flash videos and hey he was right! Worked great...little tweak here and there but no sweat.

    Now the problem:

    In Dreamweaver I can set what it calls an Anchor. I can place it at a point somewhere down on my page and then I can create some text or whatever above it and I can make the page jump to that anchor I just set.

    <a href="#anchorname">text link</a>

    When I set this up on the PHP page it don't work at all. It throws me to some bad place I don't want to be.

    I'm not sure I'm even asking the question properly as I don't even know the correct term so please forgive me. I did look through many pages here but got lost after the ?.

    How do you set an anchor point and jump to it in PHP?

    If you folks are kind I'll post a link to the site and some of my stuff...heck I might not which may be a better reward.

    Seriously confused and needing a hand,

    -Lemorris

  • #2
    Regular Coder Rappa's Avatar
    Join Date
    Nov 2005
    Location
    LI
    Posts
    356
    Thanks
    21
    Thanked 9 Times in 9 Posts
    just because its in php dosnt mean you cant have html in it.

    so try like

    Code:
    <html>
    <?php
    script
    ?>
    <a href="#anchorname">link</a>
    <?php
    script
    ?>
    </html>

  • #3
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    How do you set an anchor point and jump to it in PHP?
    PHP doesn't jump to anchor points or care about them in any way. If you need to move around in the code you'd do so with object methods or functions. If you just want to get the template engine to transfer the anchor into the end result HTML, we'll probably need its code. It may delimit its tags with '#' and it's choking on it when used in a different context, as an off hand explanation, but it could be any number of things.

    Also:
    It throws me to some bad place I don't want to be.
    The hell does that mean? Error message, incorrect rendering?

  • #4
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Like I said I'm really not sure how to ask and I am not a programmer. I'm completely new to this site and this world so....

    Go to this page:

    http://www.formulafirstracing.com/ca...icies_info.php

    Click the shipping link and it takes you to the bad lands.

    The Returns link does somethin weird too.

    Does that help?

    Rappa -
    I'll throw that in there and see what happens.

    I really do appreciate the help. I know it's silly for someone to be messin around at all but I just got thrown in. Eventually I'll learn.

    Thanks all.

    p.s. Rendering means this in my world http://www.58vw.com/af/lecar6.jpg

    I'm way out of my league here. lol
    Last edited by lemorris; 01-12-2006 at 03:28 AM.

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    38
    Thanks
    0
    Thanked 2 Times in 2 Posts
    take out the & for that link that is what is taking you to a page not found
    <a href="&#ship">Shipping</a></td>

  • #6
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks SWI03.

    I took out the ? but it still doesn't work.

    I added this to the security link:

    <td><?php
    script
    ?>
    <a href="#security">Security</a>
    <?php
    script
    ?>
    </td>

    no go.

    I didn't want to try to make 8 different pages just to show a paragraph or 2 for those links. Should I care about this that much? Is it bad cricket to have a viewer scroll?

    -Lemorris

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    You are required to read our posting guidelines before posting in our forums
    http://www.codingforums.com/postguide.htm
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #8
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I went through there and I do apologize for violating any protocols. It's really not my intention.

    I'm just looking for some guidance. I have nothing but respect for what you guys do and I hope you are not seeing any ill will in my posts for there is none. I am not that kind of person.

    I actually looked through 13 pages of past posts on this board and tried to search under what I thought I was looking for. (and really not knowing the terminology is probably hurting me more than anything else right now.) I dug through no less than 4 other forums and stopped at this one cause it looked promising.

    It's very very clear that I don't know even how to ask a question here. I understand that, but seriously though. Is what I'm asking possible? Do you know how to do it? Can you maybe suggest another place where I might be able to obtain the information?

    I really do appreciate the help.

    -Lemorris

  • #9
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    the correct link is
    Code:
    http://www.formulafirstracing.com/catalog/policies_info.php#ship
    the code displays...
    Code:
    http://www.formulafirstracing.com/catalog/#ship
    so for your link to work you probably need to put in your template..

    <a href="policies_info.php#security">Security</a>

    in saying that I don't know if the underlying code makes use of the servers PATH_INFO which can make these things difficult , if so then there is probably some template relacer that can be used but you will need to ask your PHP guy about that since we cant see the internals of the template parser

    as a last resort you can always do this ..
    Code:
    <a href="http://www.formulafirstracing.com/catalog/policies_info.php#security">Security</a>
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #10
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by lemorris
    I went through there and I do apologize for violating any protocols. It's really not my intention.

    I'm just looking for some guidance. I have nothing but respect for what you guys do and I hope you are not seeing any ill will in my posts for there is none. I am not that kind of person.

    I actually looked through 13 pages of past posts on this board and tried to search under what I thought I was looking for. (and really not knowing the terminology is probably hurting me more than anything else right now.) I dug through no less than 4 other forums and stopped at this one cause it looked promising.

    It's very very clear that I don't know even how to ask a question here. I understand that, but seriously though. Is what I'm asking possible? Do you know how to do it? Can you maybe suggest another place where I might be able to obtain the information?

    I really do appreciate the help.

    -Lemorris

    It's okay. I was referring to the thread title. It makes it difficult for people searching the forum to sort through the results and find topics similar to theirs when they see threads titles that have nothing to do with the problem being helped with.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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