add all files

This commit is contained in:
Rucus
2026-02-17 09:29:34 -06:00
parent b8c8d67c67
commit 782d203799
21925 changed files with 2433086 additions and 0 deletions

39
lasuca/mobile/login.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
error_reporting(E_ERROR);
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="scdb"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// username and password sent from signup form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file "grower-main.php"
$_SESSION['myusername']="myusername";
$_SESSION['mypassword']="mypassword";
header("location:../growers/$myusername/mobile.php");
}
else {
$errorMessage = 'Sorry, wrong user id / password';
}
?>
<form name="form1" method="post" action="">
<p><input type="text" name="myusername" id="myusername" placeholder=" Grower ID"></p>
<p><input type="password" name="mypassword" id="mypassword" placeholder=" Password"></p>
<p class="submit"><input type="submit" name="Submit" value="Login"></p>
</form>