| Welcome Guest ( Log In | Register ) | Resend Validation Email |
|
PHP Magazine Feed![]() ![]() ![]() |
| adi658 |
Posted: February 08, 2010 09:21 pm
|
|
3rd Sem Group: ACTIVE Members Posts: 159 Member No.: 9,014 Joined: December 20, 2008 IGNOU:MCA Joining Year: 2009Study Centre:Dharwad, Karnataka |
hey thank you guys.. that was really quick and extremely helpful... thanx a ton... :thumbsup: :thumbsup: :thumbsup:
|
| IMSF |
|
|
Tech for GenY Group: Bot IGNOU:MCA Joining Year:Study Centre: |
|
|
|
| sumitarorasa |
Posted: February 08, 2010 09:56 am
|
|
6th Sem Group: ACTIVE Members Posts: 288 Member No.: 4,479 Joined: December 21, 2007 IGNOU:MCA Joining Year: Not ApplicableStudy Centre: |
@adi658
I made one mistake in my last post. Use $error = "some value"; header("Location: abc.php?a=$error"); instead of $error = "some value"; header("Location: abc.php?$error"); and use the value of a in the in abc.php page. Here Location is case insensitive. |
| Anubhav |
Posted: February 07, 2010 11:24 pm
|
|
M.Tech Group: Moderator Posts: 613 Member No.: 188 Joined: April 03, 2006 IGNOU:MCA Joining Year: 2007Study Centre:BIT Bangalore |
adi, you can do as follows:
header("Location:abc.php?param1=value1¶m2=value2&....¶mn=valuen); on the abc.php use if(isset($_GET["param1"])) { $val1=$_GET["param1"]; } and continue so on. also u can set session variables and use it. |
| sumitarorasa |
Posted: February 07, 2010 09:39 pm
|
|
6th Sem Group: ACTIVE Members Posts: 288 Member No.: 4,479 Joined: December 21, 2007 IGNOU:MCA Joining Year: Not ApplicableStudy Centre: |
@adi658,
You can pass the value in URL. Look at the following example <html> <head> <title> Find my Favorite Movie! </title> </head> <body> <?php //add this line: $myfavmovie = urlencode("Life of Brian"); //change this line: echo "<a href=\"moviesite.php?favmovie=$myfavmovie\">"; echo 'Click here to see information about my favorite movie!'; echo '</a>'; ?> </body> </html> use urlencode() also for safe transfer of variable from one page to second page. In the case of header you can pass the value in the same way like $error = "some value"; header("Location: abc.php?$error"); |
| adi658 |
Posted: February 07, 2010 08:12 pm
|
|
3rd Sem Group: ACTIVE Members Posts: 159 Member No.: 9,014 Joined: December 20, 2008 IGNOU:MCA Joining Year: 2009Study Centre:Dharwad, Karnataka |
hello friends..
i just want to know how to pass values using a LINK.. i mean.. i donno if its possible... but i have a couple of pages... 1st page contains information a link and the second page depends on the values passed... so i can do it using buttons.. but the problem is such that i NEED to use links and not buttons..(cannot use cookies also) ------------------------------- also i wanted to know how to pass values in header function in php like: header("Location: abc.php"); this DOES act as a redirect but shud even pass the value with it... does ne1 have the solution for both these problems??? :dunno: |
![]() |
![]() ![]() ![]() |