Select Statement MYSQL question usiong a HTML form I m trying to display Customer Information

Select statment being used, works great! but when I qwant to add another field to show on my screen it fails.

Good  ---    $result = mysqli_query($con,"SELECT emailaddress, aes_decrypt(password,'XXXXXXX') as encrypted from biomas.ITCustomerLogin where emailaddress = '$Email'");

Not Good does not work ---  $result = mysqli_query($con,"SELECT Customer, emailaddress, aes_decrypt(password,'XXXXXXX') as encrypted from biomas.ITCustomerLogin where emailaddress = '$Email'");

I am not sure but because the select statment s looking at email address as part of the key to decrypt the account password, i guessing I have some systax that is not correct when selecting more.

I hop ethis makes sense and someone can identfy the small problem?
Scott JohnstonIT Manager Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Walter RitzelSenior Software EngineerCommented:
Can you provide the table structure and the error that is being given?
0
Scott JohnstonIT Manager Author Commented:
Talble is MYSQL
Divson, Customer, Emailaddress,Password(BLOB),newsletter

 
 echo "Failed to connect to MySQL: " . mysqli_connect_error();
   }

$Email = mysqli_real_escape_string($con, $_GET['emailaddress']);

$result = mysqli_query($con,"SELECT Customer, emailaddress, aes_decrypt(password,'itpass') as encrypted from biomas.ITCustomerLogin where emailaddress = '$Email'");

echo "<table border='1'>
 <tr>
 <th>Password for Customers who logon to web site</th>
   </tr>";

 echo "<table border='1'>
 <tr>
 <th>Email Address</th>
 <th>Logon Password</th>
<th>Customer</th>
 </tr>";

 while($row = mysqli_fetch_array($result))  (Error from this line?)


   {
   echo "<tr>";
   echo "<td>" . $row['emailaddress'] . "</td>";
   echo "<td>" . $row['encrypted'] . "</td>";
     echo "<td>" . $row['Customer'] . "</td>";
     echo "</tr>";
   }
 echo "</table>";

 mysqli_close($con);
 ?>

Open in new window

0
Walter RitzelSenior Software EngineerCommented:
Are you sure that Customer is really capitalized as that, with first letter a capital C? Because you write Emailaddress with capital E, but in your previous working code, it is a lower e. MYSQL is case sensitive with field names.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Scott JohnstonIT Manager Author Commented:
Walter can you advise me on adding a :"Back Button"  I've been trying to use History Back Method but ?
0
Walter RitzelSenior Software EngineerCommented:
Can't you use a link back to the previous page?
0
Scott JohnstonIT Manager Author Commented:
Of Course,,, works like a top!!!!

Thanmk you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.