Closed Thread
Results 1 to 3 of 3

Thread: What do I change the variables to for SQL database

  1. #1
    mmorning16 is offline x10Hosting Member mmorning16 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    What do I change the variables to for SQL database

    I am setting up a football pool and i am using a prebuilt php site. The only insturctions I got were to edited a config.php. I created a database in mysql and created the user account and I uploaded all the files to my public_html folder but I am not sure what I should be changed or what to change it to. Any ideas?

    below is what is in the config.php
    PHP Code:
    <?php
    //modify vars below
    $db_host 'localhost';
    $db_user 'root';
    $db_password 'connect';
    $database 'nflpickem';
    $db_prefix 'nflp_';
    $siteUrl 'http://localhost/personal/phppickem.com/application/';
    $allow_signup true;
    $show_signup_link true;
    $user_names_display 3// 1 = real names, 2 = usernames, 3 = usernames w/ real names on hover
    //set timezone offset, hours difference between your server's timezone and eastern
    define('SERVER_TIMEZONE_OFFSET'1);

  2. #2
    vv.bbcc19's Avatar
    vv.bbcc19 is offline Community Advocate vv.bbcc19 is just really nice
    Join Date
    Jun 2010
    Location
    India
    Posts
    1,505

    Re: What do I change the variables to for SQL database

    Hi
    create a database, create a user and the password.Allow this user full control on the database by adding user to the database.
    All this can be done from cPanel and by hitting Mysql database icon
    Then
    use them here..you need to change those which are put in bold

    <?php
    //modify vars below
    $db_host = 'localhost';
    $db_user = 'mmorning_databasename';
    $db_password = 'password_that_you_have_set';
    $database = 'mmorning_databasename_you_have_set';
    $db_prefix = 'nflp_';
    $siteUrl = 'folder in which you kept the files -hint- can be found from cPanel ';
    $allow_signup = true;
    $show_signup_link = true;
    $user_names_display = 3; // 1 = real names, 2 = usernames, 3 = usernames w/ real names on hover
    //set timezone offset, hours difference between your server's timezone and eastern
    define('SERVER_TIMEZONE_OFFSET', 1);
    BCV | Community Support Representative
    █ x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  3. #3
    mmorning16 is offline x10Hosting Member mmorning16 is an unknown quantity at this point
    Join Date
    Sep 2011
    Posts
    3

    Re: What do I change the variables to for SQL database

    $db_user = 'mmorning_databasename';
    is that supposed to be the user name?

    $siteUrl = 'folder in which you kept the files -hint- can be found from cPanel ';
    I put the files in the Html folder under a phppicks folder, was I supposed to uplaod them some place else? Not sure where I should be looking in the control panel.

    BTW THANK YOU for the thelp. I apprciate it.

Closed Thread

Similar Threads

  1. Change the database password.
    By Taruf in forum Free Hosting
    Replies: 1
    Last Post: 06-23-2011, 02:14 PM
  2. Change database collation
    By soulmate-8939 in forum Free Hosting
    Replies: 1
    Last Post: 09-04-2010, 10:26 AM
  3. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  4. [php] variables
    By taekwondokid42 in forum Programming Help
    Replies: 4
    Last Post: 04-14-2008, 04:44 PM
  5. PHP Variables
    By ScottyB in forum Programming Help
    Replies: 8
    Last Post: 03-23-2008, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers