Ah, solved the headers problem by moving the phpBB include stuff right to the top of the page, but now I'm getting other SQL errors.
Looks as though having the phpBB session stuff at the top of the page is stopping the passing of the variable $model.
Anyone know why?
PHP Code:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
include("<include path>/db_connect.php");
echo ("<p>Modelid: $model</p>");
$modelsql = "SELECT model, manu, amazon_asinuk, amazon_asinus FROM model LEFT JOIN manu ON manu_id=manu.id WHERE model.id=$model";
$modelfields = @mysql_query("$modelsql");
if (!$modelfields) {
echo("<p>ERROR2:" . mysql_error() ."\n SQL: $modelsql</p>" );
exit ();
}
gives me
Code:
Modelid:
ERROR2:You have an error in your SQL syntax near '' at line 1 SQL: SELECT model, manu, amazon_asinuk, amazon_asinus FROM model LEFT JOIN manu ON manu_id=manu.id WHERE model.id=
Bookmarks