mail($_POST[ email ],$subject,$body) or die( Could not send reminder email. ); } (Ipower web hosting)

mail($_POST[ email ],$subject,$body) or die( Could not send reminder email. ); } You assume, of course, that the user will immediately open his or her e-mail to read the password. You conveniently deposit users in the login page so they can enter their e-mail address and password. } redirect( login.php ); break; The following code may look very familiar. It is virtually identical to the previous Modify Account case, except this time, the user is changing his or her own data. Because of this, the access level does not get updated. case Change my info : session_start(); if (isset($_POST[ name ]) and isset($_POST[ email ]) and isset($_SESSION[ user_id ])) { $sql = UPDATE cms_users . SET email= . $_POST[ email ] . , name= . $_POST[ name ] . . WHERE user_id= . $_SESSION[ user_id ]; mysql_query($sql, $conn) or die( Could not update user account; . mysql_error()); } redirect( cpanel.php ); break; The following is the end of your switch statement. It s easy to forget to close it, which can be the cause of much debugging grief. We are here to remind you to close your switch! } That wasn t so bad, was it? It s a lot of code, but much of it is fairly similar. Check some variables, run some SQL code, redirect the user. That s pretty much how most transactions work. Try It Out Article Transactions It s time for another transaction file, this time dealing with articles. As you might have guessed, it will be controlling article submittal, publishing, and removal. 1. Now enter transact-article.php: We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Leave a Reply