<?php header("Access-Control-Allow-Origin: *"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <?php // Initialize the session session_start(); // Check if the user is logged in, if not then redirect him to login page if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){ // header("location: login.php"); // exit; } ?> <?php $firstName = $_POST["postdata"]; $lastName = $_POST["last_name"]; echo $firstName." ".$lastName; //enter name and lastname into your form and onclick they will be alerted ?> <?php // Include config file require_once "configs.php"; // Attempt select query execution $sql = "SELECT * FROM fixa where scode like 't%'"; $res = $db->query($sql); if ($res) { echo "<select name='qname' >"; while ($row = $res->fetchArray()) { echo "<option value=".$row['title'] .">" . $row['title'] . "</option>"; } echo "</select>"; // Free result set mysqli_free_result($result); } else{ echo "<p class='lead'><em>No records were found.</em></p>"; } ?>
Edit file:s_tcombo.php1934