Most Rated Articles

Installing Apache and Apache Modules the easy way

The Essential steps on how to Sysprep Windows 7

SSH is very much similar to telnet. SSH is a shell program which allows a user remote access and the ability to execute commands over a network.

It is important to protect your wireless networks from unwanted and abusive users. Unauthorized users may reduce the bandwidth and may lock up your network

There are many methods on how to optimize apache. It could be on the software side, but upgrading the hardware also makes a difference.

With Windows 7 as a new OS in the market, one may worry about any problems that could be encountered especially network issues such as compatibility with older OS. Windows 7 might encounter problems communicating with older Windows models such as XP. The following are ways on how to network Windows 7 and XP.

One way of installing windows over the network is through the use of RIS or Remote Installation Services. However, you must have the following prerequisites in order to install Windows over the network.

Installing a printer on a mac is just as easy as installing a printer on an OS of Windows. The following steps are just some of the steps on how to connect your printer a Mac operating system.

Nowadays, it is important to have access to Wi-Fi. However, not everyone has their own internet connection so most people leech wherever there is free Wi-Fi. Most routers with Wi-Fi access require passwords but nowadays, there are other places to look around and search for free Wi-Fi.

Some applications cannot install in Windows 7 due to incompatibility issues. A solution would be to enable XP mode in a virtual environment of Windows 7. This configuration may be used to run and install programs that were incompatible in Windows 7.

Programming  »  PHP
 Picture

MySQL Update Query using PHP

By: Jerry Slagger
Date Added : June 19, 2009 Views : 1669




This example PHP script uses the MySQL Update Query to update a users password in the user MySQL table.

First we will display a password reset form to the user. This is a simple form that only has one input field.

<form name="Password_Reset" method="post" action="password.php?action=reset">
 <table>
 <tr>
  <td>New Password:</td>
  <td><input type="text" name="NewPassword" SIZE="12" MAXLENGTH="12"></td>
 </tr>
 </table>
 <input type="submit" value="Save">
</form>

Next we will get the submitted data and updated the MySQL table with the new password.

// Get username from session variable
$user = $_Session['username'];

// Get action to preform
$action = $_GET['action'];

// Get New Password
$NewPass = $_POST['NewPassword'];

// Check if for was submitted
if($action == "reset") {

    // Connect to MySQL Database
    $dbconn = mysql_connect("server","username","password");

    // Select MySQL Database to update
    mysql_select_db("dbname", $dbconn);

    // Form was submitted, update database
    mysql_query("UPDATE users SET password='$NewPass' WHERE username='$user'") or die(mysql_error());

    // Close MySQL Database Connection
    mysql_close($dbconn);

}


Overall this is how you update data in a MySQL database. Obviously you will want to add error checking and other features to make your script work for your given requirements.




Article Categories