How do I make a link from a variable?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
killer1390
Forum Newbie
Posts: 2
Joined: Wed Apr 22, 2009 7:05 pm

How do I make a link from a variable?

Post by killer1390 »

Hi, I need a link that when you click it, it sets a php variable.How do I do this?
:D
User avatar
jazz090
Forum Contributor
Posts: 176
Joined: Sun Apr 12, 2009 3:29 pm
Location: England

Re: How do I make a link from a variable?

Post by jazz090 »

server side or client side? cos if u wanna do it server side, just post the data and catch it with $_POST. if u wanna go client side however your best bet would be to use javascript and store the variable as a java variable and attach the function to the link. if however ur working with $_SESSION, just use AJAX. you cannot possibly change the variable once the script has finished running (unless u initialize it again which would be the same as refreshing, posting or running an AJAX)
killer1390
Forum Newbie
Posts: 2
Joined: Wed Apr 22, 2009 7:05 pm

Re: How do I make a link from a variable?

Post by killer1390 »

You just confused the crumbs out of me. Definetaly client side.
Post Reply