you are right the ID isn't being provided in the URL. it is coming up like this
i took out the the else statement and put the intval function before the value like this, but still.
itemdetails.php
PHP Code:
if( isset($_GET['id']))
{
$id = $_GET['id'];
}
$query = 'SELECT * FROM menu WHERE id = '.intval($id). ' LIMIT 1 ;';
// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
// see if any rows were returned
if (mysql_num_rows($result) > 0) {
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="itemdetails">
<tr>
<td width="1100" height="417" bgcolor="#FFFFFF" class="tento">
The url in itemdetails.php is coming from a page called menu2prueba.php
menu2prueba.php
PHP Code:
<?php
$query = "SELECT * FROM menu WHERE id IN ( 1, 2, 3, 4)";
// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
// see if any rows were returned
if (mysql_num_rows($result) > 0) {
// yes
// print them one after another
echo '<table class="felo">';
echo "<tr>";
echo'<td width="800" height="100%" bgcolor="#FFFFFF" class="quelo">';
while($row3 = mysql_fetch_row($result)) {
echo '
<table class="trelo" >
<tr>
<td width="152" rowspan="2" class="cebo">
<h3 align="center"><a href="itemdetails.php?id='.$row3['id'].'">
something should be wrong in the menu2page.php that it's not passing the id to the url in itemdetails.php.
what could that be help please.
it is returning false instead of
Bookmarks