Avatar of AHMED SAMY
AHMED SAMY
Flag for Egypt asked on

small help

<?php

	$localhost="*******";[embed=file 1213257]
	$db_users="*********";
	$db_password="**************";
	$db_name="********";

	$connect=mysqli_connect("$localhost","$db_users","$db_password","$db_name");
	
	if($connect){
		
		if ($_POST['submit']){
			
			$datepic=$_POST['datepic'];
			$duration=$_POST['duration'];
			$Adults=$_POST['Adults'];
			$Childs=$_POST['Childs'];
			$Rooms=$_POST['Rooms'];
			$Destination=$_POST['Destination'];
			$Tour=$_POST['Tour'];
			$Name=$_POST['Name'];
			$Email=$_POST['Email'];
			$Number=$_POST['Number'];
			
			if (empty($Name) && empty($Email) && empty($Number)){
				echo "<script type='text/javascript'> alert('please insert data to proceed')</script>";
			}
			else{
				$sql="INSERT INTO enquiry(datepic,duration,Adults,Childs,Rooms,Destination,Tour,Name,Email,Number) VALUES('$datepic','$duration','$Adults','$Childs','$Rooms','$Destination','$Tour','$Name','$Email','$Number')";
															
				$result=mysqli_query($connect,$sql);
				echo "<script type='text/javascript'> alert('saved successfully...')</script>";
						
				}
		}
	}
						
?>

Open in new window



i didn't save and no message after save refresh only nothin happen no error

attached my table image
2.jpg
PHP

Avatar of undefined
Last Comment
AHMED SAMY

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
AHMED SAMY

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck