I need to make a PHP code which put this number into the table inside "mybb_users" in the table called "CheckUser".
The number which should be set in is the following: 1.0.0
Can anyone help me make this code?
Can you elaborate? For which users? Does this variable change at all? If it's just a static variable then you're better off using the cache.
(2011-11-08, 11:33 AM)Malcolm. Wrote: [ -> ]Can you elaborate? For which users? Does this variable change at all? If it's just a static variable then you're better off using the cache.
It should only be for the user which are on the PHP page.
What PHP page? What are you trying to do??
We can't help you unless we know exactly what you want. Your request is too generic.
(2011-11-08, 11:40 AM)Malcolm. Wrote: [ -> ]What PHP page? What are you trying to do??
We can't help you unless we know exactly what you want. Your request is too generic.
I am trying to make a page called page.php
When a user visit that site, the page should put this code "1.0.0" into the users table under "CheckUser".
The following should suffice.
<?php
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'page.php');
require_once "./global.php";
if(!$mybb->user['usergroup'] == 1) {
$db->update_query('users', 'CheckUser=\'1.0.0\'', 'uid='.intval($mybb->user['uid']));
}
?>