urls/url-shortener-php

Error in connecting to database!

pncoder29 opened this issue · 2 comments

i made all but still cant it always keep saying "Error in connecting to database!"

i am looking forward for this

@zerrete

  1. Create a database on your server with whatever name you like, for example, I will make urls as my database.

  2. Now create a table with name link in the urls database. Now using this sql dump import the table details.

  3. Now in the UrlShortener.php configure the database properties.

https://github.com/urls/url-shortener/blob/f20e4167994868757e32d21bed2a00e494ba993d/functions/UrlShortener.php#L10

Now if I am hosting this application in my local server, then the settings would be something like this.

  		$this->db = new mysqli('localhost', 'root', 'root123', 'urls');

If you have followed above steps correctly, then I am sure everything will work correctly.

closing due to inactivity