Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 02-25-2008, 10:40 AM php menu on click?
Junior Talker

Posts: 2
Trades: 0
hello someone showed me this code and they also gave me a code that would make a new menu appear where my main menu is but I forget that part and I haven't talked to the person for a long time. I also dont remember his email. Anyway what this code does is it lets me have my layout on my index.php page and for my content to appear all I have to do is just add the content without having to add my whole layout in the page again. But my problem is I dont know how I can have a new menu with more links appear on top of my main menu of links.

Code:
<?
$val = $_GET['bleach'];
$val .= ".php";
$dirty = array("..");
$clean = array("");
$val = str_replace($dirty, $clean, $val);
if (isset($_GET['bleach'])) { 
if (file_exists($val)) { 
include "$val";
}
else {
include "index.php"; 
}
}
else {
$number = "3";
include "bnews/show_news.php"; 
}
?>
so what I'm looking for to make it more clear is I want a new menu with links to appear over top of my main menu of links when I click on lets say final fantasy 7. So my example would look like this

Code:
------ New Table with links -----------
 
<div class=head><b>Information</b></div>
<div align="left" class=cont>
<li><a rel="nofollow" href="?bleach=characters">Characters</a>
<li><a rel="nofollow" href="?bleach=weapons">Weapons</a>
<li><a rel="nofollow" href="?bleach=materia">Materia</a>
<li><a rel="nofollow" href="?bleach=access">Accessories</a>
</div>
 
<br>
--------------Main Table with links---------------
<div class=head><b>Information</b></div>
<div align="left" class=cont>
<li><a rel="nofollow" href="?bleach=ff7">Final Fantasy 7</a>
<li><a rel="nofollow" href="?bleach=ff8">Final Fantasy 8</a>
<li><a rel="nofollow" href="?bleach=ff9">Final Fantasy 9</a>
<li><a rel="nofollow" href="?bleach=ff10">Final Fantasy 10</a>
<li><a rel="nofollow" href="?bleach=ff11">Final Fantasy 11</a>
<li><a rel="nofollow" href="?bleach=ff12">Final Fantasy 12</a>
</div>
<br>

Last edited by squalls_dreams; 02-25-2008 at 10:42 AM.. Reason: font is small
squalls_dreams is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-25-2008, 05:15 PM Re: php menu on click?
Experienced Talker

Posts: 46
Trades: 0
Well for one you need to put a <ul> or <ol> around those <li></li>.

You also need to close your <li> tag as you haven't (add a </li> at the end of each line)

Lastly, what is the exact error you are getting?
__________________

Please login or register to view this content. Registration is FREE
-> Home of the crasher squirrel
jeff_oneil is offline
Reply With Quote
View Public Profile Visit jeff_oneil's homepage!
 
Old 02-25-2008, 11:58 PM Re: php menu on click?
Novice Talker

Posts: 6
Trades: 0
I'm guessing your problem is not php, but either javascript hide/show or perform an ajax call.
iliketocode is offline
Reply With Quote
View Public Profile
 
Old 02-26-2008, 10:04 AM Re: php menu on click?
Junior Talker

Posts: 2
Trades: 0
I was just showing a quick example. Anyway the top code is what I use but what I'm trying to do is figure out how I can make a new table with links appear over top the main table with links when I click on a link like Final Fantasy 7 for example.

I have more content on Final Fantasy 7 so I have links such as

weapons.php
accessories.php
midis.php

but I dont want to add it to my index.php cuz thats just going to be alot of links in my layout.

I would like the new links to appear when I click on Final Fantasy 7. You can see how my layout looks at http://www.ffbte.net/index1.php
squalls_dreams is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php menu on click?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13425 seconds with 12 queries