How to host my php website

Status
Not open for further replies.

jishnu001

Broken In
hii i have created a website in php .now i wqant to host it how will i do it .what all changes should be made to host it for example .mysql_connect("localhost","root","");
this is my connection string should i change it .also what about my database file i cant find it how will i host it .please help.
 

devgujar

Broken In
Dude i m not master in php but i can help you a liitle bit cos i have hosted my site on server
000webhost.com


you can contact me on
www.devgujar.site90.com

here is the code

<?php
mysql_select_db('<DATABSE NAME>',mysql_connect
('<SERVER NAME>','<user name>','<password>'));
$result=mysql_query('SELECT * FROM visitor');

while($row=mysql_fetch_object($result))
{ $i = $row->cnt; }
$i=$i+1;
mysql_query("update visitor set cnt=$i");
echo $i;
?>


I m using this code to update visitors counter on my website i.e. index.php page

NAME OF MY TABLE IS : visitor
THERE IS ONLY ONE FILELD IN MY TABLE THAT IS : cnt

you can check my web site for refrance : www.devgujar.site90.com
ofiicial mail id: devgujar@devgujar.site90.com, devgujar@gmail.com
 

vamsi360

Always confused
you also need to change the username and password along with the host provider.
I am using 000webhost for hosting my blog at *vamsisubhash.co.cc
 

ThinkFree

Technomancer
Don't use co.cc domain names now. They are free for 1 year only. After that you have to pay for using them.
 

josephcs

Tech Freak
When you are transferring your PHP w/ MySQL Database to a host, you need to edit the following MySQL connection settings:

Database User Settings
Server : localhost (same)
Username : yourusername_dbusername
Password : type your DATABASE password here

Database
DB name : yourusername_dbname

I would suggest you to use cPanel based Hosting Provider. AFAIK 000webhost offers cPanel (but I guess it is limited to US Registrations) and X10Hosting and NovaHost also offers cPanel. Be sure to link your DB username with your Database!
 
Status
Not open for further replies.
Top Bottom