![]() Next, select the database that you want to access using mysql_select_db. You can log in to your hosting account manager to find the hostname, user name, and password for your database. $con = mysql_connect('HOSTNAME','USERNAME','PASSWORD') There are two main steps to connecting to a MySQL database using PHP.įirst, connect to your MySQL server using the mysql_connect statement. The form below works perfect on my localhost and inputs data just greats.Ĭan anyone please help me adjust this one to work on the GoDaddy database. My other problem is that I want to set up a testing server in Dreamweaver for ny GoDaddy DB to test it out before uploading but cannot find any settings for it and doesn't work with the info that I put in this form for host etc. I have changed the actual details with capitals to show you. Can someone please take a look at this and tell me where I am going wrong. But to no joy, I cannot connect to the datbase despite using the correct login details so I am assuming it must be somehting I am doing wrong with the PHP coding. I have looked on their help section and used the example that they give. Now I need to adapt that same form to do exactly the same but input info in my database on GoDaddy. I have a connection to the database on localhost and the data from the form inserted into the datbase perfectly. I set up a testing server in Dreamweaver for the one on my laptop to try out an input info form and it worked perfectly. ![]() I have created an MySQL database on GoDaddy and a duplicate on my laptop with phpmyadmin. I am completely new to PHP and trying very hard to teach myself how to use it as I am stepping up to database websites. Really out of my depth here, thanks for any suggestions or insights.Hello everyone and this is my first post as I am completely new to PHP but trying hard to pick it up. Is this created when the connection record is created? Looking at my web site I don't see an _mmServerScripts folder, which my other website has. Do you have any idea how I would use this, or even launch it? if I implement this I'm afraid I'll cause other DW problems down the line. GoDaddy seems pretty weak in their support area for connection problems, my previous reply includes a chunk of sample PHP they provided but with no guidance on how to use it. I also tried including the IP address in the username - the one that I get from PHPMyAdmin and it made no difference. What I really don't understand is that if I open another website hosted on a different company's hosting server (using DW with the local web pages on my PC) it tries to connect and gives me an access denied error which seems reasonable. Yes the fields above are what it's asking for and I'm giving it exactly what tells me, the MySQL Server is w2wb.db. I give it the username and password and the database name. ![]() TonyĪlert('Unable to connect to database! Please try again later.'),history.go(-1)") ![]() What I'm unable to do is connect my GoDaddy site to the GoDaddy MySQL db !! GoDaddy has provided me with a generic piece of PHP which they call a connection string, it is shown below and needs to be customized for my site, the question I have is where do I put this PHP and how do I trigger it? I'd really appreciate some direction on this. I was able to successfully connect from the GoDaddy hosted web site to a MySQL db on another site not hosted by GoDaddy, I was also able to successfully connect from a web site not hosted by GoDaddy to the MySQL db hosted by GoDaddy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |