Quote:
Originally Posted by Marco van Herwaarden
You probably want to use $db->query_first() instead of $db->query().
also make sure that $getpage is cleaned before using it in the query.
|
thanx for reply. i have tried query_first, doesnt appear to make a diference. could u possible give me an example of a "working" query..... or better still suggest a place in the script, where i could drop my query in.... i want to place a link in the navbar. thanx
--------------- Added [DATE]1224954048[/DATE] at [TIME]1224954048[/TIME] ---------------
here is an of what i have tried so far:
here's where i up to.... inserted query here (in vba_cmps_include_top.php)
Code:
// Figure out which page to grab
$pagevar = $vba_options['portal_pagevar'];
if (defined('VBA_PAGE'))
{
$getpage = VBA_PAGE;
}
else if(isset($_REQUEST[$pagevar]))
{
$getpage = $_REQUEST[$pagevar];
//jfk
$get_forumid = $db->query("SELECT forumid FROM " . TABLE_PREFIX . "forum WHERE title LIKE '$getpage'");
//end jfk
i figured this is precisely where the page name is set, therefore this is the value i need to submit to the forum table....
then i have inserted this link here (in navbar template)
Code:
<!-- nav buttons bar -->
<div class="tborder" style="padding:$stylevar[cellspacing]px; border-top-width:0px">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr align="center">
<!--######### jfk #############-->
<td class="vbmenu_control"><a href="$vboptions[homeurl]">$vboptions[hometitle]</a></td>
<td class="vbmenu_control"><a href="http://ntra.org.uk/forums/forumdisplay.php?f="$get_forumid">Forum</a></td>
<!--######### end jfk ######### -->
i dont get a "reported error" exactly, however when i look at sourcecode in compiled page i see "<a href="http://ntra.org.uk/forums/forumdisplay.php?f="Resource id #15">