Shark biologi Paul Clerkin menjalankan kajian di Lautan Hindi di selatan pada 2012 yang menghasilkan penemuan ikan jerung yang jarang dilihat , termasuk kemungkinan lapan spesies baru.
Monday, 19 August 2013
Wednesday, 14 August 2013
How To fix Scam Samsung galaxy S I9000
Posted at
Wednesday, August 14, 2013
If your flash Custom rom or Stock rom to your SGS1 but got problem, that mean your is fake or scam.
sticker under battery its written :GT-i9000 and I9000GSMH (scam)
Actually the phone model is M110S
sticker under battery its written :GT-i9000 and I9000GSMH (scam)
Actually the phone model is M110S
Samsung M110S Galaxy S |
Common problems :
- No Network
- Home button not working
- Unknown baseband
- No Imei
- No sound
Wednesday, 7 August 2013
Cara nak tengok gambar yg suda diupload dalam blogger
Posted at
Wednesday, August 07, 2013
Dimana gambar blogger atau blogspot disimpan?
Bagaimana untuk tengok gambar yg suda diupload?
pertama pergi ke www.google.com SIGN IN akaun google anda
Disinilah gambar-gambar disimpan
Bagaimana untuk tengok gambar yg suda diupload?
pertama pergi ke www.google.com SIGN IN akaun google anda
Kemudian Klik More dan Klik Photos
Anda juga boleh padam gambar-gambar yang diupload dalam blogger
Thursday, 1 August 2013
PHP simple login system with session
Posted at
Thursday, August 01, 2013
Step 1 : Create database
You should already create database name. then create table name Users
You can create from phpmysql or other tools.
Sql Code
CREATE TABLE `users` ( `ID` int(2) NOT NULL AUTO_INCREMENT, `Fullname` varchar(32) NOT NULL, `Username` varchar(32) NOT NULL, `Password` varchar(32) NOT NULL, PRIMARY KEY (`ID`) )
Step 2 : Create php file
Step 3 : php code database connection
database.php
<?php $dbhost = "localhost"; $dbuser = "root"; //your username database $dbpass = ""; //Your password database $dbname = "test"; //Your database name $dblink = mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); ?>
Step 4 : login code and html form
<?php session_start(); include("database.php"); if(isset($_POST['login'])){ $username = $_POST['username']; $password = $_POST['password']; if(!empty($username) && !empty($password)){ //Username and password must filled $sql_login ="SELECT `ID`, `Fullname`, `Username`, `Password` FROM `users` WHERE `Username`='".$username."' AND `Password`='".$password."'"; $result = mysql_query($sql_login,$dblink);//execute the sql command $rows = mysql_fetch_assoc($result); if($rows['Username'] == $username && $rows['Password'] == $password){ $_SESSION['fullname'] = $rows['Fullname']; header('Location: login_success.php'); }else{ //Wrong username or password echo "<script>alert('invalid username or password please try again')</script>"; } mysql_close(); }else{ echo "<font color=\"red\">Username and Password field are required</font>"; } } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Login</title> </head> <body> <div style="width:350px;margin:0 auto;background-color:#0099FF;margin-top:50px;padding:5px;border:1px solid #666"> <h2>Login</h2> <center> <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> <p>Username <input type="text" name="username" maxlength="32" /> </p> <p>Password <input type="password" name="password" maxlength="32" /> </p> <p><input type="submit" name="login" value="LOGIN" /></p> </form> </center> </div> </body> </html>
Step 5 : login_success.php and logout.php code
login_success.php
<?php session_start(); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Login Successful</title> </head> <body> <h2>Login Successful</h2> <p>Hello <b><?php echo $_SESSION["fullname"] ?></b> <a href="logout.php">[LOGOUT]</a></p> </body> </html>
now create new file name logout.php
logout.php code
<?php session_start(); session_destroy(); header('Location: login.php'); #redirect to login page ?>
Finish now its time to test
before that you need to insert user on your database.for example
Tuesday, 16 July 2013
VB.NET Get Identity After Insert Query
Posted at
Tuesday, July 16, 2013
Get the identify or auto number after insert query from ms access database
Example Coding for creating new invoice
Private Sub CreateInvoiceQuery()
Dim InsertCom = Me.InvoiceDataAdapterX.Adapter.InsertCommand
InsertCom.CommandText = "INSERT INTO `invoice` (`date_created`, `customerid`) VALUES (?, ?)"
InsertCom.Parameters(0).Value = CType(Me.DateTimePicker1.Value, Date)
InsertCom.Parameters(1).Value = 1
InsertCom.Connection.Open()
InsertCom.ExecuteNonQuery()
InsertCom.CommandText = "SELECT @@IDENTITY"
invoice_id = InsertCom.ExecuteScalar
NoInvoiceTextBox.Text = invoice_id.ToString("D6")
InsertCom.Connection.Close()
InsertCom.Dispose()
Debug.WriteLine(invoice_id.ToString)
End Sub
Subscribe to:
Posts
(
Atom
)