practicalcrafts
New Member
- Messages
- 8
- Reaction score
- 0
- Points
- 1
I just made a dynamic web site and would like to know how to go about publishing it.
I just made a dynamic web site and would like to know how to go about publishing it.
Thanks for getting back. I built the site with wampserver and notepad++ and the languages I used were; html, css, php and mysql.In short upload files to your sites public_html directory. Have no idea what you used to create website or your host name.
Hosting Control Panel has all the tools you will need for uploading, MySQL, and phpAdmin. I would like to take a look at your site after you publish (upload). I don't know the address.My confusion is how to upload the php and mysql.
For the config file, where do I place the user and password in the file?All files (html, php etc) goes into the public_html folder of the domain.
For the database you would need to have it exported from WAMP (believe phpMyAdmin is part of that which you can use to export the database).
In DirectAdmin you create a database and user under "MySQL Managment", take note of the user and its password, you will need to edit the config file for your site to reflect this.
Once the database is created, head to phpMyAdmin (linked from where you created the database) and import the database you exported from your local site development.
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$db = "db_name";
// Create connection
$conn = mysqli_connect($servername, $username, $password,$db);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>
generally when you upload to your public_html folder any folders/files follow suit on your server.For the config file, where do I place the user and password in the file?
Also, is there a way to send a private message to someone?
So I just put the config file in my public_html folder, I don't edit anything in it?generally when you upload to your public_html folder any folders/files follow suit on your server.
so if config,php was in your root folder in wampserver, you would put it in the public_html folder.
then just put rest of the folders in the same public_html keeping same structure.
Do I type this into my config file? if so, where exactly?@practicalcrafts
PHP:<?php $servername = "localhost"; $username = "username"; $password = "password"; $db = "db_name"; // Create connection $conn = mysqli_connect($servername, $username, $password,$db); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } echo "Connected successfully"; ?>
you may need to exit any paths/urls in the config file to other files.So I just put the config file in my public_html folder, I don't edit anything in it?
this is your mysql/mysqli database copy if needed,Do I type this into my config file? if so, where exactly?
No, that code is just for reference, to where username, passwd, host name and database name would go. You should have a config file in you wampserver htdocs directory, that may need to be modified after uploaded to your hosts public_html directory. As @spacresx mentioned, keep the file/folder structure the same as in the wampserver htdocs directory.Do I type this into my config file? if so, where exactly?