For all my tutorials go to: http://websofttutorials.com/ For any question go to: http://forum.websofttutorials.com/ In this tutorial I will teach you how to connect to …
Original source
For all my tutorials go to: http://websofttutorials.com/ For any question go to: http://forum.websofttutorials.com/ In this tutorial I will teach you how to connect to …
Original source
23 responses to “php tutorials in hindi / urdu – 46 – how to connect to database in php mysql”
can u help me in making a Admin Permissions??
<?php
mysql_connect('localhost','root','');
?>
then run brouser
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocstestconnection.php:2 Stack trace: #0 {main} thrown in C:xampphtdocstestconnection.php on line 2
jub mysql_connect function bnaty hai tu error ajati hy k undefined function, how it will b defined if it is builtin
why mysqli_select_db are not working ? but or die are working.
Sir jo ye function h connection ke mysqli_connect vgara yee mere blue mein nai a rhe…
nice
try this-
<?php
$host='localhost';
$username='root';
$password='';
$dbname='student';
@mysql_connect($host,$username,$password,$dbname);
?>
Hi,
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in line 6
and code is:
<?php
$host='localhost';
$username='root';
$password='';
$dbname='student';
@mysql_connect($host,$username,$password);
@mysql_select_db($dbname);
?>
Please help me
try{
$con = new PDO ("mysql:host=localhost;dbname=students_record","root","");
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$add = $_POST['address'];
$adm = $_POST['joining_date'];
//$month = $_POST['month'];
//$year = $_POST['year'];
$insert = $con->prepare("INSERT INTO students_record (name,email,address,joining_date) values(:name,:email,:address,:joining_date)");
$insert->bindParam(':name',$name);
$insert->bindParam(':email',$email);
$insert->bindParam(':address',$add);
$insert->bindParam(':joining_date',$adm);
//$insert->bindParam(':month',$month);
//$insert->bindParam(':year',$year);
$insert->execute();
}
}
catch(PDOException $e)
{
echo "error".$e->getMessage();
}
data wamp server se offline project me to insert ho raha h but. hosting wale phpmyadmin me nahi ho raha insert.
sir what is the error showing ''
Parse error: syntax error, unexpected 'mysql_select_db' (T_STRING) in C:xampphtdocsconnection.php on line 7"
dera user sign up or login sekho do
mysql_connect('localhost','root',''); fatal error q aaa raha hai
please answer its urgent
I have created database and added in msql_select_db but than to its showing not connected
hello sir i whatch video of connect database but it not working could u give me solution for that
<? php
mysql_connect('localhost','root','') or die();
mysql_select_db('students')
?>
my database is that of u
and when i give any wrong password it not give any error;
hello sir i want to connect a php form with my sql workbench but nhi ho paa rha meine mysql workbench me database bnaya so plz temme how do i connct
how to connect it with the phone message
sir will you please help me i am getting the following error when i wants to connect to mysql db..
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocsCMSincludesdatabase.php:3 Stack trace: #0 C:xampphtdocsCMSindex.php(26): include() #1 {main} thrown in C:xampphtdocsCMSincludesdatabase.php on line 3
This is a Good Example
sir muje sey nah horaha hy php connection.php ki file mai ney banali hy but muje sey sql database connection mai yeh error display horaha hy kai karna hoga muje samja nah araha hy ap muje guide karey please Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocsphpsignupformconnection.php:2
Stack trace:
#0 {main}
thrown in C:xampphtdocsphpsignupformconnection.php on line 2 likha araha hy jb bhi SQL sey saat data base connect karney jao toh please tell me my question agar ap ka skype hy toh muje yeh bataha dijye please i need help you
+websofttutorials mujy eak problem ah rhi hai AUTO_INCREMENT ki means eak baar koi ID add ho to 2nd ID Auto add nhi ho rhi.. Then 2nd add krny k liye mujy U_id ko change krna parta hai jb k db mein AUTO_INCREMENT U-id pr lagya howa hai:( ????
$query.= "(U_id,U_name,U_lastname,U_age,U_email,U_password) ";
$query.= " VALUES (1,'{$fname}','{$lname}',{$age},'{$email}','{$pass}')";
you are awWsum, thanks
Hello …how can i upload and retrieve the file in database ..