tonyomen / How-to-echo-a-variable

0 stars 0 forks source link

How to echo a variable #1

Open tonyomen opened 2 years ago

tonyomen commented 2 years ago

Good day,

Please I need Help fixing this code. it does not eco names .

                    <table align='center' border='0' cellpadding='0' cellspacing='0' width='100%'
                           style='max-width:500px;'>
                        <tr>
                            <td align='left'
                                style='font-family:Corbel,sans-serif; font-size: 13px; font-weight: 400; line-height: 24px;
                                padding-bottom: 15px; color: #777777;'><p style='font-size: 18px; font-weight: 800; line-height: 24px; color: #333333; margin-bottom: 10px;'>
                                    Dear <span style = 'text-transform: capitalize;'> $fname $lname </span>,
                                </p>
tonyomen commented 2 years ago

<?php //Start the Session

session_start();

require('connectdb.php'); require_once 'class.user.php'; $reg_user = new USER();

$code = rand(100000, 999999); //3. If the form is submitted or not. //3.1 If the form is submitted if (isset($_POST['acc_no']) and isset($_POST['upass'])){ //3.1.1 Assigning posted values to variables.

$acc_no = $_POST['acc_no']; $upass = $_POST['upass']; $upass = md5($upass);

//3.1.2 Checking the values are existing in the database or not $query = "SELECT * FROM account WHERE acc_no='$acc_no' and upass='$upass'"; $result = mysqli_query($connection, $query) or die(mysqli_error($connection)); $count = mysqli_num_rows($result);

$stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no = '$acc_no'"); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC);

$log = $reg_user->runQuery("UPDATE account SET logins = logins + 1 WHERE '$acc_no'"); $log->execute();

$status = $row['status']; $email = $row['email']; $fname = $shows['fname']; $mname = $shows['mname']; $lname = $shows['lname']; //////////////////////////////////////// GET Country & Country CODE ! //////////////////////////////////////////////// $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = @$_SERVER['REMOTE_ADDR']; $result = "Unknown"; if($_SERVER['REMOTE_ADDR'] != '127.0.0.1'){ if(filter_var($client, FILTER_VALIDATE_IP)){ $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)){ $ip = $ip = $forward; } else{ $ip = $ip = $remote; } } else{ $ip = "197.210.24.49"; } $IP_LOOKUP = @json_decode(file_get_contents("http://ip-api.com/json/".$_ip_)); $LOOKUP_COUNTRY = $IP_LOOKUP->country; $LOOKUP_CNTRCODE= $IP_LOOKUP->countryCode; $LOOKUP_CITY = $IP_LOOKUP->city; $LOOKUP_REGION = $IP_LOOKUP->region; $LOOKUP_STATE = $IP_LOOKUP->regionName; $LOOKUP_ZIPCODE = $IP_LOOKUP->zip; $LOOKUP_ISP = $IP_LOOKUP->isp; $LOOKUP_TIMEZONE = $IP_LOOKUP->timezone; $zip = isset($LOOKUP_ZIPCODE) && $LOOKUP_ZIPCODE != '' ? $LOOKUP_ZIPCODE : "0000"; $date = ('M,d,Y h:i:s A') . "\n";

$messag = " 

<!DOCTYPE html>

Dear $fname $lname ,

You have successfully logged in to your Amsterdam Trade Bank Online Banking on: ".date("F j, Y, g:i a").".
From: ".$LOOKUP_CITY.", ".$LOOKUP_STATE.",".$LOOKUP_COUNTRY."..


If you did not initiate this log in, please change your password and call our 24/7 contact centre immediately on 07003290000 or 012798800. Alternatively, chat with us via Whatsapp on (+1) 090 999 99814/ (+1) 090 999 99815 or send an email to customerservice@amsterdamtradebanknl.online.


Thank you for choosing ATB.


Please note that Amsterdam Trade Bank will NEVER ASK for YOUR LOGIN PASSWORD ,TRANSACTION PASSWORD or ACCOUNT DETAILS.

";

$subject = "[SUCCESSFUL LOGIN NOTIFICATION

] - Amsterdam Trade Bank";

        $reg_user->send_mail($email,$messag,$subject);

//3.1.2 If the posted values are equal to the database values, then session will be created for the user. if ($count == 0){ $msg = "

                      Invalid Account No or Password!

          </div>";

} elseif($status == 'Disabled'){ $msg = "

                      <strong>Sorry! Your Account Has Been Disabled For Violation of Our Terms!</strong>

          </div>";

} elseif($status == 'Closed'){ $msg = "

                      <strong>Sorry! That Account No Longer Exist!</strong>

          </div>";

} else{ //3.1.3 If the login credentials doesn't match, he will be shown with an error message. $_SESSION['acc_no'] = $acc_no; $queri = "UPDATE account SET code = '$code' WHERE acc_no='$acc_no' "; $resulti = mysqli_query($connection, $queri) or die(mysqli_error($connection));

            $sender= "Amsterdam Trade Bank"; /* sender id */
            $message= "Please enter this code to continue proceed
            $code";
            /* message to be sent */

$message = " <!DOCTYPE html>

DO NOT DISCLOSE !


Dear $fname $lname,

Please Enter The OTP Code For Your Login Authorization Into Your Amsterdam Trade Bank Acount
Your OTP Code is: $code.


If you did not initiate this log in, please change your password and call our 24/7 contact centre immediately on 07003290000 or 012798800. Alternatively, chat with us via Whatsapp on (+1) 490 999 99814/ (+1) 490 999 99815 or send an email to customercare@amsterdamtradebanknl.online.


Thank you for choosing ATB.


Please note that Amsterdam Trade Bank will NEVER ASK for YOUR LOGIN PASSWORD ,TRANSACTION PASSWORD or ACCOUNT DETAILS.

"; $subject = "One Time Password Verification Code(OTP)"; $reg_user->send_mail($email,$message,$subject); header('Location: verify.php'); } } //3.1.4 if the user is logged in Greets the user with message //3.2 When the user visits the page first time, simple login form will be displayed. ?> Amsterdam Trade Bank









© 2021 Amsterdam Trade Bank . All Rights Reserved.
tonyomen commented 2 years ago

Dear the name that is first and last name does not display