Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2007
    Posts
    269
    Thanks
    28
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Mar 2008
    Posts
    118
    Thanks
    3
    Thanked 9 Times in 9 Posts
    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']
    Last edited by peteyb383; 05-11-2008 at 01:31 AM.

  • #3
    Regular Coder
    Join Date
    May 2008
    Location
    Ohio
    Posts
    231
    Thanks
    3
    Thanked 21 Times in 21 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •