Jump to content

Question

Posted

Problema intalnita (descriere):Am incercat sa pornesc panelu.
Ero(area / rile) / warning-(ul / urile):

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\Panel\includes\connection.php:2 Stack trace: #0 C:\xampp\htdocs\Panel\includes\config.php(4): include() #1 C:\xampp\htdocs\Panel\index.php(2): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\Panel\includes\connection.php on line 2
 

Liniile de cod / sursa / script-ul(obligatoriu):

Connection 

 

<?php
$link = @mysql_connect('localhost', 'root', '') or die("Nu se poate efectua conexiunea MYSQL");
mysql_select_db('vortex', $link);

$dbh = new PDO('mysql:host=localhost;dbname=vortex;charset=utf8', 'root', '');


?>

 

Imagini / Video (optional):
 

Ati incercat sa rezolvati singur?: Da dar nu gasesc de ce imi da eroare.Baza de date se numeste vortex  si o pornesc cu localhost.

6 answers to this question

Recommended Posts

  • 0
Posted

Try this

<?php
$link = mysql_connect('ip mysql', 'user', 'pass') or die("Nu se poate efectua conexiunea MYSQL.");
mysql_select_db('databasename', $link);

$dbh = new PDO('mysql:host=ipmysql;dbname=databasename;charset=utf8', 'user', 'pass');


?>

 

j3V8Znq.png

5IGyOAw.png

  • 0
Posted

am pus si uite  Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\Panel\includes\connection.php:2 Stack trace: #0 C:\xampp\htdocs\Panel\includes\config.php(4): include() #1 C:\xampp\htdocs\Panel\index.php(2): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\Panel\includes\connection.php on line 2

 

<?php
$link = mysql_connect('127.0.0.1', 'root', '') or die("Nu se poate efectua conexiunea MYSQL.");
mysql_select_db('vortex', $link);

$dbh = new PDO('mysql:host=127.0.0.1;dbname=vortex;charset=utf8', 'root', '');

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.