%PDF- %PDF-
Direktori : /home/ugotscom/public_html/backwater-old2/payment/ |
Current File : /home/ugotscom/public_html/backwater-old2/payment/meTrnReq.php |
<?php // servername => localhost // username => root // password => empty // database name => staff $conn = mysqli_connect("localhost", "root", "", "kma"); // Check connection if($conn === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } // Taking all 5 values from the form data(input) $org = $_POST['org']; $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $address = $_POST['address']; $gender = $_POST['gender']; $participants = 1; $amount=$_POST['amount']*100; // We are going to insert the data into our sampleDB table $sql = "INSERT INTO registration (organization, name, phone,email,address,participants,amount) VALUES ('$org', '$name','$phone','$email','$address','$participants','$amount')"; // Check if the query is successful if(mysqli_query($conn, $sql)){ echo "<h3>data stored in a database successfully." . " Please browse your localhost php my admin" . " to view the updated data</h3>"; } else{ echo "ERROR: Hush! Sorry $sql. " . mysqli_error($conn); } // Close connection mysqli_close($conn); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Normal Transaction</title> <style> body{ font-family:Verdana, sans-serif ; font-size:12px; } .wrapper{ width:980px; margin:0 auto; } table{ } tr{ padding:5px } td{ padding:5px; } input{ padding:5px; } </style> <script type="text/javascript"> function getData() { var d = new Date(); var n = d.getTime(); var orderID = n + '' +randomFromTo(0,1000); document.getElementById("OrderId").value = orderID; return true; } function randomFromTo(from, to){ return Math.floor(Math.random() * (to - from + 1) + from); } </script> </head> <body onload="getData();"> <div class="wrapper"> <H3> Transaction Request </H3> <form action="meTrnPay.php" method="post"> <table> <tr> <td><label for="one"> Order No.</label></td> <td><input type="text" value="" id="OrderId" name="OrderId"></td> <td><label for="one"> Total Amount </label></td> <td><input type="text" value="<?php echo $amount?>" id="amount" name="amount"></td> <td><label for="one"> Currency Name </label></td> <td><input type="text" value="INR" id="currencyName" name="currencyName"> </td> </tr> <tr> <td><label for="two">Transaction Type (S/P/R)</label></td> <td><input type="text" value="S" id="meTransReqType" name="meTransReqType"></td> <td><label for="two">Recurring Period(NA/W/M)</label></td> <td><input type="text" value="" id="recurPeriod" name="recurPeriod"></td> <td><label for="two">Recurring Day</label></td> <td><input type="text" value="" id="recurDay" name="recurDay"></td> </tr> <tr> <td><label for="three">No Of Recurring</label></td> <td><input type="text" name="numberRecurring" id="numberRecurring" value=""></td> <td><label for="three">Merchant ID</label></td> <td><input type="text" name="mid" id="mid" value="AWL000000000001"></td> <td><label for="three">Encryption Key</label></td> <td><input type="text" name="enckey" id="enckey" value="4f5390bey3ef1ee3d4a7e77fd42238cb"></td> </tr> <tr> <td><label for="addField1">Add Field 1</label></td> <td><input type="text" name="addField1" id="addField1" /></td> <td><label for="addField2">Add Field 2</label></td> <td><input type="text" name="addField2" id="addField2" /></td> <td><label for="addField3">Add Field 3</label></td> <td><input type="text" name="addField3" id="addField3" /></td> </tr> <tr> <td><label for="addField4">Add Field 4</label></td> <td><input type="text" name="addField4" id="addField4" /></td> <td><label for="addField5">Add Field 5</label></td> <td><input type="text" name="addField5" id="addField5" /></td> <td><label for="addField6">Add Field 6</label></td> <td><input type="text" name="addField6" id="addField6" /></td> </tr> <tr> <td><label for="addField7">Add Field 7</label></td> <td><input type="text" name="addField7" id="addField7" /></td> <td><label for="addField8">Add Field 8</label></td> <td><input type="text" name="addField8" id="addField8" /></td> <td><label for="responseUrl">Response Url</label></td> <td><input type="text" name="responseUrl" id="responseUrl" /></td> </tr> <tr> <td> <input type="submit" class="btn btn-danger btn-block" style="background:#33CC33;padding:5px;font-size:15px" name="CHECKOUT" value= "CHECKOUT" /> </td> </tr> </table> </form> </div> </body> </html>