File manager - Edit - /home/custbahd/public_html/webs/monitor/clients/marylhouse/index/checkout/original improved index.php
Back
<?php if(isset($_POST['submit'])) { $host="localhost";//host name $username="root"; //database username $password="";//database word $db_name="maryl";//database name $tbl_name="checkout"; //table name $con=mysqli_connect("$host", "$username", "$password","$db_name")or die("cannot connect");//connection string $fname = $_POST['fname']; $lname = $_POST['lname']; $region = $_POST['region']; $type = $_POST['type']; $quantity = $_POST['quantity']; $price = $_POST['price']; $image = $_POST['image']; $area = $_POST['area']; $street = $_POST['street']; $phone = $_POST['phone']; $email = $_POST['email']; $subtotal = $_POST['subtotal']; $delivery = $_POST['delivery']; $discount = $_POST['discount']; $total = $_POST['total']; $name1=$_POST['name']; $name2=""; foreach($name1 as $name3) { $name2 .= $name3.","; } $in_ch=mysqli_query($con,"insert into checkout(name,fname,lname,region,type,quantity,price,image,area,street,phone,email,subtotal,delivery,discount,total) values ('$name2','$fname','$lname','$region','$type','$quantity','$price','$image','$area','$street','$phone','$email','$subtotal','$delivery','$discount','$total')"); if($in_ch==1) { echo'<script>alert("Inserted Successfully")</script>'; } else { echo'<script>alert("Failed To Insert")</script>'; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2 |
proxy
|
phpinfo
|
Settings