# create $host localhost

**URL:** <https://www.phphelp.com/t/create-host-localhost/21947>\
**Category:** PHP Installation and Configuration\
**Created:** [January 22, 2014, 8:19pm UTC](https://www.phphelp.com/t/create-host-localhost/21947 "2014-01-22T20:19:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyankavivekanandan](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/c6cbf5/32.png) [@priyankavivekanandan](https://www.phphelp.com/u/priyankavivekanandan)\
**Post date:** [January 22, 2014, 8:19pm UTC](https://www.phphelp.com/t/create-host-localhost/21947/1 "2014-01-22T20:19:13Z")

</div>

[php]  
$host=http://localhost/mysite1;

$con=mysql\_connect(“localhost/mysite1”,“user”,“user1”);  
if($con)  
{  
echo “connected successfully”;  
}

[/php] then where to navigate this code  
had created phpmyadmin tables for sql but some connection problem with 404 error pls clear this

thanks  
in advance

---

<div class="post-metadata">

**Author:** ![JimL](https://www.phphelp.com/user_avatar/www.phphelp.com/jiml/32/1842_2.png) [@JimL](https://www.phphelp.com/u/JimL)\
**Post date:** [January 22, 2014, 8:21pm UTC](https://www.phphelp.com/t/create-host-localhost/21947/2 "2014-01-22T20:21:51Z")

</div>

Discard the code and start again, the mysql\_\* library is deprecated and will be removed from PHP. Find a starter tutorial for PDO or Mysqli and come back if you have any problems 🙂
