$Outlook = New-Object -ComObject Outlook.Application
$Mail = $Outlook.CreateItem(0)
$Mail.To = "email1"
$Mail.Recipients.Add("email2)
$Mail.Subject = "New Request"
$Mail.HTMLBody = " <input type='button' name='approve' value='Submit'/>   <input type='button' name='reject' value='Submit'/> <br/>"
$Mail.HTMLBody += "Kindly approve/reject the request
$Mail.Send()
By this script i am not able to display buttons in outlook email properly. But when opened in internet explorer button works fine.
I would also like to know after getting the button how to make it work such that clicking it send the value in the name to database
I want that when i click any of these buttons a Php runs and and column of a table in the database gets updated on clicking the button. What and where should i write the php and database[sql or oracle] script in the above code
Basically i want to have a approve/reject button for a request in email generated by Powershell and the response is then sent to database.
Php code that adds data in my db:
<?php
if(isset($_POST['submit']))
{
$connection = @oci_connect("username","password","db_name");
$badge= $_POST['BADGE'];
$_SESSION["badge"]=$badge;
$reason = $_POST['REASON'];
$dateFrom = $_POST['DATEFROM'];
$dateTo = $_POST['DATETO'];
$dd = $_POST['DD'];
$backup = $_POST['BACKUP'];
$employeeName = $_POST['EMPLOYEENAME'];
$daterequested = date("Y/m/d");
$_SESSION['datefrom'] = $dateFrom;
$_SESSION['dateto'] = $dateTo;
$main_query=oci_parse($connection,"INSERT INTO LEAVEINFO(BADGE,EMPLOYEENAME,TOL,DATEFROM,DATETO,DATEREQUESTED,STATUS,COMMENT1,BACKUP,REASON,LEAD) VALUES('$badge','$employeeName','$dd','$dateFrom','$dateTo','$daterequested','pending','','$backup','$reason','pending')");
oci_execute($main_query,OCI_COMMIT_ON_SUCCESS);
?>