Results 1 to 30 of 30

Thread: MySQL Host Address
      
   

  1. #1
    Join Date
    May 2006
    Location
    Australia
    Posts
    14

    Question MySQL Host Address

    I am trying to connect to mysql server through SQLyog to access the database created from CPanel. Yet I was required to enter MySQL host Address. I tried the 75.126.169.141 which is the FTP address of our vodahost server but it did not work. Can anyone tell me where I can find MySQL Host Address?

    Many Thanks.

    Ted
    www.naturalstage.com

  2. #2
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Usually most programs that remotely connect to your database will use, as host, " www.yourdomain.com " . However, to be able to remotely connect, you will need to add your ISP's host to the list of allowed hosts. If you have a static IP address (i mean the one of your ISP) that's easy, but if you have a dynamically changing IP address, which changes each time you connect / disconnect fron the internet, that would be a problem.

    Anyway, have a look at http://www.webyog.com/faq/content/16...at-an-isp.html
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  3. #3
    Join Date
    Jan 2007
    Posts
    9

    Default Re: MySQL Host Address

    Hi,
    I have the same problem.
    I have been trying to connect a MYSQL database to my voda host cpannel.
    what you just said sounds good but how would I get my ISP's host?

  4. #4
    Join Date
    Jan 2007
    Posts
    9

    Default Re: MySQL Host Address

    I meant my voda host database

  5. #5
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Not sure what you mean. Your VH host, as i explained will simply be www.yourdomain.com . Your ISP's host (you will need it to add it to the list of allowed hosts) can be easily seen in http://www.ipchicken.com/ under Advanced, Name address.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  6. #6
    Join Date
    May 2006
    Location
    Australia
    Posts
    14

    Default Re: MySQL Host Address

    Thank you for the quick reply, Navaldesign. But I think what I want to find out is - I have created a mysql datase through CPanel which I believe is lcoated on my server and I like to modify the database. Where do I find out my MySql host address in order to make the connection? Thanks again.

    www.naturalstage.com

  7. #7
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Ok, you are NOT looking for your host then, you want to reach your database to work with it. Go in your CP, MySQL section, and in the bottom of the page you will find a link to phpMyAdmin. Unless you have the latest Cpanel version with the new skin. In that case, go in your CP, and in the MySQL section there is a direct link to phpMyAdmin from Control Panel's home page.

    In both cases, the link to phpMyAdmin will lead you to it, and you can manage your database from there.

    If, instead of the above, you meant remote connection, my post above stands: VH doesn't have a specific address for the MySQL server, you simply give in your script your domain name.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  8. #8
    Join Date
    May 2006
    Location
    Australia
    Posts
    14

    Default Re: MySQL Host Address

    I didn't know the existence of the link until you told me. Thank you very much. I think I have found what I needed.

    www.naturalstage.com

  9. #9
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Exclamation Re: MySQL Host Address

    When following the forum I did as was suggested:
    Used my domain name as the local host. I received the following error from the SQL.....

    ERROR: Unknown Punctuation String @ 1
    STR: <?
    SQL: <?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";

    When I used my localhost instead I received the following error....

    ERROR: Unknown Punctuation String @ 1
    STR: <?
    SQL: <?
    // Replace the variable values below
    // with your specific database information.
    $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "c-**-*-*-**.hsd1.mn.comcast.net";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "c-**-*-***-**.hsd1.mn.comcast.net";

    Neither of the above worked in setting up the file to the dbConfig.php !!!

    What am I doing wrong?

    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  10. #10
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    How are you trying to connect to the MySQL server ? through a desktop or a server installed application ?
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  11. #11
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Thru desktop into the cPanel .......

    I logged into the cPanel and clicked on the mySQL icon then went into the db from the next page or there abouts.

    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  12. #12
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Default Re: MySQL Host Address

    I also watched the tutorial in regards to working in the myPHPadmin page but still could not get this to work.

    Quote Originally Posted by Ram_Industries View Post
    Thru desktop into the cPanel .......

    I logged into the cPanel and clicked on the mySQL icon then went into the db from the next page or there abouts.

    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  13. #13
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    In addition this is the type of code I started working with.

    <?
    // Replace the variable values below
    // with your specific database information.
    $host = "localhost";
    $user = "UserName";
    $pass = "Password";
    $db = "dbName";

    // This part sets up the connection to the
    // database (so you don't need to reopen the connection
    // again on the same page).
    $ms = mysql_pconnect($host, $user, $pass);
    if ( !$ms )
    {
    echo "Error connecting to database.\n";
    }

    // Then you need to make sure the database you want
    // is selected.
    mysql_select_db($db);

    What part of the program am I missing?

    I believe I will again have this issue when I set the code for the Registration page as well, since I am supposed to create a file with the code ...... But would I create the file in the root-dir or from someplace else?

    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  14. #14
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Ok, the answer to my question is that you are connecting to the database through a php script installed on the server.
    Since what you are trying to do is installation of this script, the steps to follow are:

    1. Create a database in your CP. CP > MySQL Databases > Add New Database (type the name you want your database to have). Please note that the name that CP creates for the database is NOT what you have typed, but cpusername_dbname where dbname is what you have called your database, and cpusername your own CP username. They are separated by an underscore.
    2. In the same page, create a user for this database, let's suppose that you have called the user robert and you have provided, as password, ABCrobert . Please note that CP creates a user, but it names the user cpusername_robert. (as for the database name)
    3. ADD this user to the specific database, or he has no access. This is done through the Add user to database dropdowns (one for users, one for DBs, select user and satabase and press ADD USER).

    4. Now, find the file in your script that contains the database connection details. Since the script runs on your server, you have the follwing details:
    Host = localhost
    User = cpusername_robert
    Password = ABCrobert
    DB name = whatever you have called your database

    Once you have changed this file, in your computer, upload the edited file in the corresponding folder of your site.

    At this point, your script should have another part which is also necessary for it to work, and this is the installation wizard, if it exists.

    If it exists (usually it should be a file called "install.php , or setup.php or something similar) by typing in your browser http://www.yourdomain.com/scriptfolder/install.php the script should automatically create in the database all necessary tables. If this is a serious script, it should also ask you, before creating the tables, the desired username and password (necessary for Administrator login). It will also, if necessary, populate some of the tables with some default values, and at the end, it will give you a succesful installation message.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  15. #15
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Naval:

    When I tried to do as you said, I got the following error:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$dbh=mysql_connect ("localhost", "wgnfqog_RamIndus", "This is where I typed my password") or die ('I ca' at line 1

    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  16. #16
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Can you please post here this part of your script ? Including the lines before and after the query
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  17. #17
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Naval:

    Below is what is listed in my site

    inside the dbConfig.php is the following:

    <?
    // Replace the variable values below
    // with your specific database information.
    $host = "localhost";
    $user = "*********"; hid username for this purpose
    $pass = "********"; hid password for this purpose
    $db = "******_dbConfigphp"; hid first section for this purpose
    // This part sets up the connection to the
    // database (so you don't need to reopen the connection
    // again on the same page).
    $ms = mysql_pconnect($host, $user, $pass);
    if ( !$ms )
    {
    echo "Error connecting to database.\n";
    }
    // Then you need to make sure the database you want
    // is selected.
    mysql_select_db($db);
    ?>
    <?php
    // dbConfig.php is a file that contains your
    // database connection information. This
    // tutorial assumes a connection is made from
    // this existing file.
    include ("dbConfig.php");

    //Input vaildation and the dbase code
    if ( $_GET["op"] == "reg" )
    {
    $bInputFlag = false;
    foreach ( $_POST as $field )
    {
    if ($field == "")
    {
    $bInputFlag = false;
    }
    else
    {
    $bInputFlag = true;
    }
    }
    // If we had problems with the input, exit with error
    if ($bInputFlag == false)
    {
    die( "Problem with your registration info. "
    ."Please go back and try again.");
    }
    // Fields are clear, add user to database
    // Setup query
    $q = "INSERT INTO `dbUsers` (`username`,`password`,`email`) "
    ."VALUES ('".$_POST["username"]."', "
    ."PASSWORD('".$_POST["password"]."'), "
    ."'".$_POST["email"]."')";
    // Run query
    $r = mysql_query($q);

    // Make sure query inserted user successfully
    if ( !mysql_insert_id() )
    {
    die("Error: User not added to database.");
    }
    else
    {
    // Redirect to thank you page.
    Header("Location: register.php?op=thanks");
    }
    } // end if

    //The thank you page
    elseif ( $_GET["op"] == "thanks" )
    {
    echo "<h2>Thanks for registering!</h2>";
    }

    //The web form for input ability
    else
    {
    echo "<form action=\"?op=reg\" method=\"POST\">\n";
    echo "Username: <input name=\"username\" MAXLENGTH=\"16\"><br />\n";
    echo "Password: <input type=\"password\" name=\"password\" MAXLENGTH=\"16\"><br />\n";
    echo "Email Address: <input name=\"email\" MAXLENGTH=\"25\"><br />\n";
    echo "<input type=\"submit\">\n";
    echo "</form>\n";
    }
    // EOF
    ?>
    <?php
    session_start();
    // dBase file
    include "dbConfig.php";
    if ($_GET["op"] == "login")
    {
    if (!$_POST["username"] || !$_POST["password"])
    {
    die("You need to provide a username and password.");
    }

    // Create query
    $q = "SELECT * FROM `dbUsers` "
    ."WHERE `username`='".$_POST["username"]."' "
    ."AND `password`=PASSWORD('".$_POST["password"]."') "
    ."LIMIT 1";
    // Run query
    $r = mysql_query($q);
    if ( $obj = @mysql_fetch_object($r) )
    {
    // Login good, create session variables
    $_SESSION["valid_id"] = $obj->id;
    $_SESSION["valid_user"] = $_POST["username"];
    $_SESSION["valid_time"] = time();
    // Redirect to member page
    Header("Location: members.php");
    }
    else
    {
    // Login not successful
    die("Sorry, could not log you in. Wrong login information.");
    }
    }
    else
    {
    //If all went right the Web form appears and users can log in
    echo "<form action=\"?op=login\" method=\"POST\">";
    echo "Username: <input name=\"username\" size=\"15\"><br />";
    echo "Password: <input type=\"password\" name=\"password\" size=\"8\"><br />";
    echo "<input type=\"submit\" value=\"Login\">";
    echo "</form>";
    }
    ?>
    <?php
    session_start();
    if (!$_SESSION["valid_user"])
    {
    // User not logged in, redirect to login page
    Header("Location: login.php");
    }
    // Member only content
    // ...
    // ...
    // ...
    // Display Member information
    echo "<p>User ID: " . $_SESSION["valid_id"];
    echo "<p>Username: " . $_SESSION["valid_user"];
    echo "<p>Logged in: " . date("m/d/Y", $_SESSION["valid_time"]);
    // Display logout link
    echo "<p><a href=\"logout.php\">Click here to logout!</a></p>";
    ?>


    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  18. #18
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Default Re: MySQL Host Address

    This is what is always returned when I try to do this Naval:

    I use the "localhost" in the below information but it keeps returning with $Host as "Martech-Inc.biz which is the domain and not the "Localhost"

    ERROR: Unknown Punctuation String @ 1
    STR: <?
    SQL: <?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";<?
    // Replace the variable values below
    // with your specific database information.
    $host = "Martech-Inc.biz ";
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$dbh=mysql_connect ("localhost", "wgnfqog_RamIndus", "This is where I typed my password") or die ('I ca' at line 1


    inside the dbConfig.php file is the following:

    <?
    // Replace the variable values below
    // with your specific database information.
    $host = "localhost";
    $user = "*********"; hid username for this purpose
    $pass = "********"; hid password for this purpose
    $db = "******_dbConfigphp"; hid first section for this purpose
    // This part sets up the connection to the
    // database (so you don't need to reopen the connection
    // again on the same page).
    $ms = mysql_pconnect($host, $user, $pass);
    if ( !$ms )
    {
    echo "Error connecting to database.\n";
    }
    // Then you need to make sure the database you want
    // is selected.
    mysql_select_db($db);
    ?>
    <?php
    // dbConfig.php is a file that contains your
    // database connection information. This
    // tutorial assumes a connection is made from
    // this existing file.
    include ("dbConfig.php");

    //Input vaildation and the dbase code
    if ( $_GET["op"] == "reg" )
    {
    $bInputFlag = false;
    foreach ( $_POST as $field )
    {
    if ($field == "")
    {
    $bInputFlag = false;
    }
    else
    {
    $bInputFlag = true;
    }
    }
    // If we had problems with the input, exit with error
    if ($bInputFlag == false)
    {
    die( "Problem with your registration info. "
    ."Please go back and try again.");
    }
    // Fields are clear, add user to database
    // Setup query
    $q = "INSERT INTO `dbUsers` (`username`,`password`,`email`) "
    ."VALUES ('".$_POST["username"]."', "
    ."PASSWORD('".$_POST["password"]."'), "
    ."'".$_POST["email"]."')";
    // Run query
    $r = mysql_query($q);

    // Make sure query inserted user successfully
    if ( !mysql_insert_id() )
    {
    die("Error: User not added to database.");
    }
    else
    {
    // Redirect to thank you page.
    Header("Location: register.php?op=thanks");
    }
    } // end if

    //The thank you page
    elseif ( $_GET["op"] == "thanks" )
    {
    echo "<h2>Thanks for registering!</h2>";
    }

    //The web form for input ability
    else
    {
    echo "<form action=\"?op=reg\" method=\"POST\">\n";
    echo "Username: <input name=\"username\" MAXLENGTH=\"16\"><br />\n";
    echo "Password: <input type=\"password\" name=\"password\" MAXLENGTH=\"16\"><br />\n";
    echo "Email Address: <input name=\"email\" MAXLENGTH=\"25\"><br />\n";
    echo "<input type=\"submit\">\n";
    echo "</form>\n";
    }
    // EOF
    ?>
    <?php
    session_start();
    // dBase file
    include "dbConfig.php";
    if ($_GET["op"] == "login")
    {
    if (!$_POST["username"] || !$_POST["password"])
    {
    die("You need to provide a username and password.");
    }

    // Create query
    $q = "SELECT * FROM `dbUsers` "
    ."WHERE `username`='".$_POST["username"]."' "
    ."AND `password`=PASSWORD('".$_POST["password"]."') "
    ."LIMIT 1";
    // Run query
    $r = mysql_query($q);
    if ( $obj = @mysql_fetch_object($r) )
    {
    // Login good, create session variables
    $_SESSION["valid_id"] = $obj->id;
    $_SESSION["valid_user"] = $_POST["username"];
    $_SESSION["valid_time"] = time();
    // Redirect to member page
    Header("Location: members.php");
    }
    else
    {
    // Login not successful
    die("Sorry, could not log you in. Wrong login information.");
    }
    }
    else
    {
    //If all went right the Web form appears and users can log in
    echo "<form action=\"?op=login\" method=\"POST\">";
    echo "Username: <input name=\"username\" size=\"15\"><br />";
    echo "Password: <input type=\"password\" name=\"password\" size=\"8\"><br />";
    echo "<input type=\"submit\" value=\"Login\">";
    echo "</form>";
    }
    ?>
    <?php
    session_start();
    if (!$_SESSION["valid_user"])
    {
    // User not logged in, redirect to login page
    Header("Location: login.php");
    }
    // Member only content
    // ...
    // ...
    // ...
    // Display Member information
    echo "<p>User ID: " . $_SESSION["valid_id"];
    echo "<p>Username: " . $_SESSION["valid_user"];
    echo "<p>Logged in: " . date("m/d/Y", $_SESSION["valid_time"]);
    // Display logout link
    echo "<p><a href=\"logout.php\">Click here to logout!</a></p>";
    ?>


    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz[/quote]
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  19. #19
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    The connection code seems corect. Can you email me a link to the published script so i can take a look ? However, the script you posted is NOT the same that gives you the error message: it has a different variable and different "or die(....) etc. Are you sure you are running the correct script ? or the correct dbConfig.php file ?
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  20. #20
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Published script link is :

    http://Martech-Inc.biz/netradio.html
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  21. #21
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Running same script as well as the dbConfig.php file.
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  22. #22
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Ok, i suppose i had to click on New User. Nothing happens, a get a 404 page not found error.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  23. #23
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Quote Originally Posted by Ram_Industries View Post
    Running same script as well as the dbConfig.php file.
    I insist. It is NOT the same. Just look at the variables and the text to convince yourself:

    $dbh=mysql_connect ("localhost", "wgnfqog_RamIndus", "This is where I typed my password") or die ('I ca' at line 1


    inside the dbConfig.php file is the following:

    <?
    // Replace the variable values below
    // with your specific database information.
    $host = "localhost";
    $user = "*********"; hid username for this purpose
    $pass = "********"; hid password for this purpose
    $db = "******_dbConfigphp";



    if ( !$ms )
    {
    echo "Error connecting to database.\n";

    As you see the error messages are different from what you get (pink colour) and the variables are different (green clour)
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  24. #24
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Thumbs up Re: MySQL Host Address

    Please try again Naval:

    the New Users should work now. http://Martech-Inc.biz/netradio.html
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  25. #25
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Default Re: MySQL Host Address

    Totally Lost with making the pages and all coding link together...
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  26. #26
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    No, it doesn't work. The form has no action, so it sends nowhere, the encoding is set to text / plain instead of multipart / form data.

    I nderstand that you might want to learn yourself, however, a pro script with customized pages to have the same template as your site would cost only a fraction of your time worth.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  27. #27
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Naval:

    When I filled in the form and clicked submit it took me to a completely different action.php page.... How would I name a second action.php thank you page so it only opens into the correct page for the members only section.

    Would I need to name it action.php2 ?
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  28. #28
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    If you need to change the scripts where the form sends the info, you need to add an extension BEFOR the .php, like action2.php

    Or simply save and upload your action script as login.php or whatever else you want.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  29. #29
    Join Date
    Dec 2005
    Location
    Pittsburgh, Pa
    Posts
    164

    Question Re: MySQL Host Address

    Naval:

    Here is the Registration Form for New Users:
    http://martech-inc.biz/action2.php

    After all information had been supplied the Submit should send the data to the database right? Then send a Thank You page back to the person registering.

    Now what I came across is after the submit had been clicked the person is sent back to the Registration page only for some odd reason the Registration page being sent to has warnings posted at the top of the page.

    And no Thank You page opens up instead....

    Below is the information warning shown after submit is clicked.


    Warning: include(dbConfig.php) [function.include]: failed to open stream: No such file or directory in /home/wgnfqog/public_html/action2.php on line 124

    Warning: include(dbConfig.php) [function.include]: failed to open stream: No such file or directory in /home/wgnfqog/public_html/action2.php on line 124

    Warning: include() [function.include]: Failed opening 'dbConfig.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wgnfqog/public_html/action2.php on line 124
    Username:
    Password:
    Email Address:


    Now as you see above it does show as if it is wanting the New Member to login.... Which should not appear until they click a link which will appear in the Thank You page taking them to the login page.....

    The login page is still being created so I know it doesnt appear just yet.
    As well as the Members Main Page still needs to be created.

    Why am I receiving the second page with the code attached instead of the Thank You page. I have the Thank You page as http://Martech-Inc.biz/thankyou.php which also appears to show the code at the top of the page as with the Registration Page.....

    Ram_Industries
    Robert Montgomery
    http://Martech-Inc.biz
    Ram_Industries
    Robert A. Montgomery
    Ram-Industries@comcast.net
    http://Martech-Inc.biz

  30. #30
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,080

    Default Re: MySQL Host Address

    Robert, i can't really answer you. I would need time both to debug the errors and to understant the logical flow of your script. Time that unfortunately i don't have. Sorry
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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