473,516 Members | 3,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to display decrypted AES in php form

2 New Member
I have a form that I use php to retrieve data from MySQL and display that data in an input box. One of the fields is encrypted when the data is submitted into MySQL using AES_ENCRYPTED and that part works fine, I can see in the DB that that data is encrypted.
My issue is how to use AES_DECRYPT to display the decrypted data in my input box with my php code. For example my form has a field like this <input type="text" name="data" value="<?php echo $data2['data']?>"/> <--- This field being the encrypted data that I need to decrypted and display as it's original info.
I know that I can enter this at a MySQL command line SELECT aes_decrypt(data, '123456790abcdefghijklmnopqrstuvwxyz') FROM applications WHERE ID = '52' and it will display the data for record 52 decrypted I just don't know how to implement it in my php form.
I've tried this:
$data = "SELECT * FROM $tbl_name WHERE ID = $id";
$query = mysqli_query($conn, $data);
$data2 = mysqli_fetch_array($query);
and obviously it doesn't decrypt but it does show the encrypted data in the form.
I tried different variations of SELECT AES_DECRYPT('data', '$aeskey') FROM $tbl_name WHERE ID = $id"; and so on with no success.
I've tried to change the input value to value="<?php echo $data2[AES_DECRYPT('data', '$aeskey')]?>"/> and I get an empty input box.

Can someone help me get this solved PLEASE?
Apr 4 '17 #1
1 1140
REFGonzales
2 New Member
Don't know how to remove this post but I've solved my issue!
Apr 4 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2315
by: Nick | last post by:
Hi, I am tring to display a form that does not show in either the task bar or when the user alt-tabs. The form is running full screen and is set to have no border. Nick
1
1580
by: Mr Utkal Ranjan Pradhan | last post by:
Hi Friends I want to develop a windows service application, which will open a port on the machine and constantly it will listen from that port. And when any data comes to that port I want to display a Form with the data that has been receieved by the port. So plz guide me to do that. Can it be possible to display a form when any data comes...
2
1378
by: Bernie Yaeger | last post by:
I have developed a .dll to display a form that controls a simple routine. Oddly, you can't use messagebox.show unless you do one of two things: either use an imports system.windows.forms or system.windows.forms.messagebox.show etc Now this is strange, because the form inherits as below: Inherits System.Windows.Forms.Form
3
16368
by: Brett Romero | last post by:
My application start like this: frmMaster MainForm = new frmMaster(); System.Windows.Forms.Application.Run(MainForm); The flow is that MainForm shows then a SecondForm shows after the user does something. This is an MDI app so SecondForm needs to always be inside MainForm. There are times I need to automatically load the app and...
0
1354
by: yasker | last post by:
Hi, I got a problem in display a sub form. My app contains two form: main and sub. I want sub form display before main form, to provide some information to it. I use a NotifyIcon to activity sub form. In main form's loading event( and doubleclick event of notifyicon ), i wrote something like: notifyIcon.Visible = false;
5
18396
by: Paul | last post by:
Is it possible to display a form inside another form? What component should I use?
4
7590
ak1dnar
by: ak1dnar | last post by:
I need to display a form dynamically. First i load the page and at that time Login button will display. Nothing else. If some clicks the Login button, then only I want to display the Form. So what will be the best solution for this. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
1
2099
by: Zaher Rabah | last post by:
How can I display a form in dialog mode by press any keys in the keybaord in access 2003. This form is used as calculater "For fast calculate" This is the idea.
1
1234
by: menyki | last post by:
am designing a software. in the software i want the splash to display for sometime, say 1 minute then it will close and the main form will come up. i included timer control in the splash form i designed but my problem is how write the code to close the splash and display next form. please, can someone help and tell me how i will go about it.
0
1520
by: raza rizwan | last post by:
how to display submit form select field onther page... like as a image format.... and show select filed image... Plz help.... <form action="http://example.com/submit.php" method="post" name="ff_form1" id="ff_form1" enctype="multipart/form-data" onSubmit="return false;" class="bfQuickMode"> <div id="bfPage1" class="bfPage"...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7405
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7574
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3265
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.