Page 1 of 1

PHP MySQL

Posted: Tue Sep 10, 2013 3:05 am
by Gui
hi all,

I'm a beginner...Anyone can fix this error..
! ) Fatal error: Call to undefined function mysql_connect_error() in C:\wamp\www\Members\insert.php on line 3
Call Stack
# Time Memory Function Location
1 0.0007 248264 {main}( ) ..\insert.php:0


this is my script:

<?php
mysql_connect("localhost","root","","eSample");
if (mysql_connect_error())
{
echo "Failed to Connect!" .mysql_connect_error();
}

mysql_query("INSERT INTO members (Username, Password)
Values ('$_POST[Username]','$_POST[Password]')");
if (mysql_query())
{
die('Error:' .mysql_error());
}
echo "Record Added!";

mysql_close();
?>

Re: PHP MySQL

Posted: Fri Sep 13, 2013 1:36 am
by Gui
Tnx, i'v rather replace mysql_connect() instead of mysql_connect_error() then i put $this sign in condition. I can add my newacct now..