ZFYL
02 Feb 2011, 05:19 PM
<?php
include_once "inc/mscon.php";
mysql_select_db("zfyl", $ddcon);
$result = mysql_query("SELECT nik,pas FROM 'zfyl' WHERE nik = '".$_POST["nik"]."'", $ddcon);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
$nikr = $row[0];
$pasr = $row[1];
if($_POST["pas"] == $pasr){
echo "Your Pass:".$pasr;
echo "Your Nick:".$nikr;
}
?>
echo "Your Pass:".$pasr;
echo "Your Nick:".$nikr;
}
?>
my problem in this script becouse it is dont work and write next
not selected databasae
for helping in undestand here the register form too
<?php
include_once "inc/mscon.php";
$na=$_POST["nik"];
$p98=$_POST["pas"];
//Create table
mysql_select_db("d2zfyl", $ddcon);
mysql_query("INSERT INTO zfyl
(nik, pas)
VALUES (".$na.", ".$p98.")",$ddcon);
mysql_close($ddcon);
echo "You succefully created the account. Your NICK NAME: ".$na." PASSWORD: ".$p98."";
?>
include_once "inc/mscon.php";
mysql_select_db("zfyl", $ddcon);
$result = mysql_query("SELECT nik,pas FROM 'zfyl' WHERE nik = '".$_POST["nik"]."'", $ddcon);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
$nikr = $row[0];
$pasr = $row[1];
if($_POST["pas"] == $pasr){
echo "Your Pass:".$pasr;
echo "Your Nick:".$nikr;
}
?>
echo "Your Pass:".$pasr;
echo "Your Nick:".$nikr;
}
?>
my problem in this script becouse it is dont work and write next
not selected databasae
for helping in undestand here the register form too
<?php
include_once "inc/mscon.php";
$na=$_POST["nik"];
$p98=$_POST["pas"];
//Create table
mysql_select_db("d2zfyl", $ddcon);
mysql_query("INSERT INTO zfyl
(nik, pas)
VALUES (".$na.", ".$p98.")",$ddcon);
mysql_close($ddcon);
echo "You succefully created the account. Your NICK NAME: ".$na." PASSWORD: ".$p98."";
?>