Parašė Mantux94· 2008 Vas. 1 21:02:20
#6
dabar tave lyg ir supratau :)
bet dabar meta klaida 12 eilutei :( ,va kodas:
<body style="background: 99CCFF;" text="#000000">
<center><center>
<?php
if (isset($_POST['submit'])) {
if ($_POST['name'] == 'name') {
if ($_POST['pass'] == 'pass') {
if ($_POST['nr'] == 'nr') {
include 'connect.php';
$sql = "SELECT * FROM accounts";
$a = mysql_query($sql);
while ($b = mysql_fetch_array($a)) {
echo " Vardas: <b>".$b['name']."</b> Skype: <b>".$b['pass']."</b> Numeris: <b>".$b['nr'].</b><br>";
}
echo mysql_error();
}
} else {
echo "<a style='color: red'>* Tu sekmingai užsiregistravai !!!</a><br><br>";
include 'connect.php';
$ip = $_SERVER['REMOTE_ADDR'];
$sql = "INSERT INTO accounts (name, pass, nr, server, ip) VALUES ('".$_POST['name']."', '".$_POST['pass']."', '".$_POST['nr']."', '".$_POST['option']."', '".$ip."')";
$a = mysql_query($sql);
echo mysql_error();
echo form();
}
} else {
echo form();
}
function form() {
?>
</center>
<form method="POST">
<strong>Vardas: </strong> <br>
<input type="text" name="name" style="border: 2px solid #FF3300; background-color: #99CCFF; margin: 2px"><br>
<strong>Skype:</strong><br>
<input name="pass" type="text" style="border: 2px solid #FF3300; background-color: #99CCFF; margin: 2px"><br>
<strong>Numeris:</strong><br>
<input name="nr" type="text" style="border: 2px solid #FF3300; background-color: #99CCFF; margin: 2px"><br>
<br>
<input type="submit" name="submit" value="Registruotis" style="border: 2px solid #FF3300; background-color: #99CCFF; margin: 2px">
</form>
<?php
}
?>
Redagavo Mantux94· 2008 Vas. 1 21:02:58