PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$server = "localhost";
$username = "mysql_user";
$password = "";
$db = "temp";
$link = mysql_connect($server, $username ,$password) or die("Could not connect: " . mysql_error());
mysql_select_db($db) or die(mysql_error());
in above code passowrd field is blank, if i put password what will happen and moreover if i use password wot will be its effect? and same quetion about username? if i change it?
2nd thing i wana know that if i upload this connection file is there any need to made any change in this code remember:
Databse is Temp
I m using phptriad2-2-1
and my last question is can i use php5's code on it? will it work for it?
Last edited by itsmani1 on Fri Sep 17, 2004 3:30 am, edited 4 times in total.
feyd wrote:I don't understand your questions, at all.
this is the question abt above code?
in above code passowrd field is blank, if i put password what will happen and moreover if i use password wot will be its effect? and same quetion about username? if i change it?
<?php
$server = "localhost";
$username = "mysql_user";
$password = "";
$db = "temp";
$link = mysql_connect($server, $username ,$password) or
die("Could not connect: " . mysql_error());
mysql_select_db($db) or die(mysql_error());
?>
this code of my connection file. did u got wot i mean till now? if yes then ...
u can see $password = ""; now wot i want is i want to set some value against password like this $password = "1111"; tell me will it work?
if not then Y?
having the password set is entirely up to your mysql server's permissions and settings for the user. So, it could work. It entirely depends on the user's settings.
feyd wrote:having the password set is entirely up to your mysql server's permissions and settings for the user. So, it could work. It entirely depends on the user's settings.
how can i change permissions?????
Last edited by itsmani1 on Fri Sep 17, 2004 4:13 am, edited 1 time in total.