Download it and work it out..! If you can..!
Moderator: General Moderators
Download it and work it out..! If you can..!
Tis not a job for a noob.. Dont think you could work this 1 out.
http://www.no-order.co.uk/php/php-links.zip
http://www.no-order.co.uk/php/
If some1 could download this and work it out for me I would be most greatful.
http://www.no-order.co.uk/php/php-links.zip
http://www.no-order.co.uk/php/
If some1 could download this and work it out for me I would be most greatful.
Last edited by Darkside on Wed Oct 30, 2002 4:30 pm, edited 1 time in total.
1) this is not http://www.write-me-a-script.net 
2) broken link
3) if you want to hire someone there's a 'Job hunt' board, otherwise try it yourself and ask your questions
despite that: welcome
2) broken link
3) if you want to hire someone there's a 'Job hunt' board, otherwise try it yourself and ask your questions
despite that: welcome
Bla ok.. then Mr.Guru..
If I had a 4 Pages..
Index.php
Menu.php
News1.php
News2.php
And I have in the index.php
<?php include ("menu.php");?>
and
<?php include ("$page.php");?>
With this code before it..
?>
$page = trim($page);
if (empty($page)) {
$page = "news1";
}
?>
Then in the menu.php I have a 2 links.. index?page=news1 and index?page=news2
Why does it not load news2.php when I click mez link?
If I had a 4 Pages..
Index.php
Menu.php
News1.php
News2.php
And I have in the index.php
<?php include ("menu.php");?>
and
<?php include ("$page.php");?>
With this code before it..
?>
$page = trim($page);
if (empty($page)) {
$page = "news1";
}
?>
Then in the menu.php I have a 2 links.. index?page=news1 and index?page=news2
Why does it not load news2.php when I click mez link?
I'm v.sry I'm a real newbie and I just dont understand why it doesnt work.. and I dont get any errors so I dont really know how to explain the problem (lack of know wot it is) so..
Been racking my brain on this all day and I stopping from making th rest of my site if you have any clues in wotz up pls help a lad out..
Been racking my brain on this all day and I stopping from making th rest of my site if you have any clues in wotz up pls help a lad out..
what does tell you about your version?
Sticky: Before Post Read: Concerning Passing Variables in PHP 4.2+
Code: Select all
<?php phpinfo(); ?>Sticky: Before Post Read: Concerning Passing Variables in PHP 4.2+
BLA..!
PHP Version 4.2.1
System Linux lion.zooyard.co.uk 2.4.13 #1 Sun Feb 24 22:52:49 EST 2002 i586 unknown
Build Date Aug 2 2002 21:03:36
Configure Command './configure' '--prefix=/usr/local' '--with-apache=/fileserver/toolbox/Apachetoolbox-1.5.58/apache_1.3.26' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--enable-inline-optimization' '--enable-memory-limit' '--with-imap=/usr/local' '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' '--with-openssl=/usr/local' '--with-gettext=/usr' '--with-mysql=/usr' '--with-pgsql'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
Debug Build no
Thread Safety disabled
System Linux lion.zooyard.co.uk 2.4.13 #1 Sun Feb 24 22:52:49 EST 2002 i586 unknown
Build Date Aug 2 2002 21:03:36
Configure Command './configure' '--prefix=/usr/local' '--with-apache=/fileserver/toolbox/Apachetoolbox-1.5.58/apache_1.3.26' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--enable-inline-optimization' '--enable-memory-limit' '--with-imap=/usr/local' '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' '--with-openssl=/usr/local' '--with-gettext=/usr' '--with-mysql=/usr' '--with-pgsql'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
Debug Build no
Thread Safety disabled
Darkside: Umm, dude, I don't see anywhere in there that you are calling a news2.php file. The only thing I see in there that is causing your page 2 to load up, however, is this piece of code:
I think you are screwing up somewhere in your code, but you are using values that I'm not too familiar with, such as trim and if (empty($page))
again, I think there is something else going on here.... but, since this obviously isn't the full source, no way to tell.
So, try this: Post your question a little bit more clearly. No offense intended man, but we can't read your mind and try to figure out what the deal is without a more clear explanation of what you are wanting to do, what happens, and what was expected......
Code: Select all
if (empty($page))
{
$page = "page2";
}again, I think there is something else going on here.... but, since this obviously isn't the full source, no way to tell.
So, try this: Post your question a little bit more clearly. No offense intended man, but we can't read your mind and try to figure out what the deal is without a more clear explanation of what you are wanting to do, what happens, and what was expected......
Here goes again..
Wot I want is a set layout on my page and when I click a link change the main area of text.. eg a php frame set..
So I have a menu.php and I have a banner.php and a news.php
So wot ive done is made a new files called index.php and included all the php files where I want them in a table.. Banner at the top menu at the left side and the news. in the Main area.
eg.. http://www.no-order.co.uk/mainframe/
So the way I went about this was to..
have this:
//Not knowing excectly wot its does (me being a noob)
$page = trim($page);
if (empty($page)) {
$page = "news";
}
seting $page to news
and then where I would have
<?php include ("news.php") ; ?>
I put
<?php include ("$page.php") ; ?>
Right now this is where that "trim" come into it..
On my menu.php on my links I add index.php?page=news2
hoping that when the page reload it would have changed $page to
news there fore changing
<?php include ("$page.php") ; ?>
//would infect be..
<?php include ("news2.php") ; ?>
and news.php would not be there and the news2.php would be there
How ever this does not work.
I do hope you sort of understand a bit more wot I trying to do.. So when I click and link it change my <?php include ("page.php") ; ?> to something esle..
Thanks at lot your real guru's
Wot I want is a set layout on my page and when I click a link change the main area of text.. eg a php frame set..
So I have a menu.php and I have a banner.php and a news.php
So wot ive done is made a new files called index.php and included all the php files where I want them in a table.. Banner at the top menu at the left side and the news. in the Main area.
eg.. http://www.no-order.co.uk/mainframe/
So the way I went about this was to..
have this:
//Not knowing excectly wot its does (me being a noob)
$page = trim($page);
if (empty($page)) {
$page = "news";
}
seting $page to news
and then where I would have
<?php include ("news.php") ; ?>
I put
<?php include ("$page.php") ; ?>
Right now this is where that "trim" come into it..
On my menu.php on my links I add index.php?page=news2
hoping that when the page reload it would have changed $page to
news there fore changing
<?php include ("$page.php") ; ?>
//would infect be..
<?php include ("news2.php") ; ?>
and news.php would not be there and the news2.php would be there
How ever this does not work.
I do hope you sort of understand a bit more wot I trying to do.. So when I click and link it change my <?php include ("page.php") ; ?> to something esle..
Thanks at lot your real guru's
I'm pointing you one last time to viewtopic.php?t=511 
your href="index.php?page=news2" approach can work if you note how those parameters are stored by default in php 4.2 and newer
additional note: index.php?page=news2 means page=news2 is passed via GET-method to script index.php
your href="index.php?page=news2" approach can work if you note how those parameters are stored by default in php 4.2 and newer
additional note: index.php?page=news2 means page=news2 is passed via GET-method to script index.php
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK