Jump to content

whats wrong with this im not seeing


affordit

Recommended Posts

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";
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.