Hi all,
Have to agree with Pete here...
> > I do manage in the same manner
> > It infact assist me when I need to hand over the programme
> > to different person, so that I'd be important person in any
> > modification of the software.
>
> If you give your client good service, why would your client change to
> another programmer?
I have clients sign a contract stating that the copyright on the source code
is mine. Of course they can have it modified by others, and even use it
somewhere else, as long as they ask me, and I will not be unreasonable. What
will be the protection against theft (someone else using the code)? Honesty.
And I hope they are satisfied with my work so will not feel the need to
change programmer. If the next programmer they hire is so lousy that he
needs to do copy and paste to create working code, than they will regret of
hiring that person anyway.
If I would be asked advice from a potnetial customer on how to proceed with
a site of which the coding is unreadable, I would probably tell them
straight away that independent if they choose me for future work, they
should never ever get back to the previous programmer because of bad coding
practices. You think it is easy to debug code like that?... As Pete said:
you will work slower than others because of this, and what clients like most
is speed...
As far as the other question is concerned:
> $connection = mysql_connect($host,$user,$password)
> or die ("Couldn't connect to server.");
> $db = mysql_select_db("$dbname",$connection)
> or die ("Couldn't select the $dbname database.");
Include die('response') echoes in the code. It makes debugging easier as you
will see exactly where the thing goes wrong.
Also helps you in case of unforseen events:
the provider of a client of mine moved all sites from machine A to machine B
some day. No problem, if this had not affected the clientnames of the mysql
database.
When my client called saying his site was not online anymore but gave error
message 'X' instead, it was very easy for me to see what went wrong, and
call the providerof the guy. That way the problem could be fixed extremely
soon.
> Define your variables above, for $host, $user, $password, and $dbname
> properly. I have run into hosts where "localhost" doesn't work.
>
> As a matter of fact, I think it's Yahoo hosting that required "mysql"
> as the host name.
There are hosts (think using the Ensim package) that require $host =
'localhost.localdomain'.
> > I have made a database in mysql & want to access it
> > using PHP. but its not connecting.
> > I m giving localhost name, user name & password
> > but still its not connecting.
> > Where problem may lie?
Is it not connecting to the database server (problem with username,
password, servername), or not connecting to the database (problem with the
database name). Or is the problem after that, in executing any SQL command?
With regards,
Marc
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/