Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div data-role="page" id="view_record">
- <div data-role="header">
- <a href="#" data-rel="back" class="ui-btn-right ui-btn ui-btn-icon-notext ui-corner-all ui-icon-back">Back</a>
- <img class="img-responsive" src="images/logo2.png" alt="OccuTrace" height="50">
- <div data-role="main" class="ui-content">
- <form method="post" action="saveRecord.php">
- <label for="bus_name">Business Name:</label>
- <input type="text" name="bus_name" id="bus_name" placeholder="Enter Business Name">
- <label for="bus_type">Business Type:</label>
- <input type="text" name="bus_type" id="bus_type" placeholder="Enter Business Type">
- <label for="bus_tel">Business Tel:</label>
- <input type="text" name="bus_tel" id="bus_tel" placeholder="Enter Business Tel No">
- <label for="bus_img">Business Photo:</label>
- <input type="file" name="bus_img" id="bus_img" accept="image/*;capture=camera">
- <label for="comments">Comments:</label>
- <textarea name="comments" id="comments" placeholder="Enter Comments"></textarea>
- <input type="submit" value="Submit">
- </form>
- </div>
- </div>
- </div>
- <?php
- $bus_img = $test_name = "";
- $servername = "";
- $username = "";
- $password = "";
- $dbname = "";
- $bus_img = $_POST["bus_img"];
- $bus_name = $_POST["bus_name"];
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- $conn = mysqli_connect($servername, $username, $password, $dbname);
- if (!$conn)
- {
- die("Connection failed: " . mysqli_connect_error());}
- $sql = "INSERT INTO tblLead(leadImage, occupantName)
- VALUES ('$bus_img','$test_name')";
- if (mysqli_query($conn, $sql))
- {
- } else
- {
- echo "Error: " . $sql . mysqli_error($conn);
- }
- mysqli_close($conn);
- exit();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement