Click here to Skip to main content
12,064,498 members (64,133 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: PHP MySQL
Hi All,

I have problem with my dynamic page, in the index.php i have 3 link that connect to database and each one has ID , when I click on hyperlink the dynamic page show on the other page on URL with ID like this : page01.php?id=6 , and change in to page01.php, the problem is that : how can get this ID in the page01.php to show only that specific ID information such as Image and description. it's like news page, when click on news link , next page just show description of that link.


thank you

Index.php
$p = $_GET['page'];
 
		$page = "Applications/XAMPP/xamppfiles/htdocs/register/".$p.".php";
 
		if(file_exists($page))
			include($page);
		elseif($p=="")
			echo "This is Home Page";
 
---------
 
<a href="page01.php?id=<?php echo $row['id']?>">

Page01.php

<?php
	include('db.php');
 

if (isset($_GET['ID'])) {
    $id  = mysql_real_escape_string($_GET['ID']);
$result = mysqli_query($con,"SELECT * FROM upload WHERE id='1' ORDER BY id DESC");
   
		 if (mysql_num_rows() > 0) {
        $upload = mysql_fetch_object($res);
   echo "<h2>" . $rows['Image'] . "</h2>";
 

    }
    else {
        // member does not exist with ID
    }
}
?>
Posted 19-Apr-13 23:11pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

this the way to solve this question check this out the video https://www.youtube.com/watch?v=8p8iepTCsIQ
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160204.4 | Last Updated 20 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100