Page 1 of 1

um, i have a rogue forward slash

Posted: Sun Jul 14, 2002 11:39 am
by IAK
ok, i am using a page entitled "me.php" and i am passing a variable to this page and then using that variable to include different pages. the variable is being passed from "me.php" to "me.php".
so, what im doing is, for instance, being on "me.php?inc=news" and loading "me.php?inc=morenews", but, when i do this, the browser loads "me.php?inc=morenews/". this doesnt work as the page "me.php?inc=morenews/" doesnt exist. i know the above may not be very clear, but can anyone help me/help me to clarify the question??

thankyou.

Posted: Sun Jul 14, 2002 11:48 am
by fatalcure
uhm, it shouldn't do that, whats your link setup like?

<a href='me.php?inc=news'>News</a>
<a href='me.php?inc=morenews'>More News</a>


Then you can just use case statements or if statements to work with the $inc variable, i have no idea why it would add a slash at the end...kinda funny :o

Posted: Sun Jul 14, 2002 1:02 pm
by IAK
god, i dont know why i posted now. it was my trippy code that did it. what i was doing was printing a load of separate variables to construct the hyperlink and i got the slashes the wrong way round - im kinda new to this, started php yesterday (? i think). anyway, thanks fro trying to help me, the unhelpable.

cheers,
IAK

No prob

Posted: Sun Jul 14, 2002 4:15 pm
by EricS
Welcome IAK,

No one in here was coding PHP at birth. We've all been there and done that.
:D
Good Luck 8)