-2
<?php
$con = mysqli_connect("localhost" "root" "") or die("Unable to connect");
 mysqli_select_db("logindb", $con);
 ?>

This is the configuration of the connecting.

<?php 
require 'config.php';
 ?>

This is where is connect the database to a registration page.

Can you see something wrong? This is the error i get: Parse error: syntax error, unexpected '"root"' (T_CONSTANT_ENCAPSED_STRING)

Thanks, Realcookie

Realcookie
  • 39
  • 1
  • 7

1 Answers1

0

You are missing the commas bro. Here is the corrected one

<?php
$con = mysqli_connect("localhost", "root", "") or die("Unable to connect");
 mysqli_select_db($con, 'logindb'); 
 ?>
Rotimi
  • 4,783
  • 4
  • 18
  • 27
  • Ye thanks alot. The website opened now but at top i see a warning: Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\Easy drive\config.php on line 3 – Realcookie Feb 14 '17 at 13:48
  • mysqli_select_db($con, 'logindb'); – Rotimi Feb 14 '17 at 13:50
  • Thanks alot! It worked :). Im sure you can see from everything thats im a beginning student :D – Realcookie Feb 14 '17 at 13:52