LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 375 users online 221640 members 194 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
BloatedEgo
I haven't filled out my profile...
Mood: Plain
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
4 online / 17 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

Tech People! PHP HELP
Replies: 6Last Post Aug. 25, 2007 3:03pm by pleaseremove
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( pcxjockey7 )


Omnipotent One

Patron
Reply
Okay, So I am coding a new website, and I have been looking around for some ideas, and I saw something on someone's site, where when you click a link, the page changes, but the address in the address bar is:

http://sdlfjklsjdflsfj.com/index.php?x=visitors/content

what is that ?x=dfjjsdf and where do you get it?

-------
no.


5:17 am on Aug. 22, 2007 | Joined: April 2005 | Days Active: 582
Join to learn more about pcxjockey7 Pennsylvania, United States | Straight Male | Posts: 2,318 | Points: 17,164
LiveWire Humor
allsmiles


Enlightened One

Patron
Reply
That is a variable in the GET form. The variable (x) is referenced as $_GET['x']

-------
When they leave me, they're all smiles.
When they leave you, they're in tears.

5:31 am on Aug. 22, 2007 | Joined: Aug. 2007 | Days Active: 564
Join to learn more about allsmiles England, United Kingdom | Male | Posts: 8,800 | Points: 15,765
( pcxjockey7 )


Omnipotent One

Patron
Reply
Quote: from allsmiles at 8:31 am on Aug. 22, 2007

That is a variable in the GET form. The variable (x) is referenced as $_GET['x']


How do I use it?

-------
no.


5:32 am on Aug. 22, 2007 | Joined: April 2005 | Days Active: 582
Join to learn more about pcxjockey7 Pennsylvania, United States | Straight Male | Posts: 2,318 | Points: 17,164
PiXiE


24.24.1.1358

Patron
Reply
After getting the variable, you can use it in an if statement or in a query to display the content you want.

1:47 pm on Aug. 22, 2007 | Joined: July 2002 | Days Active: 1,663
Join to learn more about PiXiE Alberta, Canada | Straight Female | Posts: 4,837 | Points: 34,868
swya


Dairy Product Addict

Ad Free
Reply
For example:

http://somesite.com/?x=test

Code:
echo('$_GET[x]');

This function would echo "test"

-------
mad notes
I ♥ rickyspeople


7:27 pm on Aug. 22, 2007 | Joined: Aug. 2007 | Days Active: 54
Join to learn more about swya Nova Scotia, Canada | Straight Male | Posts: 360 | Points: 1,726
( pcxjockey7 )


Omnipotent One

Patron
Reply
Quote: from swya at 10:27 pm on Aug. 22, 2007

For example:

http://somesite.com/?x=test

Code:
echo('$_GET[x]');

This function would echo "test"


how do I use the function?

<a href="echo('$_GET[x]')">About Us</a>?

-------
no.


1:07 pm on Aug. 25, 2007 | Joined: April 2005 | Days Active: 582
Join to learn more about pcxjockey7 Pennsylvania, United States | Straight Male | Posts: 2,318 | Points: 17,164
pleaseremove


meh

Patron
Tech Support Leader
Reply
Code:
<a href="<?php echo $_GET['x']; ?>"><?php echo $_GET['y']; ?></a>


-------
Anyone who isn't confused really doesn't understand the situation
http://craigk.org/pictures/
Can you work out the code?

3:03 pm on Aug. 25, 2007 | Joined: Feb. 2005 | Days Active: 1,299
Join to learn more about pleaseremove England, United Kingdom | Straight Male | Posts: 5,945 | Points: 37,468
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic