Search
 
SCRIPT & CODE EXAMPLE
 

PHP

crud operations in php

<?php
// Check if the form is submitted
$personName = $_POST['personName'];
$address = $_POST['address'];
$mobile = $_POST['mobile'];
$email = $_POST['email'];
$message = $_POST['message'];
$tdate=new DateTime();
// form a sql query
$sql = "INSERT INTO tbquery (name, email, mobile,address, comment, postdate)
VALUES ('". $personName."',
'". $email ."',
'". $mobile ."',
'". $address ."',
'". $message ."',
'". $tdate->format('Y-m-d') ."'
)";
if (mysqli_query($conn, $sql)) {
echo "Your query posted successfully";
} else {
echo "Error: " . $sql . "" . mysqli_error($conn);
}

mysqli_close($conn);
 
?>
Comment

PREVIOUS NEXT
Code Example
Php :: Magento 2 create admin module 
Php :: install php-mysql 
Php :: taxonomy-{taxonomy-slug}.php 
Php :: which is file attributes in php 
Php :: laravel get() 
Php :: show date php by letters 
Php :: insert javascript in php 
Php :: laravel eloquent with 
Php :: php 8 Match Expression / Switch Case 
Php :: list function php 
Php :: assert symfony 
Php :: php vs python speed 
Php :: get city name from latitude and longitude in php using geocode api 
Php :: laravel mail 
Php :: what is isset in php 
Php :: laravel permissions package 
Php :: Convert an Integer Into a String in PHP 
Php :: get current date from year input php 
Php :: laravel validation rule 
Php :: laravel run function after forgot password 
Php :: run laravel without php artisan serve 
Php :: php-oop 
Php :: how to give points to referrer in laravel 
Php :: permission for multisite in wp-config.php file 
Php :: codeigniter ellipsis in php read more text 
Php :: laravel How do I chain multiple where and orWhere clause in laravel from an Array [duplicate] 
Php :: function placing bet using php 
Php :: if order has product id in array 
Php :: Laravel appends child when referencing it in attribute function 
Php :: inject multiple logger symfony 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =