+ Reply to Thread
Results 1 to 2 of 2

Thread: PHP connect to created database

  1. #1
    Junior Member inkmon is on a distinguished road
    Join Date
    Sep 2011
    Posts
    6

    PHP connect to created database

    I am trying to get this script to connect and cannot get the input values right
    This is one attempt. I have left the password out of course.
    I would really appreciate getting the correct format. Most hosts specify the dbhost dbname dbuser etc I have followed all the forms I can think of but to no luck. Need advice.

    Standard php script

    <?php

    $dbhostname = "jp22.net_las";//Domain and user name. Tried just localhost here
    $dbname = "las_art";// name of database
    $dbusername = "las";
    $dbpassword = "*******";

    if(!$dbConn = mysql_connect($dbhostname,$dbname,$dbusername,$dbpassword ))
    die('I could not connect to the database. Clease check the inc_dbcon file and make sure everything is correct.');
    if(!mysql_select_db($dbname, $dbConn))
    die('I could not select the database. Check the inc_dbcon file and make sure everything is correct.');
    ?>
    I realize it is just a simple statement but I keep getting the input wrong. I really would appreciate help on this

    Terry

  2. #2
    Junior Member inkmon is on a distinguished road
    Join Date
    Sep 2011
    Posts
    6

    Re: PHP connect to created database

    Well I finally got the right values to enter. I recreated the database manually and there were the values
    so I am ok.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34