small help

AHMED SAMY
AHMED SAMY used Ask the Experts™
on
<?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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
owner
Commented:
sorry it was my fault form action

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial