RE: [PHP] PHP - Internal linking in a page
You need to come up with a completely different method of doing this. Your site, if using this method, is horribly unsecure. How are you checking $page to make sure it's something that should be included?? ---John Holmes... > -Original Message- > From: Paul Ottar Tornes [mailto:critical@;tiscali.no] > Sent: Thursday, October 31, 2002 5:28 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP - Internal linking in a page > > Hi! > > I started to learn PHP yesterday, and I have just entered a little > problem. > In my index.php file. I have this line: > > ($page); ?> > > wich controles the main page locaton, just like frames. It makes the files > appear in the middle of the site. > > Now over to the problem: > > I am making a newsscript with PHP and PostgreSQL. I have now gotten PHP to > extract the news from the database. > I am using numbers as ID for each post. 1, 2 ,3, 4, 5, 6 and so on. > I use them to make a READ MORE link on the news posts. > I am calling my "READ MORE"-page for main2.php, this contains PHP code > that finds the story thats connected to the given number. and I use this > to make it appear: http://maloyportalen.no/~critical/maloy/main2.php?id=7 > > But that makes it go on a seperate page. > And this link does not work at all: > http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 > It returns this error: > > Warning: Failed opening 'main2.php?id=7' for inclusion > (include_path='.:/usr/share/pear') in > /home/critical/public_html/maloy/index.php on line 21 > > > Line 21 is the following: > ($page); ?> > > How can I write it so I can use: > http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 > > Regards > Paul Ottar Tornes. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Internal linking in a page
Your get statement is wrong: http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 use http://maloyportalen.no/~critical/maloy/index.php?page=main2.php&id=7 You only get 1 question mark, any after will be treated as part of the variable page. Hi! I started to learn PHP yesterday, and I have just entered a little problem. In my index.php file. I have this line: wich controles the main page locaton, just like frames. It makes the files appear in the middle of the site. Now over to the problem: I am making a newsscript with PHP and PostgreSQL. I have now gotten PHP to extract the news from the database. I am using numbers as ID for each post. 1, 2 ,3, 4, 5, 6 and so on. I use them to make a READ MORE link on the news posts. I am calling my "READ MORE"-page for main2.php, this contains PHP code that finds the story thats connected to the given number. and I use this to make it appear: http://maloyportalen.no/~critical/maloy/main2.php?id=7 But that makes it go on a seperate page. And this link does not work at all: http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 It returns this error: Warning: Failed opening 'main2.php?id=7' for inclusion (include_path='.:/usr/share/pear') in /home/critical/public_html/maloy/index.php on line 21 Line 21 is the following: How can I write it so I can use: http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 Regards Paul Ottar Tornes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP - Internal linking in a page
Hi! I started to learn PHP yesterday, and I have just entered a little problem. In my index.php file. I have this line: wich controles the main page locaton, just like frames. It makes the files appear in the middle of the site. Now over to the problem: I am making a newsscript with PHP and PostgreSQL. I have now gotten PHP to extract the news from the database. I am using numbers as ID for each post. 1, 2 ,3, 4, 5, 6 and so on. I use them to make a READ MORE link on the news posts. I am calling my "READ MORE"-page for main2.php, this contains PHP code that finds the story thats connected to the given number. and I use this to make it appear: http://maloyportalen.no/~critical/maloy/main2.php?id=7 But that makes it go on a seperate page. And this link does not work at all: http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 It returns this error: Warning: Failed opening 'main2.php?id=7' for inclusion (include_path='.:/usr/share/pear') in /home/critical/public_html/maloy/index.php on line 21 Line 21 is the following: How can I write it so I can use: http://maloyportalen.no/~critical/maloy/index.php?page=main2.php?id=7 Regards Paul Ottar Tornes.