Click here to Skip to main content
15,920,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am unable to access database. I have this code

PHP
<?php
$dbconnect = mysql_connect('127.0.0.1','ankurreyes','') or die('error onee');
mysql_select_db('likebutton',$dbconnect) or die('culdnt select database');
?>


when i load the page. it shows me culdnt select database


I checked table name, its likebutton .can someone tell me whats the mistake , I am doing?
Posted

1 solution

mysql_select_db() is for selecting a database not a table see :http://php.net/manual/en/function.mysql-select-db.php[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900