Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-10-2008, 09:42 PM   PM User | #1
zodehala
Regular Coder

 
Join Date: Dec 2007
Posts: 269
Thanks: 28
Thanked 0 Times in 0 Posts
zodehala can only hope to improve
moving value to other page via link

suppose that i have like folllowing link in y.php

Code:
<a href='x.php?t=".$row["z"]."'>zodehala</a>
when i clicked this link how can i move value of $row["threadid"] variable to x.php
zodehala is offline   Reply With Quote
Old 05-11-2008, 12:28 AM   PM User | #2
peteyb383
Regular Coder

 
Join Date: Mar 2008
Posts: 118
Thanks: 3
Thanked 9 Times in 9 Posts
peteyb383 is an unknown quantity at this point
Code:
<a href='x.php?t=<?php echo $row['z']; ?>&id=<?php echo $row['threadid']; ?>'>zodehala</a>
Where id is the name of the GET variable that you want for $row['threadid']
__________________
Petey

View my Blog and Support my Mission!

Last edited by peteyb383; 05-11-2008 at 12:31 AM..
peteyb383 is offline   Reply With Quote
Old 05-11-2008, 02:39 AM   PM User | #3
derzok
Regular Coder

 
Join Date: May 2008
Location: Ohio
Posts: 231
Thanks: 3
Thanked 21 Times in 21 Posts
derzok is an unknown quantity at this point
Not sure if this is what you're asking, but in x.php, you'll need a line like:

Code:
$variable = $_GET['t']; // $variable becomes the value of t= in the URL's query string
If you're going to do anything with that variable BE CAREFUL! People can easily inject script or SQL commands into GET variables causing very dangerous results.

http://en.wikipedia.org/wiki/Code_in...Code_Injection
derzok is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:20 PM.


Advertisement
Log in to turn off these ads.