fix3r Posted October 23, 2006 Share Posted October 23, 2006 I've tryed to put this in without any php and the tables work but when I try to put in the update sql database part and some php the page doesn't load when I go to the usercp.. no errors..just doesn't load the included page. Does anyone know what could be the matter?[code]<?phpsession_start();ob_start();if(!isset($_SESSION['login'])){echo "You are not logged in";}else {?><div id="include_container"><div id="include"><h1>UserCP</h1><p><?php if (isset($submitted)) {//form submit code here$realname = $_POST['realname'];$aim = $_POST['aim'];$msn = $_POST['msn'];$yahoo = $_POST['yahoo'];$profile = $_POST['profile'];$current_password = $_POST['password'];$password1 = $_POST['password1'];$password2 = $_POST['password2'];if($current_password < 0) {mysql_query("UPDATE users SET realname='" . strip_tags($realname) . "', aim='" . strip_tags($aim) . "', msn='" . strip_tags($msn) . "', yahoo='" . strip_tags($yahoo) . "', profile='" . strip_tags($profile) . "' WHERE username='" . $rs['username'] . "'");echo "Update Successful!";}elseif (sha1($current_password) == $rs['password'] && $password1 == $password2) {mysql_query("UPDATE users SET realname='" . strip_tags($realname) . "', aim='" . strip_tags($aim) . "', msn='" . strip_tags($msn) . "', yahoo='" . strip_tags($yahoo) . "', profile='" . strip_tags($profile) . "', password='" . strip_tags(sha1($password1)) . "' WHERE username='" . $rs['username'] . "'");echo "Update Successful!";} else { ?><form method="POST" action="<?php echo $SCRIPT_NAME ?>"><table><tr><td><th align="center" bgcolor="#4F4F4F">Personal Info</th></td></tr><tr><td><b>E-Mail Address</b></td><td><?php echo $rs['email']; ?></td></tr><tr><td><b>Real Name</b></td><td><input type="text" name="realname" size="16" maxlength="20" value="<?php echo $rs['realname']; ?>"></td></tr><tr><td><th align="center" bgcolor="#4F4F4F">Public Info</th></td></tr><tr><td><b>AOL Messenger</b></td><td><input type="text" name="aim" size="16" maxlength="16" value="<?php echo $rs['aim']; ?>"></td></tr><tr><td><b>MSN Messenger</b></td><td><input type="text" name="msn" size="16" maxlength="40" value="<?php echo $rs['msn']; ?>"></td></tr><tr><td><b>Yahoo! Messenger</td><td><input type="text" name="yahoo" size="16" maxlength="16" value="<?php echo $rs['yahoo']; ?>"></td></tr><tr><td><b>Personal Profile</b></td><td><textarea name="profile" cols="50" rows="7" id="profile"></textarea><?php echo $rs['profile']; ?></td></tr><tr><td><th align="center" bgcolor="#4F4F4F">Change Password</th></td></tr><tr><td><b>Current Password</b></td><td><input type="password" name="current_password" size="16" maxlength="16" value=""></tr><tr><td><b>Password</b></td><td><input type="password" name="password1" size="16" maxlength="16" value=""> <input type="password" name="password2" size="16" maxlength="16" value=""> * enter twice to make sure</td></tr></table><br><center><input type="submit" name="submitted" value="Save Changes"></form></center><?php } } } ?></div></div>[/code] Link to comment https://forums.phpfreaks.com/topic/24870-my-usercp-page-wont-load-php/ Share on other sites More sharing options...
fix3r Posted October 23, 2006 Author Share Posted October 23, 2006 anyone please, i've been working on this for a day now trying figure out this error but I can't find it..it looks like its a long code to look through but there is only a few lines of code that really matter that displays the page ;\thanks Link to comment https://forums.phpfreaks.com/topic/24870-my-usercp-page-wont-load-php/#findComment-113348 Share on other sites More sharing options...
orgle12 Posted October 23, 2006 Share Posted October 23, 2006 I'm not sure what your problem is, your if statemeants look to be well but maybe someone else might have something to say about this.orgle Link to comment https://forums.phpfreaks.com/topic/24870-my-usercp-page-wont-load-php/#findComment-113361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.