Jump to content
  • 0

Problema pornire panel


EnAcHe

Question

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.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

S-au modificat functiile mysql. Acum se foloseste mysqli (mysql improved). Sunt mai eficiente decat functiile vechi.

Documenteaza-te daca vrei sa afli mai multe http://www.w3schools.com/php/php_ref_mysqli.asp

Cea mai sigura sursa de facut bani de buzunar in mediul virtual. Inregistreaza-te si pune-te pe treaba !!!

http://www.viespar.ro/?reff=ab8e9d8086304d6136eac03c710238d7

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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', '');

 

Link to comment
Share on other sites

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.