chap chai rice arh?Originally posted by ndmmxiaomayi:Same lor...![]()
cup noodle is no good...get a proper meal!Originally posted by MoonIce:1 hr lunch le where got enough![]()
![]()
mayi: easy ma i also use numbers to replace words de lolx
sp: okie la eat cup noodle n watch dvd loh![]()
![]()
![]()
Yes...Originally posted by StarPuppy:chap chai rice arh?![]()
![]()
![]()
Oops... miss your post...Originally posted by MoonIce:1 hr lunch le where got enough![]()
![]()
mayi: easy ma i also use numbers to replace words de lolx
sp: okie la eat cup noodle n watch dvd loh![]()
![]()
![]()
lazy to go down n buy lunch ma, anyway i in a tight fit ba only left a mearger $10 to last me for 2 weeksOriginally posted by StarPuppy:cup noodle is no good...get a proper meal!![]()
![]()
what dvd u watching?![]()
![]()
![]()
Create log in and log out scripts. This part is simple.Originally posted by StarPuppy:hows lessons?![]()
![]()
![]()
//use db.php
require('db.php');
//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('Problem7');
//query the database
$select = "SELECT * FROM users";
$allRecords = mysql_query($select);
$sql = "SELECT * FROM users WHERE name = '".$name."' AND password = '".$password."'";
$results = mysql_query($sql);
$login = mysql_num_rows($results);
if ($login == 1){
echo "Your username and password are correct.";
} elseif ($login == 0) {
echo "Sorry, your username/password is incorrect.";
}
?>
mayi...i hate youOriginally posted by ndmmxiaomayi:Oops... miss your post...
1 hour is enough lah... minus travelling...
LOL... so easy, I long figure out what the comic is about liao...
Don't eat cup noodles so often...
|\|3\/\/1313![]()
Originally posted by MoonIce:lazy to go down n buy lunch ma, anyway i in a tight fit ba only left a mearger $10 to last me for 2 weeks![]()
![]()
Academy of Detective =p
Freak lah... I miss out a word. Too much codings.Originally posted by StarPuppy:mayi...i hate you![]()
![]()
![]()
read for meOriginally posted by ndmmxiaomayi:Create log in and log out scripts. This part is simple.
But to let them stayed logged in without clicking log out... another thing.
Cody:code://use db.php
require('db.php');
//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('Problem7');
//query the database
$select = "SELECT * FROM users";
$allRecords = mysql_query($select);
$sql = "SELECT * FROM users WHERE name = '".$name."' AND password = '".$password."'";
$results = mysql_query($sql);
$login = mysql_num_rows($results);
if ($login == 1){
echo "Your username and password are correct.";
} elseif ($login == 0) {
echo "Sorry, your username/password is incorrect.";
}
?>
Password
<br /><br />function checkEntry(myForm)<br />{<br />if (myForm.textfield.length==0) then<br />alert("Enter Name");<br />confirm( "you entered your name?");<br />myForm.textfield.focus();<br />}<br />//else<br />//myForm.submit(this);<br />
| Enter your name | ||||
| Password | ||||
Why are you commenting the else statement?Originally posted by StarPuppy:read for me
//else
//myForm.submit(this);
paiseh..forget to removeOriginally posted by ndmmxiaomayi:Why are you commenting the else statement?code://else
//myForm.submit(this);
Edit: Post too long...
javascriptingOriginally posted by Karkadann:More HTML programming?
Go test it.Originally posted by StarPuppy:paiseh..forget to remove![]()
![]()
![]()
error..the teacher comment..i also commentOriginally posted by ndmmxiaomayi:Go test it.
Obviously there are...Originally posted by StarPuppy:error..the teacher comment..i also comment![]()
![]()
i go home and practice more..now slacking in class![]()
![]()
![]()
dunno..that teacher dun teach..i rather learn myselfOriginally posted by ndmmxiaomayi:To help you a bit...
The first most blatant error: It doesn't prompt when nothing is entered...![]()
It's good to be diligent and learn on your own time and effort.Originally posted by StarPuppy:dunno..that teacher dun teach..i rather learn myself![]()
![]()
![]()
Got to figure out yourself.Originally posted by StarPuppy:dunno..that teacher dun teach..i rather learn myself![]()
![]()
![]()