I want to display $title in one page and fetch all row data in my next page by using link. my code goes in this way: while($row = mysql_fetch_array($result)) { echo "<body bgcolor=\"#FFFAFA\">"; echo "<a href=\"2.php\">"; //I want 2.php to fetch all data related to title echo ucfirst($row['title']); echo "</a>"; echo "<br />"; echo ucfirst($row['description']); echo "<br />"; echo $row['city']; echo "<br />"; echo "</body>"; } this is my first page I want second page
try this //put all data field on session session_start(); $_SESSION['data'] = $row; PHP: after that, on 2.php file session_start(); $data = $_SESSION['data']; print_r($data); PHP:
put this line $_SESSION['data'] = $row; PHP: after this line while($row = mysql_fetch_array($result)) { PHP: