Okay for at gøre det måske en smugle nemmere at hjælpe mig vil jeg poste de 2 sider jeg har lavet:
Den hvor kunden indtaster sit rcon som bliver posted vidre til genstart siden:
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr background="images/content.png">
<td height="30" colspan="2"><span class="overskrift">Server-<strong>Indstillinger</strong></span></td>
</tr>
<tr background="images/split.png">
<td height="6" colspan="2"></td>
</tr>
<tr valign="top" bgcolor="686868">
<td colspan="2" class="content"><p>
<FORM action="http://xx.xx.xx.xxx/whmcs/a/index.php" method="post">
<table>
<tr>
<td>
Rcon:<br><hr>
<input type='text' name='rcon' /><br/><input type="hidden" name="userid" value="<?php print $_SESSION['id']; ?>"><input type='submit' value='Submit'><br>
</td>
</tr>
</table>
</form>
<br>
<br>
<br>
</p></td>
</tr>
<tr>
<td height="1" colspan="2"></td>
</tr>
</table>
This is the site that all the data will get posted to and used at:
<?php
require_once("rcon_code.php");
$userid = $_POST['userid']
$RCON = $_POST["rcon"];
$COMMAND = "rcon quit";
$con = mysql_connect("localhost","root","xxxxxx");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("hejhej", $con) or die(mysql_error());
$sql = "SELECT * FROM xxxxxx_servers WHERE userid='" . $userid . "'";
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$IP = $Row['serverip'];
$PORT = $Row['serverport'];
}
mysql_close($con);
$srcds_rcon = new srcds_rcon();
$OUTPUT = $srcds_rcon->rcon_command($IP, $PORT, $RCON, $COMMAND);
}
?>
håberi kan hjælpe med denne her