This is a good tutorial. However, one thing I noticed was that you said that dropping back to HTML and displaying the PHP variables in their own tags was faster. I've not got any data to back it up but I think that's wrong. It's not like the PHP interpreter is only seeing certain parts of the file; the whole file is being passed through, so it shouldn't matter. In fact, if anything, your way might be slower since it's making two separate calls to PHP's internal print function rather than bundling them together.
mySQL & PHP: A Beginners Look
#17
Posted 28 November 2010 - 10:16 PM
#18
Posted 30 January 2011 - 11:48 AM
Thanks for this lil tut appreciate it! helped alot
#19
Posted 02 February 2011 - 12:48 AM
This is great! I've just recently started learning PHP and this very helpful!
Thanks!!
Thanks!!
#20 Guest_Vaibhav*
Posted 14 February 2011 - 08:22 AM
I have WAMP2.0i server at my PC.The code I have written is
<?php
$server = "localhost";
$username = " ";
$password = " ";
$dbname = "Bank1";
$con = mysql_connect("$server","$username","$password");
mysql_select_db("$dbname");
?>
but is not executing on serverside.The databse is not getting created.
<?php
$server = "localhost";
$username = " ";
$password = " ";
$dbname = "Bank1";
$con = mysql_connect("$server","$username","$password");
mysql_select_db("$dbname");
?>
but is not executing on serverside.The databse is not getting created.
#21
Posted 14 February 2011 - 08:35 AM
That selects the database, but doesn't create it. You shouldn't be creating a database or dealing with DDL commands on the PHP side of things.
|
|






MultiQuote








|