Parašė avice· 2010 Lie. 27 19:07:22
#65
dar 1 klausimelis:
register.php
<?php
$con = mysql_connect("localhost","root","xxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("ip", $con);
$ipaddress = $_SERVER['REMOTE_ADDR'];
$result = mysql_query("SELECT * FROM ip WHERE ip = '$ipaddress'");
if(mysql_num_rows($result) != 0)
{
echo "Toks ip jau egzistuoja";
}
else
{
include("zs.php");
exit;
}
mysql_close($con);
?>
zs.php
<?php
$vardas = $_POST["vardas"];
$result = mysql_query("SELECT * FROM ip WHERE vardas = '$vardas'");
if(mysql_num_rows($result) != 0)
{
echo "Toks vardas jau egzistuoja";
}
else
{
echo "Kodass";
exit;
}
?>
ir kai einu i register tikrina pirma varda o ne ip ka blogai darau :D nors zinau , kad viska blogai ;D
Kas pades?