I need help doing the following :
1. Making an admin script for me in scar that changes php database users.
2. Having people connect to the database.
Thats all i can think of for now
Printable View
I need help doing the following :
1. Making an admin script for me in scar that changes php database users.
2. Having people connect to the database.
Thats all i can think of for now
Erm, you mean you want to make a script that like lets you modify users and stuff that are in a php database on the web? Kind of like RC but from the SCAR window itself? And why would the people be needed to connect to database. Post more details please.
Yes like adding deleting and changing the users statis to "suspended".
Then the user can connect if there not suspended or something.
Would you be using mysql for the database?
If so, I would think you need to have your script send in variables for the username and password or whatever. Then, check the user & pass, and after check for suspension, and return a true / false for loggedin/notloggedin.
Now this requires alot of changing of course, but this should give you an idea...
If you need some help doing this, let me know.
SCAR Code:Const
Username := 'user';
Password := 'pass';
TheClient := InitializeHTTPClient(False, False);
AddPostVariable(TheClient, 'user', Username);
AddPostVariable(TheClient, 'pass', Password);
GetPage := PostHTTPPageEx(TheClient, 'http://www.mysite.com/usercheck.php');
If GetPage = 'False' Then
WriteLN('Invalid Info or Account Suspended')
Else
WriteLN('Successfully Logged');
PHP Code:<?php
// page : usercheck.php
// Database connection stuff
$user = $_POST['user'];
$pass = $_POST['pass'];
// Check the username + password in database
$suspended = $row['suspended']; // checks the mysql database
If $user == True && $pass == True Then
{
If $suspended != False Then
echo('True');
else
echo('False');
}
else
echo('False');
?>