loipon
1:
<form action="make.php" method="post">
Username Desired: <input type="text" name="username" size="10">
Password Desired: <input type="password" name="password" size="10">
E-mail: <input type="text" name="email" size="10">
<input type="submit" value="submit" name="submit">
</form>
vazw auton twn kwdika se mia page pou dimiourgisa....
stin idia selida katw apo twn ''parapanw'' kwdika vazw
<?
$conn = mysql_connect("localhost","USERNAME","PASSWORD");
$db = mysql_select_db("spoono_db");
$username = $_POST["username"];
$password = $_POST["password"];
$result = MYSQL_QUERY("SELECT * from users WHERE username='$username'and password='$password'")
or die ("Name and password not found or not matched");
$worked = mysql_fetch_array($result);
$username = $worked[username];
$password = $worked[password];
$email = $worked[email];
<?
if($worked)
echo "Welcome $user! Your e-mail address is $email";
?>
poios mporei na mou eksigisei ti prepei na allaksw wste as poume mia aitisi gia kwdiko pou kanei kapoios na erxetai sto email mou,na to elenxo kai meta me kapoio password pou tha tou ftiaxnw na tou to steilw proswpika se email kai meta na mporei na kanei log in...
2:
PART II - LOGGING IN WITH NAME AND PASSWORD
<form action="getin.php" method="post">
Username: <input type="text" name="username" size="10">
Password: <input type="password" name="password" size="10">
<input type="submit" value="submit" name="submit">
</form>
2.1:
Again, it's identical to the signup.html except the action is now to "getin.php". So, the final step is to make the "getin.php". So create a new file and save it as "getin.php" and place this code:
<?
$conn = mysql_connect("localhost","USERNAME","PASSWORD");
$db = mysql_select_db("spoono_db");
$username = $_POST["username"];
$password = $_POST["password"];
$result = MYSQL_QUERY("SELECT * from users WHERE username='$username'and password='$password'")
or die ("Name and password not found or not matched");
$worked = mysql_fetch_array($result);
$username = $worked[username];
$password = $worked[password];
$email = $worked[email];
<?
if($worked)
echo "Welcome $user! Your e-mail address is $email";
?>
px leei username...pou prepei na valw to username pou thelw na dimiourgisw,wste kapoios me auto to username k password na mporei na kanei login
ys:tous kwdikous prepei na tous vazw se mia selida pou exw dimiourgisei i prepei na tous vazw se ksexwristes?
euxaristw
