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
https://forums.phpfreaks.com/topic/92932-whats-wrong-with-this-im-not-seeing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.