Copy link to clipboard
Copied
I have created a local dynamic website using Dreamweaver, MySQL, PHP and XAMPP. Everything works fine on my local machine - now I want to upload the site to a domain hosted by siteground.com. Do I upload all files located within my XAMPP directory? Do I need to change my database connection? etc??? Just not sure where to go from here. Any help is appreciated!
Copy link to clipboard
Copied
You upload to your remote server all the files (PHP, style sheets, JavaScript, images, etc) in the site root.
The database needs to be re-created on your remote server. You can do this by using the version of phpMyAdmin provided by your hosting company, and building the database completely from scratch. Alternatively, you can use your local version of phpMyAdmin to export your database to a .sql file on your local hard disk. Create an empty database on your remote server, navigate to it in your remote version of phpMyAdmin, and click the Import tab. Select the .sql file you created earlier, and import it.
The MySQL connection needs to use the hostname, username, and password given to you by your hosting company.
Copy link to clipboard
Copied
Thank you for your help. My file structure is: c:/XAMPP/xampp/htdocs/php_test
(folder) and c:/XAMPP/xampp/htdocs/xampp (folder). Do I upload everything on
/htdocs or just files on /htdocs/php_test?
Copy link to clipboard
Copied
What you upload depends entirely on your site structure. If you're using htdocs as your site root, then you upload both folders. If php_test and xampp are for different sites, upload only the site that you plan to use.
Copy link to clipboard
Copied
I am receiving an error 'Database not selected'.
Here is my connection file:
<?php
FileName="Connection_php_mysql.htm"
Type="MYSQL"
HTTP="true"
$hostname_connTest = "localhost";
$database_connTest = "coolweb1_phptest";
$username_connTest = "coolweb1_phptest";
$password_connTest = "???????";
$connTest = mysql_pconnect($hostname_connTest, $username_connTest,
$password_connTest) or trigger_error(mysql_error(),E_USER_ERROR);
?
Copy link to clipboard
Copied
sherrimarie wrote:
I am receiving an error 'Database not selected'.
What is the name of your database? According to the code you have posted, it's called coolweb1_phptest, which is the same as the username. It's unusual for both to be the same.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now