473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Display Content Dependent on URL

2
Hello,

Please could somebody shed a little bit of light on whether this is possible. Basically I have a shopping cart system that provides one skin file to layout everypage. Now I want to display different elements on different pages and I thought the best way to do this would be using the URL as this clearly identifies which page is which.

I am reasonably new to PHP and wondered if somebody could help. An example is below:

IF URL = www.andysite.co.uk/page-one.php THEN DISPLAY this bit of code ELSE display that bit of code

Hope you understand, look forward to your response and thanks for having a look,

Cheers,
Andy
Jan 14 '10 #1
1 1830
Dormilich
8,658 Expert Mod 8TB
check out the $_SERVER superglobal, esp. $_SERVER["REQUEST_URI"]
Jan 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Follower | last post by:
Hi, I am working on a function to return extracts from a text document with a specific phrase highlighted (i.e. display the context of the matched phrase). The requirements are: * Match...
5
by: Gaizka | last post by:
Hi, I have a XML file which looks like this. <article_content id="364098" status="A"> <title>Weekly Sector Review</title> <date>20041008</date> <time>09:11:00</time> <body>BP’s third...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
5
by: christian | last post by:
Hi, i'm getting no success, with my attempt displaying some pictures one after another for i.e. some seconds. null.jpg is a white site! Really thanks for any help, regards,Christian
5
by: mike | last post by:
Is there any way I can change the content type when I open a new window other than opening a script in the open statement? mywin =...
5
by: Randy A. Bohannon | last post by:
I have two fields on a form: GPA and Points. GPA will be entered by the user. I would like Points to be filled automatically depending on the value of GPA. For example, the following code...
3
by: andrewcw | last post by:
I have a simple winform with the following code. But although I can read back the info, the display fails to provide the text or the cell background color changes. private void ListViewBroke()...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
1
by: Sietske | last post by:
Hi all! There are a few memo fields in my report, with variable amounts of possible content. How can I make the height of the box dependent of the content inside it? I already tried to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.