I will put the good source for you guys haha
if you really want lol..
Do one page: buy.php and put this code:
PHP Code:
<?php
//Created by Şήøωў!
require('config.php');
function do_alert($msg){
echo '<script type="text/javascript">alert("' . $msg . '"); </script>';
}
mysql_connect($dbhost, $dbuser, $password)or error("Could not connect: ".mysql_error());
mysql_select_db($dbname) or error(mysql_error());
$sql = mysql_query("UPDATE server_1_players SET shipId='".$_GET["idship"]."' where playerID='".$_GET["playerID"]."'");
if($sql)
{
echo do_alert("Ship changed!");
}
else echo do_alert("The newbie admin dont know how to edit the mysql config.php!");
header("Location: index.php");
?>
After do another page config.php and put this:
PHP Code:
<?php
//Created by Şήøωў!
$dbhost = 'localhost'; //HERE EDIT! FOR NEWBIES! haha
$dbname = 'do';//HERE EDIT! FOR NEWBIES! haha
$dbuser = 'root';//HERE EDIT! FOR NEWBIES! haha
$password ='';//HERE EDIT! FOR NEWBIES! haha
?>
Here the litle code u have to put where u want the button!
Change idship.
PHP Code:
<form name="buy" action="buy.php?idship=1&playerID=<?php echo $Users->DataRow['playerID']; ?>" method="post">
<input type="submit" value="Buy!"/>
</form>
*ps for idiots: dont try this at home!!!!