Monday 3 September 2018
Subscribe to:
Post Comments (Atom)
<?php
$db_name = "animator"; // Database name
$link = mysql_connect('localhost', 'root', 'admin');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db_name) or die("Could not connect to Database" .mysql_error());
$username = $_POST['fname'];
$passwords = $_POST['pass'];
$email = $_POST['email'];
mysql_query($link,"INSERT INTO 'account'('username', 'passwords', 'email') VALUES
($username , $passwords , $email)");
mysql_close($link);
?>
<?php
error_reporting(E_ALL);
ini_set('display_errors',"On");
$db_name = "animator"; // Database name
$link = mysql_connect('localhost', 'root', 'admin');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
//echo 'Connected successfully';
mysql_select_db($db_name) or die("Could not connect to Database" .mysql_error());
$username = $_POST['fname'];
$passwords = $_POST['pass'];
$email = $_POST['email'];
$query = "INSERT INTO account (username, passwords, email) VALUES ('$username',
'$passwords', '$email')";
$result = mysql_query($query);
echo $username;
mysql_close($link);
?>
mysql_query("INSERT INTO account (username, passwords, email)
VALUES ('$username', '$passwords', '$email')", $link);
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment