This is a standalone service not related to SS in any way i just want to use your tables from subregengine so registered user can access chat inside SS.
I need code that will point to your tables with registered users.
$users[0]['userName'] = null;
$users[0]['password'] = null;
"null" values mean that user can enter anything and access chat without registering i dont like that.
Solution with reg page for chat is pfff terible double registration is anoying.
Question is. Is it possible to wrote code that will point to DB subsonicusers/table users/ colons username password.
For example u can access chat
http://hellscream.dyndns.org/subchat without registering acc
THX for reply
This is code for register page for ajax chat
- Code: Select all
<?php
include('PATHtoYOUR/chat/lib/data/users.php');
//check existing users
if ($_POST['username'])
{
//if user entered a name
}
//collect information from users.php
$user_amount = count($users);
for ($i=0; $i <=$user_amount;$i++);
{
//check usage of name
if (strtolower($_POST['username']) == strtolower($users[$i]['userName']))
$username_used = 1;
}
//make sure user chose a password
if (!$_POST['password'])
$password_error = 1;
//ensure username avalible and password chosen
if (!$username_used and !$password_error)
{
//present user id accepted message
print 'Your selection '.$_POST['username'].' was accepted... your account was created. You may now login!!!';
$next_user = $user_amount++;
$new_user_information = '
//remote created from '.$_SERVER['REMOTE_ADDR'].'
$users['.$next_user.'] = array();
$users['.$next_user.'][\'userRole\'] = AJAX_CHAT_USER;
$users['.$next_user.'][\'userName\'] = \''.$_POST['username'].'\';
$users['.$next_user.'][\'password\'] = \''.$_POST['password'].'\';
$users['.$next_user.'][\'channels\'] = array(0,1);
?>';
$file_edit = fopen('PATHtoYOUR/chat/lib/data/users.php', 'r+');
fseek($file_edit, -3,SEEK_END);
fwrite($file_edit, $new_user_information);
fclose($file_edit);
}
//end of php
?>
<table border="0" align="center">
<table border="0" align="center">
<tr>
<td>Use the form below to create a Chat user account.</td>
</tr>
<tr>
<td>
<!-- collect username and password information via form -->
<form action="" method="post">
Username:<input name="username" type="text" value="" /> 16 Character Maximum<br>
Password:<input name="password" type="text" value="" /> No requirements.<br>
<input name="submit" type="submit" value="Create" />
</form>
</td>
</tr>
</table>
</table>
I have errors related to writing something in php file
allow_url_fopen = On
allow_url_include = On
BUMP still dont like idea with double registration in SS