• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 29
  • Last Modified:

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
0
AHMED SAMY
Asked:
AHMED SAMY
1 Solution
 
AHMED SAMYownerAuthor Commented:
sorry it was my fault form action
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now