LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 545 users online 165716 members 2091 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Video | Dictionary | News | FAQ
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
5 online / 40 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
Single page for this topic Email Print Favorite
( pcxjockey7 )


Enlightened One

Patron
Tech Support Leader
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 | 459 Days Active
Join to learn more about pcxjockey7 Pennsylvania, United States | Straight Male | 2267 Posts | 14660 Points
allsmiles


Visionary

Ad Free
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 | 261 Days Active
Join to learn more about allsmiles England, United Kingdom | Male | 5041 Posts | 9713 Points
( pcxjockey7 )


Enlightened One

Patron
Tech Support Leader
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 | 459 Days Active
Join to learn more about pcxjockey7 Pennsylvania, United States | Straight Male | 2267 Posts | 14660 Points
PiXiE


24.24.1.1358

Patron
Support Leader
Tech Support Leader
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 | 1620 Days Active
Join to learn more about PiXiE Alberta, Canada | Straight Female | 4819 Posts | 34009 Points
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 | 52 Days Active
Join to learn more about swya Nova Scotia, Canada | Straight Male | 360 Posts | 1686 Points
( pcxjockey7 )


Enlightened One

Patron
Tech Support Leader
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 | 459 Days Active
Join to learn more about pcxjockey7 Pennsylvania, United States | Straight Male | 2267 Posts | 14660 Points
pleaseremove


Dairy Product Addict

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 | 1055 Days Active
Join to learn more about pleaseremove England, United Kingdom | Straight Male | 5375 Posts | 29350 Points
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