tags:

views:

9

answers:

2

i want to pass a uid to next page through querystring.how i pass it and how i get it on next page?

+1  A: 

i want to pass a uid to next page through querystring.how i pass it and how i get it on next page?

You can create a link like this:

<a href="page.php?var=value">Go</a>

The variable-value pair after ? will create the query string. Later you can get the query string with $_GET array like $_GET['var'] for example.

Sarfraz
A: 

There are several ways to do that:

  1. For links: pass "uid" as GET parameter in all links: <a href='something.php?uid=$uid ... '

  2. For forms: pass "uid" as POST parameter, this can be done with <input type='hidden' name='uid' value='$uid'>

  3. Also, you may use cookies, see the following article for details: http://php.net/manual/en/function.setcookie.php

Kel