Since you didn't bother to post the error message just the line I'm guessing that you're talking about using the none-existing function mysql_connect()...
This is due to you not haveing installed the MySQL extension for php.
The second thing you forgot to write is what system you're using.
If you're running a debian based linux just use: "apt-get cache search php mysql" and you should come up with something like "php4_mysql", install that using "apt-get install php4_mysql".
If you're using a linux version without "apt" be sure to install the php_mysql package or compile php with -enable mysql
If you're using windows you're gonne need the mysql extension (a dll) and then configure your php.ini (Somewhere in the directory c:\windows or c:\windows\system32 I think). You will have to uncomment the line that loads the mysql extension and also configure the proper extensions path so that php findes the mysql .dll file.