Dreamweaver CS3/4/5 - Databases and PHP

If I understand what you mean, yes.

On the page where you update (ie update.php?id=45) you will have
PHP:
$query = "UPDATE users SET last_login = '".$date."' WHERE id = '".$_GET['id']."'";
However, on that same page, you want to view the record so you can see what you are editing...
So you will have
PHP:
$query = "SELECT * FROM users WHERE id = '".$_GET['id']."'";

Oh, and the page where you click on the link:
PHP:
<a href = "update.php?id=$id">#<?php echo $id;?></a>
But on this page you will have the following query:
PHP:
$query = "SELECT * FROM users";

Okay, it's starting to make sense now... I'll probably buy a VTC.com cd on MySQL too. I think my next quest will be to learn the ins and outs on how to structure a database, I kinda get myself into a knot every now and then and need to re-do it
 
If I understand what you mean, yes.

On the page where you update (ie update.php?id=45) you will have
PHP:
$query = "UPDATE users SET last_login = '".$date."' WHERE id = '".$_GET['id']."'";
However, on that same page, you want to view the record so you can see what you are editing...
So you will have
PHP:
$query = "SELECT * FROM users WHERE id = '".$_GET['id']."'";

Oh, and the page where you click on the link:
PHP:
<a href = "update.php?id=$id">#<?php echo $id;?></a>
But on this page you will have the following query:
PHP:
$query = "SELECT * FROM users";
I haven't used PHP in a while but that code seems vulnerable to an SQL injection attack.

no matter which forums you go to on the net, you always come across Dreamweaver bashes. I use dreamweaver alot, and dont see that much unnecessary code. The unnecessary code that it spits out is easy to pick up and remove. Beats the hell out of spending your whole day coding. :)
Depends highly on the person. Some people are slow at typing, need to think about their solution, spend lots of time debugging, not sure how to accomplish something, etc. etc. Hand coded solutions can often be quicker and in most cases more maintainable, it all depends on how experienced and adept the developer is.
 
Top
Sign up to the MyBroadband newsletter
X