Hello everyone,
i am in need of some desperate help after about 3 hours of trying to figure this out on my own.
Im currently developing a beta game server panel all from a batch file but would like to have something called login.php with 3 buttons for clients. STOP START and RESTART
Basically i want this login.php to be able to call either a batch file or a .exe file depending on the game. Some games run a server using .bat and some use a .exe for server files.
The login.php file would be run on the same server as the batch file but for a user they would have to go to [url]http://ip/login.php
I want to be able to have 3 buttons on the middle of the page once logged in that says START | STOP | RESTART
Most likely images not php buttons but if someone can give me the code both ways that would help for my opion of which to use.
Now at the top once logged in i want there to be the option to | Change Login Information | Logout
these 2 options at the top left logged in.
Im not using a remote database php authentication for the user logins as i want them to manually change their passwords and usernames from the .php file.
here is my code for that
<?php
// Define your username and password
$username = “someuser”;
$password = “somepassword”;
if ($_POST[‘txtUsername’] != $username || $
?>
<h1>Login</h1>
<form name=”form” method=”post” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
<p><label for=”txtUsername”>Username:</label>
<br /><input type=”text” title=”Enter your Username” name=”txtUsername” /></p>
<p><label for=”txtpassword”>Password:</label>
<br /><input type=”password” title=”Enter your password” name=”txtPassword” /></p>
<p><input type=”submit” name=”Submit” value=”Login” /></p>
</form>
<?php
}
else {
?>
<p>This is the protected page. Your private content goes here.</p>
<?php
}
?>
This is the code for the login screen. As well as help with my login.php if someone could make it so that once logged in you can edit this username and password from Edit Account Information section.
Here is all i have for the login.php to call a batch file or exe file and i have had 0% suscess.
<html>
<body>
<h1>example</h1>
<?php
if(isset($_POST[‘submit’]))
{
exec(“cmd.exe /c test.bat”)
echo “Done!”;
} else {
// display the form
?>
<form action=”” method=”post”>
<input type=”submit” name=”submit” value=”DO IT!”>
</form>
<?php
}
?>
</body>
</html>
HELP IS GREATLY APPREICATED!