you need to tell php what mysql database to use, so you need to add a mysql_select_db() to your script.
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '(my password)';
$dbname = '_Database_Name_Here_'; // put the name of your database here
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect to mysql server : ' . mysql_error());
$link = mysql_select_db ($dbname, $conn) or die ('Can\'t connect to table: ' . mysql_error());
echo 'hello world';
obviously you are a newbie, check out some of these newbie totorials on my WebDev for Newbies Blog.
MySQL TutorialsPHP MySQL TutorialI just found this great site with a tutorial geared to all those newbies and goes into great detail about using PHP and MySQL together to create dynamic website applications.
MySQL Table TypesWhen you create a new table, you can tell MySQL what type of table to create. MySQL supports several storage engines that act as handlers for different table types. MySQL storage engines include both those that handle transaction-safe tables and those that handle non-transaction-safe tables.
MySQL Statement SyntaxTo help you find the syntax you need when you need it. To help you find the syntax you need when you need it, this appendix lists the syntax for the most frequently used MySQL operations. Each statement starts with a brief description and then displays the appropriate syntax. For added convenience, youll also find cross-references to the tutorials where specific statements are taught.
MySQL DatatypesThis tutorial explains the different datatypes used in MySQL.
Ten of the Biggest Mistakes Developers Make With DatabasesAlthough fashions come and go in software development, some things stay remarkably constant. One of these is the use of databases. You may be wonderfully up-to-date with an AJAX Web interface or the latest whizbang Windows user interface, but under the covers, youre probably still pumping data in and out of a database, just as we all did a decade or more ago. That makes it all the more surprising that developers are still making the same database mistakes that date back to those good old days of Windows 95 and before. Perhaps its just that most of us learn to use databases on the side, rather than really studying them. In any case, here are my nominations for the biggest mistakes that I see over and over again.
PHP TutorialsWhat is PHPPHP, which stands for Hypertext Preprocessor, is a server-side scripting language used for creating HTML embedded dynamic Web pages. PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications.
Basic PHP SecurityBasic PHP script security covers issues like prevention of SQL injections, XSS and CSRF attacks, variable tampering, etc.
Creating Forms with PHPHaving problems createing forms with PHP? No problem, because this is the pefect tutorial to learn how to create a mail forms using PHP and HTML.
PHP Security by ExampleNice flash presentation that will provide you with a good foundation on how to make your PHP apps more secure. This is the best tutorial I have found so far covering the difficult tasks of understanding, implementing and securing your php code.
Dreamweaver, Photoshop, HTML, CCS, MySQL, Perl and PHP in PicturesI have just stumbled upon the moterload of tutorials for all you newbies out there. These tutorials are the best out there I have found so far for the web developer newbie. These tutorials cover the basics of Dreamweaver, Photoshop, HTML, CSS, MySQL, Perl, and PHP. All of these tutorials are extremely easy to follow, as they each step is well not only well explained, there are also screen shots so you can easily follow, understand, and learn what is going on.
Introduction to PHPI just found this great tutorial on the net. This is the perfect tutorial for those who want to get started with php, but dont know where or how to start. Quote from tutorial: This tutorial is a basic introduction to PHP. You need two things to be able to do this tutorial: basic knowledge of HTML and a working installation of Apache and PHP.
PHP Programming BasicsAre you new to PHP or have limited knowledge of it? Here is the perfect tutorial for anyone with no, or limited knowledge of PHP to start off with the basics and work your way up from there.
CyberSpatium----------------------WAMP English Forum Admin
I have WAMP5 working with (for development use only):Windows Vista Ultimate x64 (64 bit)
Kaspersky Internet Security Suite 7.0.x
Spyware Terminater 2.x
CounterSpy 2.5.x
Need help? Check out my
WAMP User Manual/Guide here!
Cellular Phone Deals - The Best on the Net! -
FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a
FREE cellular phone with
FREE shipping!
Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in geek speak, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.
Clarify LoansMortgage and Home Loan Advice
LaxGo Web DirectoryPowerful human edited web directory of quality, spam-free sites organized via a comprehensive category structure.