ok I am getting "A" chart to display partly.... wrong data and missing info in the header and X axis label....
not getting any errors popping up from SQL stuff.
I think I may be reading wrong info from the database.
At the end of this code in my login.php
// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && (!$userdata['session_logged_in'] || isset($HTTP_POST_VARS['admin'])) )
{
$username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
$sql = "SELECT user_id, username, user_password, user_active, user_level, user_rank, user_actviate_date, user_expire_date, user_regdate
FROM " . USERS_TABLE . "
WHERE username = '" . str_replace("\\'", "''", $username) . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql);
}
if( $row = $db->sql_fetchrow($result) )
{
I added one line
setcookie("userweather",$username);
This is the start of my chart.php
<?php
if (isset($_COOKIE["userweather"])) {
$username = $_COOKIE["userweather"];
}
$server = "localhost";
$user = "myusername";
$password = "mypassword";
$database = "mydatabase";
mysql_connect($server, $user, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
$query = mysql_query("SELECT `user_station` FROM `forum_users` WHERE `username`=`$username`");
mysql_close();
$user_station=$query;
$url = 'http://www.nws.noaa.gov/cgi-bin/mos/getmav.pl?sta='.$user_station;
$handle = fopen($url, "r"); $contents = file_get_contents($url);
fclose($handle);
did I miss sometrhing?