Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts
Sunday, 30 March 2014
JAVA PROGRAMS-Hierarchical Inheritance in Java
Hierarchical Inheritance in Java
Program Name:- hiear.java
import java.io.*;
class vehicle
{
String regno;
int model;
vehicle(String r,int m)
{
regno=r;
model=m;
}
void display2()
{
System.out.print("\nRegistration number\t:"+regno);
System.out.print("\nModel\t\t\t:"+model);
}
}
class roadvehicle extends vehicle
{
int noof;
roadvehicle(String r,int m,int n)
{
super(r,m);
noof=n;
}
void display()
{
System.out.print("\n\n\t Road Vehicle\n\n");
super.display2();
System.out.print("\nNumber of wheel\t:"+noof);
}
}
class watervehicle extends vehicle
{
int nn;
watervehicle(String s,int m,int n)
{
super(s,m);
nn=n;
}
void display1()
{
System.out.print("\n\n\t Water Vehicle\n\n");
super.display2();
System.out.print("\nNumber of leaf\t:"+nn);
}
}
public class hiear
{
public static void main(String[]args)
{
roadvehicle r;
watervehicle w;
r=new roadvehicle("TN 58 s 5482",2011,2);
w=new watervehicle("TN 57 A 5828",2011,10);
r.display();
w.display1();
}
}
Monday, 3 March 2014
PHP TUTORIALS-Create Login Page with DataBase-PhpMyAdmin-Mysql
PHP TUTORIALS Create Login Page with DataBase-PhpMyAdmin-Mysql
FULL DETAILS..
PHP TUTORIALS-Create Login Page with Database using PhpMyAdmin-Mysql
PHP TUTORIALS Create Login Page with DataBase PhpMyAdmin Mysql PART2
Program Name :- htmllogin.html
<html>
<head>
<body bgcolor="">
<font>
<center><h1>Login</h1></center>
</font>
<form action="login.php" method="POST">
Username:<input type="text" name="uname">
Password:<input type="password" name="pass"><br>
<input type="submit" value="login" name="submit">
</form>
</body>
</head>
</html>
Program Name:- login.php
<?php
require ('sql_connect.php');
if (isset($_POST['submit'])){
$username=mysql_escape_string($_POST['uname']);
$password=mysql_escape_string($_POST['pass']);
if (!$_POST['uname'] | !$_POST['pass'])
{
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('You did not complete all of the required fields')
window.location.href='htmlogin.html'
</SCRIPT>");
exit();
}
$sql= mysql_query("SELECT * FROM `login_users` WHERE `username` = '$username' AND `password` = '$password'");
if(mysql_num_rows($sql) > 0)
{
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Login Succesfully!.')
window.location.href='htmllogin.html'
</SCRIPT>");
exit();
}
else{
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Wrong username password combination.Please re-enter.')
window.location.href='htmllogin.html'
</SCRIPT>");
exit();
}
}
else{
}
?>
Program Name:- sql_connect.php
<?php
mysql_connect("localhost", "root", "") or die("mysql connection is failure.");
mysql_select_db("login") or die("Database does not exists.");
?>
Labels:
-,
connect,
Create,
DataBase,
db,
FULL DETAILS,
html,
Login,
mydmin,
Mysql,
page,
PHP TUTORIALS,
PhpMyAdmin,
Program,
web,
with
Friday, 28 February 2014
PHP TUTORIALS-GET METHOD
CODING FOR GET METHOD WITH EXAMPLE PROGRAM SESSON-2
Program name:- htmlget1.php
<html>
<head>
<body>
<h1><center>GET METHOD</center></h1>
<form action="get1.php" method="get">
Name:<input type="text" name="name">
Email:<input type="text" name="email">
<input type="submit" value="submit">
</body>
</head>
</html>
get1.php
Welcome<?php echo $_GET["name"];?>
Your Email Address is: <?php echo $_GET["email"];?>
Labels:
connect,
Create,
DataBase,
db,
FULL DETAILS,
get,
give,
html,
HTML Program Name:- htmlgett1.html,
mydmin,
Mysql,
page,
PHP TUTORIALS,
PhpMyAdmin,
sql,
web
Subscribe to:
Posts (Atom)