hello everybody
Simple problem is driving me nuts. I've installed Exec-PHP which is working correctly It appears from the code below that the "id" variable is not getting passed correctly to the script below from the URL String. Here's the URL. Note it shows blank results for id=28
http://xbrlplanet.org/wp/?page_id=275?id=28
The script and Exec-PHP work prefectly otherwise if I hardcode the variable value as follows projects.id = '28'....so something is wrong with my GET statement..
Any ideas?
Thanks
Conor
<?php
//the database connection from config is tested and works correctly
include('../admin/config.php');
//get the variable from the URL String- this bit doesnt seem to be working
$id= $_GET['id'] ;
// get the data records from the database
$select = ("SELECT projects.id, projects.name, projects.cat, projects.url, projects.wiki, projects.wikiurl, projects.iso3166
FROM
projects
WHERE
projects.id = '$id'
");
$result = mysql_query($select) or die(mysql_error());
//Start table and loop thru results
echo "<table width=306 border=0 cellspacing=1 cellpadding=1>";
# Dislay your rows here in the loop
while($row = mysql_fetch_array($result))
{
extract ($row);
echo " <tr>";
echo " <td align=left valign=top width=25% bgcolor=#E9E9E9>Project id</td>";
echo " <td align=left valign=top width=75% bgcolor=#E9E9E9>" . $id. "</td>";
echo " </tr>";
echo " <tr>";
echo " <td align=left valign=top width=25% bgcolor=#E9E9E9>Agency</td>";
echo " <td align=left valign=top width=75% bgcolor=#E9E9E9>" .$name. "</td>";
echo " </tr>";
}
echo "</table>";
# close the loop and close the table
?>