affordit Posted February 25, 2008 Share Posted February 25, 2008 Can someone tell me if they see a problem I don't please? Thanks <?php // this starts the session session_start(); include("config.inc.php"); mysql_connect(mysql,$n,$pw); mysql_select_db ($dbc) or die( "Unable to select database"); $query = "Select * FROM profile WHERE username = '$username' AND psword = '$psword'"; $r = mysql_query($query) or die(mysql_error()); $num=mysql_num_rows($r); if ($num >0) { $info = mysql_fetch_array($r); $id = $info['id']; $auth_name = $info['auth_name']; $username = $username; //Remember we're not fetching the username result anymore $address = $info['address']; $'city = $info['city']; $state = $info['state']; $zip = $info['zip']; $phone = $info['phone']; $acct_num = $info['acct_num']; $premium = $info['premium']; $email = $info['email']; $start_date = $info['start_date']; $end_date = $info['end_date']; $remind_date = $info['remind_date']; $psword = $psword; $lost_password = $info['lost_password_answer']; $valid = $info['valid']; $online = $info['online']; if ($valid == 0){ // // VALIDATE EMAIL // $update = "UPDATE `profile` SET `valid`=1 WHERE `id`=" . $rows['id']; mysql_query($update); print "<center><img src = 'logo1.gif'></center>"; include("top_mid_nav.inc"); echo "<table align='center' width='600'> <tr> <td align='center'><b>email validated.<br> Thank You</b></td></tr></table><hr><br><br>"; } if ($valid == 1){ // // NOTIFY USER THAT PAYMENT HAS NO BEEN RECIEVED // print "<center><img src = 'logo1.gif'></center>"; include("top_mid_nav.inc"); echo "<table align='center' width='600'> <tr> <td align='center'><b>Your payment has not yet been recieved.<br> Thank You</b></td></tr></table><hr><br><br>"; } if ($valid == 2){ // // LOG USER IN // $update = "UPDATE `profile` SET `online` = 1 WHERE `id`=" . $rows['id']; mysql_query($update); $_SESSION['id'] = $info['id']; $_SESSION['auth_name'] = $info['auth_name']; $_SESSION['username'] = $username; //Remember we're not fetching the username result anymore $_SESSION['address'] = $info['address']; $_SESSION['city'] = $info['city']; $_SESSION['state'] = $info['state']; $_SESSION['zip'] = $info['zip']; $_SESSION['phone'] = $info['phone']; $_SESSION['acct_num'] = $info['acct_num']; $_SESSION['premium'] = $info['premium']; $_SESSION['email'] = $info['email']; $_SESSION['start_date'] = $info['start_date']; $_SESSION['end_date'] = $info['end_date']; $_SESSION['remind_date'] = $info['remind_date']; $_SESSION['psword'] = $psword; $_SESSION['lost_password'] = $info['lost_password_answer']; $_SESSION['valid'] = $info['valid']; $_SESSION['online'] = $info['online']; include("header.inc"); include("main_text.inc"); } }else{ print "NO RECORDS FOUND"; } ?> Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 25, 2008 Share Posted February 25, 2008 Whats the error? This line $'city = $info['city']; Should be $city = $info['city']; Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted February 25, 2008 Share Posted February 25, 2008 you have a opps ' right here $'city = $info['city']; rewrite to $city = $info['city']; Quote Link to comment Share on other sites More sharing options...
affordit Posted February 25, 2008 Author Share Posted February 25, 2008 SWEEEET Thanks guys I couldn't see it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.