CREATE TABLE user (
username varchar(20),
password varchar(32),
PRIMARY KEY (username)
)
CREATE TABLE upload (
id int(11) auto_increment,
name varchar(30),
type varchar(30),
size int(11),
content mediumblob,
username varchar(20),
PRIMARY KEY (id)
)
INSERT INTO `user` VALUES ('a', 'pass1');
INSERT INTO `user` VALUES ('b', 'pass2');
Login Sukses";
echo "
// tampilkan menu user
echo "
[ Upload ] [ Daftar File ] [ Logout ]
";
}
else
{
// jika kedua password tidak cocok, maka login gagal
echo "
}
?>
Maaf Anda belum login";
exit;
}
?>
Anda login sebagai : ".$username."";
echo "
[ Upload ] [ Daftar File ] [ Logout ]
";
echo "
Silakan upload file
";
?>
// form untuk upload
username varchar(20),
password varchar(32),
PRIMARY KEY (username)
)
CREATE TABLE upload (
id int(11) auto_increment,
name varchar(30),
type varchar(30),
size int(11),
content mediumblob,
username varchar(20),
PRIMARY KEY (id)
)
INSERT INTO `user` VALUES ('a', 'pass1');
INSERT INTO `user` VALUES ('b', 'pass2');
Login User
Login Sukses";
echo "
Anda login sebagai : ".$username."
";// tampilkan menu user
echo "
[ Upload ] [ Daftar File ] [ Logout ]
";
}
else
{
// jika kedua password tidak cocok, maka login gagal
echo "
Maaf login gagal
";}
?>
Maaf Anda belum login";
exit;
}
?>
Anda login sebagai : ".$username."";
echo "
[ Upload ] [ Daftar File ] [ Logout ]
";
echo "
Silakan upload file
";
?>
// form untuk upload