Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Nov 2002
    Location
    Elmira, NY
    Posts
    41
    Member #
    261
    I am building a website for my employer. I developed it on a cPanel server. it works fine. The company has their site hosted with Apollo Hosting. And once I move the site over to their host it gives errors. I have changed the database username, password and name. And it keeps erroring. I have imported the databse from the cPanel server to the Apollo hosting server.

    The real site
    http://synergyrecycling.com

    Development site
    http://synergyrecycling.net

    Below is the code that I use to gather the info from the databse. I am not a PHP expert and this has worked for me for years.


    PHP Code:
    <?

    require "config.inc";

    $db mysql_connect("$dbhost""$dbuser""$dbpassword"); 
    mysql_select_db("$dbname",$db);

    $result mysql_query("SELECT * FROM site WHERE id = 5",$db);
    $content mysql_fetch_array($result);

    do {
    $id = ($content["id"]);
    $title = ($content["title"]);
    $text = ($content["text"]);

    echo 
    "";

    $str="$text";

    $newstr=nl2br($str);
       echo 
    $newstr;
       
    } while (
    $content mysql_fetch_array($result));

    ?>

  2.  

  3. #2
    Member
    Join Date
    Nov 2002
    Location
    Elmira, NY
    Posts
    41
    Member #
    261
    I fixed it. I guess with this host you can only have one database, I created a 2nd one and wasnt allowed to have it so I guess I couldnt connect to it.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:41 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com