Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

ruzalo / airline-booking

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • airline-booking
  • php_files
  • contact_database.php
Find file
BlameHistoryPermalink
  • Ryo's avatar
    Updated php_files folder · b07feecf
    Ryo committed 5 years ago
    b07feecf
contact_database.php 605 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<?php
  if(isset($_POST['submit'])){
  $selected_val = $_POST['Subject'];  // Storing Selected Value In Variable
  echo "You have selected :" .$selected_val;  // Displaying Selected Value
  }
?>

<?php
// connect to the database
$con = mysqli_connect("anysql.itcollege.ee", "WT16", "iLtQlUerkT", "WT16");

// Check connection
if (mysqli_connect_errno())
   {
   echo "Failed to connect to MySQL: " . mysqli_connect_error();
   }

$data = mysqli_query($con, "INSERT INTO Contact (Contact_Name, Email, Subject, Message)
VALUES ('$Contact_Name', '$Email', '$Subject', '$Message')");

mysqli_close($con);

?>