Menu

Error in connecting to MySQL

Help
Anonymous
2005-10-22
2013-06-03
  • Anonymous

    Anonymous - 2005-10-22

    How do I find the correct path to the MySQL database on my host???

     
    • TNTEverett

      TNTEverett - 2005-10-22

      Ask your host!
      FYI, there isn't really the concept of a "path" to MySQL.  You use mysql commands which access a database on a server.  For example:
      #Construct connection command.
      $link = mysql_connect($hostname, $username, $password);
      #Select the database at a particular connection link.  This opens the database for queries. 
      mysql_select_db($dbname, $link);
      #Construct the query string.  In this case, insert data into the database.
      $query="INSERT INTO EmailList (FirstName,LastName,Email) VALUES ('".$FirstName."','".$LastName."','".$Email."')";
      #Issue the query command with the constructed query string. 
      mysql_query($query);

      Note the process.php file handles this for you as long as your host supports MySQL. 

       
      • GhostHorse

        GhostHorse - 2005-10-24

        Hi I'm New to MySql and PHPFormgen. when i create the form the last step is to connect to mysql data base and connection fails. My question is do i edit the phpformgen to insert the mysql connection string some where ? or if not where do i but the connection string? Thanks

         
    • TNTEverett

      TNTEverett - 2005-10-24

      Lots of things can go wrong.  It's difficult to say what is wrong with your setup just by reading your post or without looking at your form. 
      1.)make sure your host supports mysql
      2.)test drive the mysql by using your host's tools (like phpmyadmin) and create a test database. 
      3.)view the config.inc.php and process.php files to make sure the correct username, dbname, password stuff is all filled out
      4.)if you'd like some one on one help, send me an email and I'll see what I can do for you. 

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.