Jump to content
lolman

Script conectare baza de date

Recommended Posts

Posted

Am si eu nevoie de un script in php care sa se conecteze la o baza de date. Eu am unul dar CRED ca este ceva gresit in el pentru ca nu prea functioneaza:

<?php
$adresa = "localhost";
$utilizator = "userul";
$parola = "parola";
$bazadedate = "baza de date";

$conexiune = mysql_connect($adresa,$utilizator,$parola) or die("Nu ma pot conecta la MySQL!");
mysql_select_db($bazadedate, $conexiune) or die("Nu gasesc baza de date");

?>

Posted

Stiu ca nu functioneaza pentru ca ... nu functioneaza... am inlocuit acolo cu datele care trebuiesc schimbate. Da' nu se conecteaza! Mai am un script de adaugare in baza de date, de acolo am vazut ca nu merge!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...