Display content depanding on url

B

Ben Lovell

[Note: parts of this message were removed to make it a legal post.]

Hi,

I am sorry if this question has been answered before but I am unable to
find the answer.

What I would like to do is display the content of a page depending in
the url, for example

http://whatever.co.uk/package?chosen=something would display:
content one
http://whatever.co.uk/package?chosen=somethingelse would display:
content two

I know how to do this in php but the template that I am using is written
in ruby.

You're going to have to provide some more context. Are you using rails or
some other web framework?
 
H

Henry Tudor

I asked the company which language the template is written in and the
tech support guy said:
"I believe it is written in ruby on the rails"
 
M

Michael Warnick

Hi,

I am sorry if this question has been answered before but I am unable to
find the answer.

What I would like to do is display the content of a page depending in
the url, for example

http://whatever.co.uk/package?chosen=somethingwould display:
content onehttp://whatever.co.uk/package?chosen=somethingelsewould display:
content two

I know how to do this in php but the template that I am using is written
in ruby.

Please could someone help.

So, how do you do this in PHP? I am trying to do this in php.
 
7

7stud --

Henry said:
I asked the company which language the template is written in and the
tech support guy said:
"I believe it is written in ruby on the rails"

The language is ruby. ruby on rails is a piece of software written in
ruby.
 
H

Henry Tudor

Michael said:
So, how do you do this in PHP? I am trying to do this in php.

This is how I do it in PHP

if (isset($_GET['chosen']) && ($_GET['chosen'] == 'something')) {
echo "Hi";
}
if (isset($_GET['chosen']) && ($_GET['chosen'] == 'somethingelse')) {
echo "There";
}

I still have no idea how to do it with Ruby
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top