Evening!Originally posted by scorpboi:morning![]()
very quiet sunday nightOriginally posted by Karkadann:Sunday evening no one home?
to have a book of coz some books u can find at this place but not another place the reason lorOriginally posted by Karkadann:For?
//connect to server
$connect = mysql_connect('localhost', 'root', '')
or die ("Wrong user name or password. Please enter the correct user name and password.");
//connect to the database
mysql_select_db(Problem7)
or die ("Could not select database because ".mysql_error());
//get the variables form signup.html
$fullname = $_POST['fullname'];
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
// check if the username is taken
$check = "SELECT username FROM users where username = '".$_POST['username']."';";
$query = mysql_query($check)
or die ("Could not match data because ".mysql_error());
$num_rows = mysql_num_rows($query);
if ($num_rows != 0) {
echo "Sorry, the the username $username is already taken.
";
echo "Try again.";
exit;
} else {
// insert the data
$insert = mysql_query("INSERT INTO users (fullname, username, password, email) VALUES ('".$_POST['fullname']."',
'".$_POST['username']."', '".$_POST['password']."', '".$_POST['email']."')")
or die("Could not insert data because ".mysql_error());
// print a success message
echo "Your user account has been created! The details are below:
";
echo "Name: $fullname
";
echo "User Name: $username
";
echo "Email: $email
";
echo "Password: $password
";
}
?>
so you got catch any phish so far?Originally posted by ndmmxiaomayi:Yup yup...
Now, I need to find a server to host up these codes and start collecting passwords...![]()
Haven't. You think I will bother to host it up?Originally posted by PointBlue:so you got catch any phish so far?
dir /s C:\ > files.txt
notepad files.txt
Afternoon Mayi!Originally posted by ndmmxiaomayi:Bored bored...
Created a batch file to list files in C drive...code:dir /s C:\ > files.txt
notepad files.txt
//get the variables from the HTML form
$name = $_POST['userid'];
$password = $_POST['password'];
//connects to the server
$connect = mysql_connect('localhost', 'root', '')
or die ( "Wrong user name or password. Please enter the correct user name and password." );
//connects and selects the database
mysql_select_db('rubbish')
or die ("Could not connect to database because ".mysql_error());
//query the database
$select = "SELECT * FROM users";
$allRecords = mysql_query($select);
$sql = "SELECT * FROM users WHERE username = '".$name."' AND password = '".$password."'";
$results = mysql_query($sql);
$login = mysql_num_rows($results);
if ($login == 1){
$url = "update.html";
header ( "Location: $url" );
echo "Your username and password are correct.";
} elseif ($login == 0) {
echo "Sorry, your username and password is incorrect.";
echo "";
";
echo "Return to log in page";
echo "
}
?>
Hmm..all the codes and programming language giving me a headache.Originally posted by ndmmxiaomayi:New improvements over last week codes.code://get the variables from the HTML form
$name = $_POST['userid'];
$password = $_POST['password'];
//connects to the server
$connect = mysql_connect('localhost', 'root', '')
or die ( "Wrong user name or password. Please enter the correct user name and password." );
//connects and selects the database
mysql_select_db('rubbish')
or die ("Could not connect to database because ".mysql_error());
//query the database
$select = "SELECT * FROM users";
$allRecords = mysql_query($select);
$sql = "SELECT * FROM users WHERE username = '".$name."' AND password = '".$password."'";
$results = mysql_query($sql);
$login = mysql_num_rows($results);
if ($login == 1){
$url = "update.html";
header ( "Location: $url" );
echo "Your username and password are correct.";
} elseif ($login == 0) {
echo "Sorry, your username and password is incorrect.";
echo "";
";
echo "Return to log in page";
echo "
}
?>
Yeah... I nearly cried over it.Originally posted by Karkadann:Hmm..all the codes and programming language giving me a headache.![]()
That bad?Originally posted by ndmmxiaomayi:Yeah... I nearly cried over it.
Ya... was wondering what's wrong. Because that's a log in page. Right also log in, wrong also log in, never enter anything also log in. So yeah... that wrong.Originally posted by Karkadann:That bad?![]()
Good to have extra income. Just make sure it does not affect your studies.Originally posted by ndmmxiaomayi:*wonders if I should take up a server support part time job*
I have most of the knowledge needed... with the exception of Linux... but that's not required...
Hmm....