Šta je novo?
SerbianForum

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

PhP konekcija sa bazom mysql

  • Začetnik teme DusanFortis
  • Datum pokretanja
D

DusanFortis

#1
Ovako nov sam u "programiranju" i gledao sam neke tutoriale kako da se konektujem sa bazom.
Instalirao sam xampp i napravio u localhost/phpmyadmin bazu i tabelu sa 3 kolone...
Baza se zove: mojabaza
Onda sam pravio php konekciju i kad je pokrenem nista se ne desava ne pise ni da sam konektovan ni da nisam uspeo samo mi pojavi kodove-skriptu
Kod:
<?php
$servername = "localhost";
$username = "root";
$password = "password";
$dbname = "mojabaza";
$conn = new mysqli($servername, $username, $password, $dbname);
if($conn->connect_error){
    die("Connection failed".$conn->connect_error);
}
echo"Connected successfully";
?>
Zar ne bi trebalo da pise ako se konektujem "Connected successfully"?
Kod mene se pojavi ovo...
lx5rmrejx

http://postimg.org/image/lx5rmrejx/
 
Poslednja izmena:

Top