mistypotato Posted August 22, 2008 Share Posted August 22, 2008 Is there an obvious reason why this is resulting in a blank page ? print "userid is $userid"; Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/ Share on other sites More sharing options...
awpti Posted August 22, 2008 Share Posted August 22, 2008 Look at your error_log file. Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623414 Share on other sites More sharing options...
Fadion Posted August 22, 2008 Share Posted August 22, 2008 Is there any code above that or it's just that line? Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623421 Share on other sites More sharing options...
mistypotato Posted August 22, 2008 Author Share Posted August 22, 2008 it says unexpected ';' This is direcltly above it.... $userdata->save(); //BEGIN Insert Data into history print "userid is $userid"; Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623422 Share on other sites More sharing options...
Fadion Posted August 22, 2008 Share Posted August 22, 2008 Mate, post the whole code!! EDIT: You edited your post. Post more code, is it a problem for you? Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623425 Share on other sites More sharing options...
mistypotato Posted August 22, 2008 Author Share Posted August 22, 2008 Sorry....just dont know HOW much to post. But, in the meantime, I looked at the SQL server logs and it looks like everything is working EXCEPT, it's substituting THIS for the value of the variable.... 'Resource id #22' Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623432 Share on other sites More sharing options...
Fadion Posted August 22, 2008 Share Posted August 22, 2008 I'm sure you don't have a 10.000 lines of code script, so post some lines above the problematic line so we can understand the problem. Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623436 Share on other sites More sharing options...
mistypotato Posted August 23, 2008 Author Share Posted August 23, 2008 <?php // ###################### Start process logout ####################### function process_logout() { global $vbulletin; // clear all cookies beginning with COOKIE_PREFIX $prefix_length = strlen(COOKIE_PREFIX); foreach ($_COOKIE AS $key => $val) { $index = strpos($key, COOKIE_PREFIX); if ($index == 0 AND $index !== false) { $key = substr($key, $prefix_length); if (trim($key) == '') { continue; } vbsetcookie($key, '', 1); } } if ($vbulletin->userinfo['userid'] AND $vbulletin->userinfo['userid'] != -1) { // init user data manager $userdata =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT); $userdata->set_existing($vbulletin->userinfo); $userdata->set('lastactivity', TIMENOW - $vbulletin->options['cookietimeout']); $userdata->set('lastvisit', TIMENOW); $userdata->save(); //BEGIN Insert Data into history //print "userid is $userid"; //$rlemail = $vbulletin->db->query_first("SELECT email FROM " . TABLE_PREFIX . "user WHERE userid = " . $vbulletin->userinfo['userid'] . ) or die(" rlemail error: $userid" . mysql_error()); mysql_connect("localhost","user","1234567") or die ("Unable to connect to MySQL server."); $rlemail = mysql_query("SELECT email FROM Myforum.user WHERE userid = " . $vbulletin->userinfo['userid'] . "") or die(" rlemail error: ".$vbulletin->userinfo['userid']. mysql_error()); $db = mysql_select_db("Mycustomers") or die ("Unable to select requested database."); $totalrows = mysql_num_rows($rlemail); //print "$totalrows"; //print "rlemail is $rlemail"; //$rlemail = "[email protected]"; $Update2 = mysql_query("UPDATE Mycustomers.customers SET lastforumvisit = Now() WHERE Email = '$rlemail'") or die(" Update2 Insert error:" . mysql_error()); // END Insert Data into history // make sure any other of this user's sessions are deleted (in case they ended up with more than one) $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "session WHERE userid = " . $vbulletin->userinfo['userid']); } $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "session WHERE sessionhash = '" . $vbulletin->db->escape_string($vbulletin->session->vars['dbsessionhash']) . "'"); if ($vbulletin->session->created == true) { // if we just created a session on this page, there's no reason not to use it $newsession =& $vbulletin->session; } else { ?> Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623558 Share on other sites More sharing options...
revraz Posted August 23, 2008 Share Posted August 23, 2008 One problem you have is you are doing your first QUERY before you even select your DB. Your second problem is you are using $rlemail in your UPDATE query when $rlemail is a Resource ID, not a email data field. Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623679 Share on other sites More sharing options...
DeanWhitehouse Posted August 23, 2008 Share Posted August 23, 2008 have you turned error reports on?? error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/120939-totally-blank-page/#findComment-623798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.