function calling
Posted: Tue Feb 16, 2010 4:38 pm
hello experts,
i created a file name "loginFunction.php" :
Then I created a file to connect the database, connect.php:
I opened a browser and typed:
http://localhost/practice/connect.php
The problem is I don't see any effect on phpmyadmin.The code even shows no error at all.
My server is running just fine.Cause I have tested.
Can anyone here to help me.
Sincerely,
ml
i created a file name "loginFunction.php" :
Code: Select all
function login()
{
$host="localhost";
$user="root";
$pass="";
$connect=mysql_connect($host,$user,$pass)or
die ("ERROR:REQUEST DENIED");
exit(1);
$dbname="wileyF";
mysql_query("CREATE DATABASE $dbname") or die("Couldn't Create Database: $dbname");
}
?>
Code: Select all
<?php
include "loginFunction.php";
login();
?>
http://localhost/practice/connect.php
The problem is I don't see any effect on phpmyadmin.The code even shows no error at all.
My server is running just fine.Cause I have tested.
Can anyone here to help me.
Sincerely,
ml