DarkStreet
Expert Member
I hope you are sanitising those inputs.
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
I hope you are sanitising those inputs.
Ive read up about sanitizing and try as much as I can, without breaking the script... any help is welcome
If I understand what you mean, yes.
On the page where you update (ie update.php?id=45) you will have
However, on that same page, you want to view the record so you can see what you are editing...PHP:$query = "UPDATE users SET last_login = '".$date."' WHERE id = '".$_GET['id']."'";
So you will have
PHP:$query = "SELECT * FROM users WHERE id = '".$_GET['id']."'";
Oh, and the page where you click on the link:
But on this page you will have the following query:PHP:<a href = "update.php?id=$id">#<?php echo $id;?></a>
PHP:$query = "SELECT * FROM users";
I haven't used PHP in a while but that code seems vulnerable to an SQL injection attack.If I understand what you mean, yes.
On the page where you update (ie update.php?id=45) you will have
However, on that same page, you want to view the record so you can see what you are editing...PHP:$query = "UPDATE users SET last_login = '".$date."' WHERE id = '".$_GET['id']."'";
So you will have
PHP:$query = "SELECT * FROM users WHERE id = '".$_GET['id']."'";
Oh, and the page where you click on the link:
But on this page you will have the following query:PHP:<a href = "update.php?id=$id">#<?php echo $id;?></a>
PHP:$query = "SELECT * FROM users";
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.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.![]()