Page 1 of 1

linkage problem

Posted: Mon Jul 01, 2002 4:23 am
by cheatboy00
my links arent working, i'm using if statements to get a link and saying if the link is equal to whatever do this etc... yet when i click on the link nothing shows up, heres the code:

Code: Select all

$links = "<HR width=75% height=3> 
<A HREF=main.php?id=dbpics>Home</a> - 
<A HREF=main.php?id=dbpics?page=kv>King Vegeta</a> - 
<A HREF=main.php?id=dbpics?page=toma>Toma</a> .....";

if(!$page)&#123;
   echo "<BR><P>Welcome to the Dragonball pictures page. ";
   echo "<BR><BR>$links";
&#125;

else if($page=='kv')&#123;
   include ("dbpics\kv.php");
   echo "<BR><BR>$links";

&#125;

else if($page=='toma')&#123;
   echo "toma";
   echo "$links";
&#125;
i put dots in the $link meanign theres more links that are in ther but thats too much code. but shouldnt this work i dont understand nothings showing up except for the if(!$page) part thats the only part that works any time you click on a link it wont work

Posted: Mon Jul 01, 2002 4:37 am
by twigletmac
For starters, this:

Code: Select all

main.php?id=dbpics?page=kv
should be

Code: Select all

main.php?id=dbpics&page=kv
// OR
main.php?id=dbpics;page=kv
Mac

Posted: Mon Jul 01, 2002 4:12 pm
by cheatboy00
thanks that helped....

another question could you used more &stuff=blah... or whatever to the address?

Posted: Mon Jul 01, 2002 4:28 pm
by RandomEngy
Yes you can.

Code: Select all

http://www.froo.com/jumping.php?submit=squirrel&text1=buttons&text2=rabbits

Posted: Mon Jul 01, 2002 6:00 pm
by hob_goblin
from my php book.. by wrox

"POST can also allow a greater amount of information to be transmitted - there is a physical limit to the amount you can transmit as part of a URL"

Posted: Tue Jul 02, 2002 1:39 am
by twigletmac
And it looks kinda messy.

Mac

be careful using include

Posted: Tue Jul 09, 2002 7:48 am
by conthox
if u have a adress like this:

http://adress.com/main.php?page=some.php

and the main page includes the some.php page, hacker may use the line

http://adress.com/main.php?page=/etc/passwd

(or something)

to get your passwords or another "secret" fil or data.