Old 07-30-2005   #1 (permalink)
get nasty!
 
Uncle Ghed's Avatar
 
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82

Send a message via MSN to Uncle Ghed
Nav system difficulties

yes, always boring Uncle with tedious questions.

I'm trying to make a simple switch($page) navigation system with includes.
I have no idea of why tis is not working.
the code is
Code:
	
<?php
switch($page){
 case 'DPH':
	include 'discography.php';
	break;
 case 'ARS':
	include 'artisti.php';
	break;
 case 'LVE':
	include 'live.php';
	break;
 case 'DLS':
	include 'downloads.php';
	break;
 case 'GBS':
	include 'guestbook.php';
	break;
 case 'LKS':
	include 'links.php';
	break;
 case 'NWS':
	include 'news2.php';
	break;
}
?>
I know this part has to go where i want my contents to change, and it's in place.
now... what am I supposed to do with the menu? how should i write my links?
thank you for all your help!!!! ^^
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-30-2005   #2 (permalink)
get nasty!
 
Uncle Ghed's Avatar
 
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82

Send a message via MSN to Uncle Ghed
Code:
$page=$_GET['page'];
and
Code:
<a href="main.php?page=LVE" id="LVE">
...
I know, i know...
sorry for bothering...
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-30-2005   #3 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
It's been a while since I have coded anything in PHP, but it may be your include statements that are the problem. I am not sure but they may need to be written as:

Code:
include('live.php');
Not really sure. But maybe try that, see what happens.
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-30-2005   #4 (permalink)
get nasty!
 
Uncle Ghed's Avatar
 
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82

Send a message via MSN to Uncle Ghed
The problem was that I wasn't using the $_GET[] variable to pass its value from the link to the switch statement. Pretty dumb, eh!
the includes work fine... they may be grammatically incorrect, though, since I'm pretty new to php, so if anyone knows, please let me know so i fix my bugs...
Thanks for the help anyways... ^^

Oh, by the way... I'm trying to cut out the '\' character from my mySQL visualizations.
An example could be:

Hey let\'s go to freddy\'s house!

How do i get rid of those? Consider that I'd like to cut them out of my query results, if possible (that is, not one by one for every field, but all straight out! )...

Thanks again for any help!
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-30-2005   #5 (permalink)
Sheep Worrier
 
Man1c M0g's Avatar
 
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,101
Blog Entries: 14

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
I think you want ADDSLASHES and STRIPSLASHES. You can find a mini tutorial on them over at http://biorust.com/index.php?page=tu...ng=us#section4
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-31-2005   #6 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
Quote:
Originally Posted by Uncle Ghed
Oh, by the way... I'm trying to cut out the '\' character from my mySQL visualizations.
An example could be:

Hey let\'s go to freddy\'s house!

How do i get rid of those? Consider that I'd like to cut them out of my query results, if possible (that is, not one by one for every field, but all straight out! )...
yes, you want stripslashes(), it's very easy to use.
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-31-2005   #7 (permalink)
get nasty!
 
Uncle Ghed's Avatar
 
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82

Send a message via MSN to Uncle Ghed
Yep, that's just what i needed!
Thanks to all of you! ^^
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Mangament System Question LimitLess HTML / PHP / ASP / JS 3 06-01-2006 12:32 AM
Member System Problem Stroobie HTML / PHP / ASP / JS 7 07-04-2005 05:43 PM
Help needed with PHP: Pagination in a tut system nitr0x HTML / PHP / ASP / JS 3 05-24-2005 05:30 PM


All times are GMT +1. The time now is 01:20 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT