...

View Full Version : Extreme Newbie Question



lemorris
01-12-2006, 02:31 AM
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

Rappa
01-12-2006, 03:01 AM
just because its in php dosnt mean you cant have html in it.

so try like


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

ralph l mayo
01-12-2006, 03:02 AM
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?

lemorris
01-12-2006, 03:25 AM
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/catalog/policies_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

SWI03
01-12-2006, 03:30 AM
take out the & for that link that is what is taking you to a page not found
<a href="&#ship">Shipping</a></td>

lemorris
01-12-2006, 03:55 AM
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

Spookster
01-12-2006, 05:15 AM
You are required to read our posting guidelines before posting in our forums
http://www.codingforums.com/postguide.htm

lemorris
01-12-2006, 05:39 AM
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

firepages
01-12-2006, 07:01 AM
the correct link is


http://www.formulafirstracing.com/catalog/policies_info.php#ship

the code displays...


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 ..


<a href="http://www.formulafirstracing.com/catalog/policies_info.php#security">Security</a>

Spookster
01-12-2006, 12:52 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum