| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read | ![]() |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi huys. I'm just wondering. At the moment my company has its own servers to host our site. We are now considering moving it. I'm most probably going to get it hosted here because I've heared good things about the service and reliability...Anyhow my main issues are whether the code I use for connecting to databases will work the same as it does now. I just use the standard code like this
$database = "db1"; mysql_connect(); @mysql_select_db($database) or die("Unable to select database"); $query="SELECT * FROM dbtable5 WHERE code = $code"; $result = mysql_query($query); $num=mysql_num_rows($result); mysql_close(); $name = mysql_result($result, $i, "name"); $entered = mysql_result($result, $i, "entered"); would this work ok? No reason why it shouldn't unless I need to enter server names and passwords... My only other issue is that I use php dig for our site search feature...I'm wondering if there is a similar in built search programme I can use to replace it as I would not have it installed anymore? Thats if I get the standard shared hosting anyway (because I'm aware that with vps or dedicated server I could get anything installed) |
|
|||
|
Hello Shaun,
Your database connection string is perfect and you need to replace database name, database username and password in your code to establish connection with your database. We can provide you with PHPDig on our servers but you will need to take care of scripting as we can provide you with platform but scripting has to be sorted from your end.
__________________
Web Hosting UK - ASP MSSQL Hosting - cPanel Linux Hosting AIM : webredback || msn : andrew @ webhosting.uk.com Toll Free : 0808 262 0855 |
|
|||
|
right. Well as mentioned I have php dig on our site at the moment. So if I simply copy its web folder and use it then it might well work? I'm not a heavy php coder thats the problem. And this is fairly heavy stuff. I only use php for database connectivity and the include function really.
So yes, the database stuff..I thought I might have to input username and passwords. We obviously dont have that at the moment. But will I have to create a username and password? I know its recomended, but for the sake of changing pages and pages of code I would rather not...... |
|
|||
|
Hello Shaun, You should use a username and password as that will be safe for your database. You should not use root user as default. You can simply copy your code on our servers and that should work. If you face any problem in making it work then we are here to fix it.
__________________
Web Hosting UK - ASP MSSQL Hosting - cPanel Linux Hosting AIM : webredback || msn : andrew @ webhosting.uk.com Toll Free : 0808 262 0855 |
|
|||
|
Sorry for being a bit dense, but what do you mean by "root user"? So the code will work fine as it is then? only with no password and username protection? My only other query is the php dig problem I have.....You say that you have it available, so will my php dig code work fine? I dont know if it requires some sort of installation with my account to work thats all.
|
|
|||
|
For security your database should have a username and password. Otherwise anyone can connect to it and retrieve/submit data. Also if you're storing any personal information on the database its a legal requirement that it is secured.
If you're currently using no username and password then your code will have to be modified because whuk requires database servers/databases to have a username and password. |
|
|||
|
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|