0

Hi,


Could anyone point me to some good tutorials on using PHP with Dreamweaver?

Also any other helpful forums?

Many thanks

Andy

5
Contributors
17
Replies
18
Views
8 Years
Discussion Span
Last Post by andydeans
0

thanks so much for the responses.

Would you reccomend using Dreamweaver to build PHP pages?

Have used book by Luke Welling and it is brilliant but now want to look at building data driven sites and heard its best to use Dreamweaver to build these?

any advice or any other books that are good to take you along building real world sites?

many thanks

0

Personally I use good old notepad, so can't really comment of Dreamweaver. I used it years ago but found it stuck in loads of additional code that I just didn't want.

A little mistake I made when learning PHP, don't leave it too long before you read up on AJAX. I was trying to do stuff with PHP which was really long and convuluted. Then I learned how AJAX works and it made the world of difference.

0

thanks hangfire

is it worth pulling down samples and playing about with them?

cheers

0

I started out using Dreamweaver for HTML/CSS. I noticed some bits I didn't understand so I clicked and tried - next thing you know I've got a database driven website. It was a great way to start, just waking me up to the possibilities of PHP/database stuff but it didn't take long before I realised that the 'Dreamweaver Way' led to large amounts of unnecessary and inflexible code.

So I started looking at, as mentioned above, tizag and W3schools - fantastic - didn't take long before I was writing my own code and not using Dreamweaver generated code at all.

I still use Dreamweaver but really only as a kind of notepad on steroids and I find the site/file management stuff handy. I would not buy it again if I was starting from scratch.

I think I would use Eclipse and Nvu if I didn't already have Dreamweaver ('cos they're free!).

0

thanks for all the help. will look at the above programs mentioned.

basically i need to create a simple contacts website for my company, allow people to see their contact and admin to see all and just not sure where to start? any pointers, places to look.

only reason i mentioned dreamweaver as someone told me all you need to do is ceate the mysql database and then dreamweaver will sort the rest out lol

anyway your help is greatly appreciated.

cheers

0

only reason i mentioned dreamweaver as someone told me all you need to do is ceate the mysql database and then dreamweaver will sort the rest out lol
cheers

That's more or less how I stumbled through my first application (a gig listing/booking thingie for my band) - Dreamweaver basically did it for me, it was very simple. In the end I started coding my applications without Dreamweaver's help because it is more efficient and versatile.

If you are starting from scratch then before you get down to the specifics of your app I would suggest that you write some test scripts so you learn the basics - figure how to:

Read the database
Add a record to the database
Edit a record in the database
Delete a record from the database

This will help: http://www.w3schools.com/PHP/php_mysql_intro.asp
Follow the tutorial and you'll figure it out, you won't need Dreamweaver, any text editor will do.

Then you can get down to the specifics of your app. Keep it simple to start. You're going to need some sort of login process I guess so I would start there.

0

thanks so much for all your help.

i will get into the above link.

0

That's more or less how I stumbled through my first application (a gig listing/booking thingie for my band) - Dreamweaver basically did it for me, it was very simple. In the end I started coding my applications without Dreamweaver's help because it is more efficient and versatile.

If you are starting from scratch then before you get down to the specifics of your app I would suggest that you write some test scripts so you learn the basics - figure how to:

Read the database
Add a record to the database
Edit a record in the database
Delete a record from the database

This will help: http://www.w3schools.com/PHP/php_mysql_intro.asp
Follow the tutorial and you'll figure it out, you won't need Dreamweaver, any text editor will do.

Then you can get down to the specifics of your app. Keep it simple to start. You're going to need some sort of login process I guess so I would start there.

hi,

can i just ask, does an sql query go into PHP, what i mean is when you see sql queries for querying the database does it go into your PHP script or is this something you need to do aswel as?

many thanks

0

I use NVU myself it works well. Although I am just starting out myself it isn't complex at all and generates code pretty well. But I also use VS web2008 express it easily creates login and such. I really stink at code and bty thanks for the links hangfire.

0

I use NVU myself it works well. Although I am just starting out myself it isn't complex at all and generates code pretty well. But I also use VS web2008 express it easily creates login and such. I really stink at code and bty thanks for the links hangfire.

hi thanks,

does vwd 2008 support php? i thought it only did .net/vb/c#?

does nvu generate php code or just html?

many thanks for all your help.

andy

0

By the looks of it no. This link explains that Silverlight 3 and or VS.Php something Blah Blah.
http://blogs.msdn.com/webdevtools/archive/2009/03/19/creating-silverlight-3-applications-for-php.aspx
Like I said I am new to all this. I mostly cut, copy, paste, and experiment as of now. Anyway
also try www.001webs.com they are a Linux server that sets up an online DB and Php Admin at least the options are there you need php 4.0 or something like that. Like I said I am a bit green...

0

hi,

can i just ask, does an sql query go into PHP, what i mean is when you see sql queries for querying the database does it go into your PHP script or is this something you need to do aswel as?

many thanks

Here you go - this is a very basic page which will get records from a database and list the result. It has everything you need to make the connection and get the list. It is not the only way to do it, it is meant to serve as a starting point - look at each line and make sure you know what it is doing and then get editing - you will need to edit the variables at the top anyway to make it work with your database:

<?php
 //Database server address - usually localhost or 127.0.0.1:
$host = '127.0.0.1';
 // Speaks for itself:
$usr = 'database user name goes here';
 // likewise:
$pword = 'database password goes here';
 // likewise:
$dbase = 'database name goes here';
 // likewise:
$db_table = 'database table name goes here';
 // likewise:
$db_field = 'database field name goes here';
 // Creates an empty variable which will contain your output later in the script:
$my_output = '';
 // Connects to the database:
mysql_connect($host, $usr, $pword) or die(mysql_error());
 // Selects the table in the database:
mysql_select_db($dbase) or die(mysql_error());
 // This forms the question (what are the details held in the field for all records in the table?) and puts it into $result:
$result = mysql_query("SELECT $db_field FROM $db_table");
 // This asks the question held in $result and begins looping through all of the returned records:
while($row = mysql_fetch_array($result)) {
 // This adds the answer from each record and tacks it onto the end of $my_output - note the .= (this means add what's on the right of the .= to what's on left of the .=):
$my_output .= $row[$db_field] . '<br />';
 // This closes the loop:
}
 // This closes the database:
mysql_close();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Database Query</title>
</head>
 
<body>
<?php echo $my_output // This will insert the output here ?>
</body>
</html>

The first bit I would seek to understand well is: mysql_query("SELECT $db_field FROM $db_table") - It is the bit that asks the question or gives an instruction - w3schools will help you with this.
hope this helps ...
Simon.

0

thanks so much for all your help, been absolutely great. Best support forum i have came across for PHP.

thanks for the example slyme and thanks coley for input and all for that.

i too just learning and getting to grips, what i did when learning to create websites years ago now was use notepad, pull down source code and play about with. think i will go that way as dreamweaver etc does not help me understand whats going on behind the scenes.

know of any examples to pull down or just stick with what you sent slyme?

many thanks again

0

I would suggest looking over w3schools tutorials. The reason being that if you use a work computer or a friends computer you are going to find it very complex. It is okay to use an editor likes this as I use something similar , but I would suggest learning on a simple text editor as then you can understand the code even without the colouring and explanations etc.

Try using just notepad, this will not indent lines for you or give you any suggestions or colour guides. It's better for the long run trust me.

0

I would suggest looking over w3schools tutorials. The reason being that if you use a work computer or a friends computer you are going to find it very complex. It is okay to use an editor likes this as I use something similar , but I would suggest learning on a simple text editor as then you can understand the code even without the colouring and explanations etc.

Try using just notepad, this will not indent lines for you or give you any suggestions or colour guides. It's better for the long run trust me.

thanks alot for the advice.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.