Page 1 of 1

how to get value on next page with out HTTP

Posted: Wed Oct 22, 2003 2:35 am
by itsmani1
Hello Every One.......

i want to get the info against all titles that are present on my page in the shape of links. can any body help me how to get the value of the title on next page with out using the HTTP Get or Post Methods.
Here is code of link ..........................

Code: Select all

<?php

while($row = mysql_fetch_assoc($res)) { 
            extract($row); 
echo "<a href="news_home.php"target="mainFrame">$title</a>";

?>
Regards

Posted: Wed Oct 22, 2003 2:53 am
by devork
use the session to keep track of arrays from page to page
$links= array();

Code: Select all

<?php 
session_start();
while($row = mysql_fetch_assoc($res)) { 
            extract($row); 
$lin="<a href="news_home.php"target="mainFrame">$title</a>";
$links[]=$lin;
echo $lin; }
session_register("links");
?>

now on the next page

Code: Select all

<?
session_start();
$mylinks=$_SESSION['links'];

this will give you all your links now use them  in array format ....
better read about array functions for more functionality

?>