HTML/JQuery show/hide panel on hover - php

I am fairly new to HTML with some PHP thrown in for MSSQL queries, but I would like to add some additional functionality to a page I am building that may need some jquery.
My question: How can I have the Primary Panel, shown in screen shot below, show/appear when I hover over 'View Details' of the 'Jobs Today' panel and hide when the cursor moves from 'View Details'? At the moment its always visible. I have included some code snippets to show how each section is built.
Build Jobs panel:
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<div class="row">
<div class="col-xs-3">
<i class="fa fa-tasks fa-5x"></i>
</div>
<div class="col-xs-9 text-right">
<div class="huge"><?php echo $jobCount ?></div>
<div>Jobs Today</div>
</div>
</div>
</div>
<div class="panel-footer">
<span class="pull-left">View Details</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
<div class="clearfix"></div>
</div>
</div>
</div>
Build Primary Panel (yet to be populated with job info)
<div class="col-lg-4">
<div class="panel panel-primary">
<div class="panel-heading">
Primary Panel
</div>
<div class="panel-body">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum tincidunt est vitae ultrices accumsan. Aliquam ornare lacus adipiscing, posuere lectus et, fringilla augue.</p>
</div>
<div class="panel-footer">
Panel Footer
</div>
</div>
</div>
As always, thanks in advance. Hopefully I haven't missed anything :)
EDIT: I now have the hide working. The details panel is shown when the page first loads, I hover over the 'View Details' and when I leave the panel disappears. What am I missing. Here is the code as is now:
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<div class="row">
<div class="col-xs-3">
<i class="fa fa-tasks fa-5x"></i>
</div>
<div class="col-xs-9 text-right">
<div class="huge">
<?php echo $jobCount ?>
</div>
<div>Jobs Today</div>
</div>
</div>
</div>
<div id="jobs-wrapper">
<a href="#">
<div class="panel-footer" data-panel="job-details">
<span class="pull-left">View Details</span>
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i> </span>
<div class="clearfix"></div>
</div>
</a>
</div>
</div>
</div>
<!-- /.row -->
<div class="col-lg-4">
<div class="panel-primary-jobs" id="job-details">
<div class="panel-heading">
Jobs Today
</div>
<div class="panel-body">
<p>This is where Job info will go</p>
</div>
<div class="panel-footer">
Close
</div>
</div>
</div>
</div>
and the jquery
$('#jobs-wrapper a').mouseenter(function(e) {
if ($(this).data('panel'))
{
$('.panel-primary-jobs').hide();
$('#' + $(this).data('panel')).show();
}
});
$('#jobs-wrapper').mouseleave(function()
{
$('.panel-primary-jobs').hide();
}
);

First, add some classes to tell apart the .header from the .details:
<div class="panel panel-primary header">...</div>
<div class="panel panel-primary details hidden">...</div>
And then:
$('.primary-panel .panel-footer')
.hover( () => $('.details').show(), () => $('.details').hide())
The first function is the hover in handler and the second one, the hover out

Related

Divs below another with bootstrap 5 and not going to side

I'm trying to align a div like a gallery through a loop,
is there a way to do this efficiently with bootstrap? they just stay one above another. I tried to make more divs, but they repeat the results of first too. I'm using Laravel 9.0 and Bootstrap 5.0
#extends('master')
<body class="bg-light"></body>
<div class="container-fluid">
<div class="px-lg-5">
<?php
if (!empty($sql)) {
foreach ($sql as $value) {
?>
<div class="row">
<!-- Gallery item -->
<div class="col-xl-3 col-lg-4 col-md-6 mb-4 float-left">
<div class="bg-white rounded shadow-sm"><img src="https://bootstrapious.com/i/snippets/sn-gallery/img-1.jpg" alt="" class="img-fluid card-img-top">
<div class="p-4">
<h5> <?php echo $value->name; ?></h5>
<p class="small text-muted mb-0">Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
<p class="small text-muted mb-0">Avaliable: <?php echo $value->quantity ?></p>
<div class="d-flex align-items-center justify-content-between rounded-pill bg-light px-3 py-2 mt-4">
<p class="small mb-0"><span class="font-weight-bold">R$<?php echo $value->price ?></span></p>
<div class="badge badge-danger px-3 rounded-pill font-weight-normal">
<span class="text-dark"><?php echo substr($value->category, 0, 7); ?></span>
</div>
<div>
GET
</div>
<div>
GET
</div>
</div>
</div>
</div>
</div>
<!-- End -->
<?php } ?>
<!-- End -->
<?php } ?>
</div>
<div class="py-5 text-right">Show me more</div>
</div>
</div>
</body>
seeing the code shows you are creating more rows with the foreach. try this code that i provided whether it will solve your issues
<div class="container-fluid"><div class="px-lg-5">
<div class="row">
<?php if (!empty($sql)) {
foreach ($sql as $value) { ?>
<!-- Gallery item -->
<div class="col-xl-3 col-lg-4 col-md-6 mb-4 float-left">
<div class="bg-white rounded shadow-sm"><img src="https://bootstrapious.com/i/snippets/sn-gallery/img-1.jpg" alt="" class="img-fluid card-img-top">
<div class="p-4">
<h5> <?php echo $value->name; ?></h5>
<p class="small text-muted mb-0">Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
<p class="small text-muted mb-0">Avaliable: <?php echo $value->quantity; ?></p>
<div class="d-flex align-items-center justify-content-between rounded-pill bg-light px-3 py-2 mt-4">
<p class="small mb-0"><span class="font-weight-bold">R$<?php echo $value->price; ?></span></p>
<div class="badge badge-danger px-3 rounded-pill font-weight-normal">
<span class="text-dark"><?php echo substr(
$value->category,
0,
7
); ?></span>
</div>
<div>
GET
</div>
<div>
GET
</div>
</div>
</div>
</div>
</div>
<!-- End -->
<?php } ?>
<!-- End -->
<?php
} ?>
</div>
<div class="py-5 text-right">Show me more</div>
<div class="row"> shouldn't be in the foreach loop. Each item has a single row if you use it in the foreach loop.
Find:
<?php
if (!empty($sql)) {
foreach ($sql as $value) {
?>
<div class="row">
...
</div>
<?php
}
}
?>
Replace with:
<div class="row">
<?php
if (!empty($sql)) {
foreach ($sql as $value) {
?>
...
<?php
}
}
?>
</div>
In bootstap, row is a master container. col means grids inside the container.
egg:
<div class="row">
<div class="col-md-3">
item 1
</div>
<div class="col-md-3">
item 2
</div>
<div class="col-md-3">
item 3
</div>
<div class="col-md-3">
item 4
</div>
</div>
Please check here
link
Your mistake is to loop the main container.
#extends('master')
<body class="bg-light"></body>
<div class="container-fluid">
<div class="px-lg-5">
<div class="row">
<?php
if (!empty($sql)) {
foreach ($sql as $value) {
?>
<!-- Gallery item -->
<div class="col-xl-3 col-lg-4 col-md-6 mb-4 float-left">
<div class="bg-white rounded shadow-sm"><img src="https://bootstrapious.com/i/snippets/sn-gallery/img-1.jpg" alt="" class="img-fluid card-img-top">
<div class="p-4">
<h5> <?php echo $value->name; ?></h5>
<p class="small text-muted mb-0">Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
<p class="small text-muted mb-0">Avaliable: <?php echo $value->quantity ?></p>
<div class="d-flex align-items-center justify-content-between rounded-pill bg-light px-3 py-2 mt-4">
<p class="small mb-0"><span class="font-weight-bold">R$<?php echo $value->price ?></span></p>
<div class="badge badge-danger px-3 rounded-pill font-weight-normal">
<span class="text-dark"><?php echo substr($value->category, 0, 7); ?></span>
</div>
<div>
GET
</div>
<div>
GET
</div>
</div>
</div>
</div>
</div>
<!-- End -->
<?php } ?>
<!-- End -->
<?php } ?>
</div>
<div class="py-5 text-right">Show me more</div>
</div>
</div>
</body>
You had closed your body tag at 2nd line.
Try this:
#extends('master')
<body class="bg-light">
<div class="container-fluid">
<div class="px-lg-5">
<?php
if (!empty($sql)) {
foreach ($sql as $value) {
?>
<div class="d-flex">
<!-- Gallery item -->
<div class="col-xl-3 col-lg-4 col-md-6 mb-4 float-left">
<div class="bg-white rounded shadow-sm"><img src="https://bootstrapious.com/i/snippets/sn-gallery/img-1.jpg" alt="" class="img-fluid card-img-top">
<div class="p-4">
<h5> <?php echo $value->name; ?></h5>
<p class="small text-muted mb-0">Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
<p class="small text-muted mb-0">Avaliable: <?php echo $value->quantity ?></p>
<div class="d-flex align-items-center justify-content-between rounded-pill bg-light px-3 py-2 mt-4">
<p class="small mb-0"><span class="font-weight-bold">R$<?php echo $value->price ?></span></p>
<div class="badge badge-danger px-3 rounded-pill font-weight-normal">
<span class="text-dark"><?php echo substr($value->category, 0, 7); ?></span>
</div>
<div>
GET
</div>
<div>
GET
</div>
</div>
</div>
</div>
</div>
<!-- End -->
<?php } ?>
<!-- End -->
<?php } ?>
</div>
<div class="py-5 text-right">Show me more</div>
</div>
</div>
</body>

Move the widget to the right side of the web page using bootstrap 4

I want the information tag to be at the right side of the web page. Rest of the things are in the middle of the page. While I am not able to move the information to the right side. Also, because of it the footer disappeared. While I remove the information code, the footer works. Please help me right-align the information widget and also have the footer too.
<div class="container">
<div class="card border-light mb-3 text-center">
<p class="card-header">Videos</p>
</div>
<div id="userSuccess" class="hide" role="alert">
<div id="successUserContent"></div>
</div>
<div class="row" id="userVid">
<?php
$allVid = Schema::getAll();
for ($i = 0; $i < count($allVid); $i++) {
echo <<<HTML
<div class="col-lg-4 col-md-6 mb-4">
<div class="card h-100">
<div class="card-body">
<img class="card-img-top" src="http://placehold.it/700x400" alt="">
<h4 class="card-title">{$allVid[$i]->getTitle()} </h4>
</div>
</div>
</div>
HTML;
}
?>
</div>
<div class="row">
<div class="col-md-4 order-md-2 mb-4">
<div class="card my-4">
<h5 class="card-header">Information</h5>
<div class="card-body">
<div class="row">
<ul class="list-unstyled mb-0">
<li>
...
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
require_once './page/footer.php';
?>
For right align, you'll want to add the class of "justify-content-end" after your "row" class.
<div class="row justify-content-end"><!-- ADDED HERE-->
<div class="col-md-4 order-md-2 mb-4">
<div class="card my-4">
<h5 class="card-header">Information</h5>
<!-- REST OF YOUR CODE-->
For your footer, you'll need to wrap your URL in parenthesis.
<?php require_once('/yourdirectory/yourfooter.php'); ?>

Show in view only object with specified id

i am woking on a project about a restaurant and i need to show on my staff view only the Chef and Su-Chef which has id (Chef-2, Su-Chef 4).
I need to show on my view all the Chefs and all the Su-Chefs.
The view is organised at the form that is the number is odd (i have the image on left and text on right), if the number is even i have (i have the image on right and text on left)
Here is my Controller
public function index()
{
$staff = Staff::where('visible','yes')->where('delete','no')->orderBy('name','DESC')->get();
return view('staff.staff', ['staff' => $staff]);
}
And this is my View
<section class="bg-deep-yellow">
<div class="container">
<div class="row">
<!-- section title -->
<div class="col-md-12 text-center">
<span class="title-small black-text text-uppercase letter-spacing-3 font-weight-600">I NOSTRI CHEF</span>
<div class="separator-line-thick bg-black no-margin-bottom margin-one xs-margin-top-five"></div>
</div>
<!-- end section title -->
</div>
<div class="row margin-ten no-margin-bottom">
<!-- chef -->
<div class="col-md-12 sm-margin-bottom-ten">
<div class="col-md-5 chef-img cover-background" style="background-image:url({{URL::asset('external_assets/assets/images/images_downloaded/chef.jpg') }});">
<div class="img-border"></div>
</div>
<div class="col-md-7 chef-text bg-white text-center">
<img src="{{URL::asset('external_assets/assets/images/images_downloaded/kapele.png') }}" alt=""/><br>
<span class="text-large black-text text-uppercase letter-spacing-3 font-weight-600 margin-ten display-block no-margin-bottom">Patrick Smith</span>
<span class="text-small text-uppercase letter-spacing-3">Chef, Co-Founder</span>
<p class="text-med margin-ten width-90 center-col" style="text-align: justify">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</p>
</div>
</div>
<!-- end chef -->
<!-- chef -->
<div class="col-md-12">
<div class="col-md-7 chef-text bg-white text-center">
<img src="{{URL::asset('external_assets/assets/images/images_downloaded/bari.png') }}" alt=""/><br>
<span class="text-large black-text text-uppercase letter-spacing-3 font-weight-600 margin-ten display-block no-margin-bottom">Sancho Pansa</span>
<span class="text-small text-uppercase letter-spacing-3">Bartender</span>
<p class="text-med margin-ten width-90 center-col" style="text-align: justify" >Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
</div>
<div class="col-md-5 chef-img cover-background" style="background-image:url({{URL::asset('external_assets/assets/images/images_downloaded/chef2.jpg') }});">
<div class="img-border"></div>
</div>
</div>
<!-- end chef -->
</div>
</div>
</section>
This is an image of my view

bootstrap php includes with sidebar

Okay, so this is a first for me. Using php includes.
The problem I'm running into is that the content for the page is being pushed down onto another row when i include the sidebar.php.
This is the code for the side bar. The content means pretty much nothing now, because I'll probably change a couple of things. But the col-md-3 class is the thing that most confusing, because it should in theory work in tandem with the pages col-md class.
<?php include('head.php'); ?>
<!--- Start of accordion ---->
<div class="container">
<div class="panel-group col-md-3 panel_custom_group" id="accordian">
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
APPAREL <span class="panel_plus">+</span>
</h4>
</div>
<div class="panel-collapse collapse" id="apparel">
<div class="panel-body">
<div class="panel-heading">
<h4 class="panel-title">
ALL PRODUCTS <span class="panel_plus">+</span>
</h4>
</div>
<div class="panel-collapse collapse" id="allproducts">
<div class="panel-body">
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
HEADWEAR<span class="glyphicon glyphicon-plus side_bar_glyph"></span>
</h4>
</div>
<div class="panel-collapse collapse" id="headwear">
<div class="panel-body">
</div>
</div>
</div>
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
BAGS<span class="glyphicon glyphicon-plus"></span>
</h4>
</div>
<div class="panel-collapse collapse" id="bags">
<div class="panel-body">
</div>
</div>
</div>
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
GIFTS<span class="glyphicon glyphicon-plus"></span>
</h4>
</div>
<div class="panel-collapse collapse" id="gifts">
<div class="panel-body">
</div>
</div>
</div>
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
BRANDS<span class="glyphicon glyphicon-plus"></span>
</h4>
</div>
<div class="panel-collapse collapse" id="brands">
<div class="panel-body">
</div>
</div>
</div>
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
CATEGORIES<span class="glyphicon glyphicon-plus"></span>
</h4>
</div>
<div class="panel-collapse collapse" id="categories">
<div class="panel-body">
</div>
</div>
</div>
<div class="panel panel-custom">
<div class="panel-heading">
<h4 class="panel-title">
SPECIALS<span class="glyphicon glyphicon-plus"></span>
</h4>
</div>
<div class="panel-collapse collapse" id="specials">
<div class="panel-body">
</div>
</div>
</div>
</div>
</div>
<!--- end of accordian ---->
And this is the page i inserted it into.
<?php include('head.php'); ?>
<div class="breadcrumb">
<p>Home > Registration</p>
</div>
<section class="container registr_middle col-md-6">
<img class="img-responsive" src="images/become_a_partner_banner.jpg" title="Become a Partner" alt="Become a Partner" />
</section>
<section class="registr_side col-md-3">
<div>
<h3>Partner Registration</h3>
<p>Becoming an Altitude partner can be a life changing event. As Altitude Leisurewear is a sincerely TRADE ONLY SUPPLIER the criteria to become an Altitude agent.<br />
In order to register as an approved distributor of the Altitude Leisure Wear brand, you will be required to complete the following documentation.<br />
Once completed, the following information must be signed and faxed to: <strong>086 580 0596</strong>.<br /></p>
<p class="background_para">Any incomplete application forms will be disregarded</p>
<ul>
<li>A signed copy of our client profile document</li>
<li>A signed copy of our standard terms and conditions</li>
<li>A copy of company Registration(CK Form)</li>
<li>A company profile verifying that our primary business is the resale of corporate and promotional products.</li>
<li>A copy of your business card</li>
<li>A copy of your ID document</li>
<li>An invoice os order to a client or from a supplier showing that you re-sell sorporate wear</li>
</ul>
<p>Please complete the application form below to register with Altitude Leisure Wear. A Customer Care representative will forward you the documentation that needs to be completed in order to do the verification of your status.</p>
</div>
</section>
So shouldn't the side bar's width work with the main content of the pages width. They both add up to 12 (for the grid system).
I think you shoudn't use .container and .col-md-6 on the same element.
It should look like this:
<div class="container-fluid">
<div class="row">
<div class="col-md-6">First half</div>
<div class="col-md-6">Second half</div>
</div>
</div>
http://getbootstrap.com/css/#grid
I let it work by putting a 'div' with the class of 'col-md-3' around the include line and then wrapped all the contents in a container div. I then removed the 'col-md-3' in the sidebar.php file.
<div class="col-md-3">
<?php include('sidebar.php'); ?>
</div>

Log in function broke

Trying to accomplish a simple login form that redirects the user to index.php where only members are allowed. It worked fine when I were using mysql but when I switched my codes to mysqli it seems that I just can't get the function to work.
What happens when I click login: The input fields resets.
What have I done to solve this:
I have sent my codes to a friend and when he tried the login function it worked fine for him.
He can't find any errors in the code as well.
I have set "report all errors", I have recreated my database, created new users with full privileges, went through my codes a couple of time without having the success to tell what's wrong. Hopefully someone more trained than me can give me a good reason why my code does not work.
Database structure:
phpMyAdmin
Server version: 5.6.20
DB Name: websecurity
Tables: 2
login: username, password, email, fname, lname
guestbook: username, comment
Code for the login function, login.php:
<?php
session_start();
error_reporting(E_ALL); ini_set('display_errors', '1');
?>
<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="wrapper">
<p>Register | Login</p>
<h4>Login</h4>
<?php
if(isset($_POST["submit"])){
//Connect
$mysqli = new mysqli("localhost", "member", "samsung", "websecurity");
if($mysqli->connect_errno) {
die("Connect failed: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error);
}
//Submitt pushed
if(!empty($_POST['user']) && !empty($_POST['pass'])) {
$username= strip_tags($_POST['user']);
$password= strip_tags($_POST['pass']);
$username = $mysqli->real_escape_string($username);
$password = $mysqli->real_escape_string($password);
// Prepare
$sql = "SELECT username,password FROM login WHERE username = ? AND password = ?";
$stmt = $mysqli->prepare($sql);
if(!$stmt) {
die("Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error);
}
//BIND
$bind_result = $stmt->bind_param("ss", $username, $password);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows === 1){
header("location: index.php");
}
else {
echo "Wrong name or password. I won't tell you!!";
}
$stmt->free_result();
$stmt->close();
}
}
?>
<form action="" method="POST" class="form-container">
<div class="form-title"><h2>Log In</h2></div>
<div class="form-title">Username</div>
<input class="form-field" type="text" name="user" /><br />
<div class="form-title">Password</div>
<input class="form-field" type="password" name="pass" /><br />
<div class="submit-container">
<input class="submit-button" type="submit" value="Login" name="submit" />
</div>
</form>
<p>Welcome to this top secret, splendid, intelligent and very fabulous website.
If you would like to use our services we kindly ask you to register as a member first.</p>
</div>
</body>
</html>
I don't know if it will be to any help but here's the code for the redirection destination, index.php:
<?php
session_start();
if(!isset($_SESSION["sess_user"])){
header("location:login.php");
} else {
?>
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Secret Society</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Raleway:400,600,500,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/templatemo_main.css">
</head>
<body>
<div id="main-wrapper">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center templatemo-logo margin-top-20">
<h2>Welcome, <?=$_SESSION['sess_user'];?>!</h2> <h4>Glad that you made it in to our secret society. Feel free to check out our
products and stay around for as long as you wish.</h4>
</div>
<div class="image-section">
<div class="image-container">
<img src="images/zoom-bg-1.jpg" id="menu-img" class="main-img inactive" alt="">
<img src="images/zoom-bg-2.jpg" id="products-img" class="inactive" alt="Product">
<img src="images/zoom-bg-3.jpg" id="services-img" class="inactive" alt="Services">
<img src="images/zoom-bg-4.jpg" id="about-img" class="inactive" alt="About">
<img src="images/zoom-bg-5.jpg" id="contact-img" class="inactive" alt="Contact">
</div>
</div>
<div class="container">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 col-md-offset-2 col-lg-offset-2 templatemo-content-wrapper">
<div class="templatemo-content">
<section id="menu-section" class="active">
<div class="row">
<div class="col-xs-6 col-sm-3 col-md-3 col-lg-3 margin-bottom-20">
<a href="#products" class="change-section">
<div class="black-bg btn-menu">
<i class="fa fa-cubes"></i>
<h2>Products</h2>
</div>
</a>
</div>
<div class="col-xs-6 col-sm-3 col-md-3 col-lg-3 margin-bottom-20">
<a href="#services" class="change-section">
<div class="black-bg btn-menu">
<i class="fa fa-laptop"></i>
<h2>Messages</h2>
</div>
</a>
</div>
<div class="col-xs-6 col-sm-3 col-md-3 col-lg-3 margin-bottom-20">
<a href="#about" class="change-section">
<div class="black-bg btn-menu">
<i class="fa fa-users"></i>
<h2>About</h2>
</div>
</a>
</div>
<div class="col-xs-6 col-sm-3 col-md-3 col-lg-3 margin-bottom-20">
<a class="change-section">
<div class="black-bg btn-menu">
<i class="fa fa-envelope"></i>
<h2>Logout, don't leave us!</h2>
</div>
</a>
</div>
</div>
</section><!-- /.menu-section -->
<section id="products-section" class="inactive">
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6 margin-bottom-20">
<div class="black-bg col-sm-12 col-md-12 col-lg-12">
<h2>Something</h2>
<p>Some texts here, and some texts over there!</p>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="black-bg col-sm-12 col-md-12 col-lg-12">
<h2>Over there!</h2>
<p> What was that?! I don't know.......</p>
</div>
</div>
</div>
<div class="row margin-top-20">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pull-right">
<a href="#menu" class="change-section">
<div class="black-bg btn-menu">
<h2>Back to menu</h2>
</div>
</a>
</div>
</div>
</section><!-- /.product-section -->
<section id="services-section" class="inactive">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="col-sm-12 col-md-12 col-lg-12 black-bg">
<h2>Leave a message darling!</h2>
<!--Leave a message-->
<form action='guest_process.php' method='post'>
Name: <input style="color:black;" type="text" name='username' value="<?=$_SESSION['sess_user'];?>" readonly>
<p>Message: </p>
<p><textarea style="color:black;" name='comment'></textarea></p>
<hr>
<p><input style="color:black;" type='submit' name='submit' value='Post'></p>
</form>
</div>
</div>
</div>
<div class="row margin-top-20">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pull-right">
<a href="#menu" class="change-section">
<div class="black-bg btn-menu">
<h2>Back to menu</h2>
</div>
</a>
</div>
</div>
</section><!-- /.services-section -->
<section id="about-section" class="inactive">
<div class="row">
<div class="black-bg col-sm-12 col-md-12 col-lg-12">
<h2 class="text-center">About Us</h2>
<div class="col-sm-6 col-md-6">
<p>Don't speak about us. Don't think about us. Don't write about us. It's a secret!</p>
</div>
<div class="col-sm-6 col-md-6">
<p></p>
</div>
</div>
</div>
<div class="row margin-top-20">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pull-right">
<a href="#menu" class="change-section">
<div class="black-bg btn-menu">
<h2>Back to menu</h2>
</div>
</a>
</div>
</div>
</section><!-- /.about-section -->
<section id="contact-section" class="inactive">
<div class="row">
<div class="black-bg col-sm-12 col-md-12 col-lg-12">
<h2 class="text-center">Contact Us</h2>
<div class="col-sm-12 col-md-12">
<p>Donec at felis nec orci dapibus consectetur. Integer hendrerit aliquet velit, bibendum accumsan mi. Integer volutpat in velit at tincidunt. Proin varius magna nec risus accumsan blandit. Morbi eget vestibulum nisi, vitae luctus elit. In in nulla a elit rutrum pellentesque.</p>
</div>
<div class="col-sm-6 col-md-6">
<div id="map-canvas"></div>
<p>456 Thamine Street, Digital Estate, Yangon 10630, Myanmar</p>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="row margin-top-20">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 pull-right">
<a href="#menu" class="change-section">
<div class="black-bg btn-menu">
<h2>Back to menu</h2>
</div>
</a>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</div><!-- /#main-wrapper -->
<div id="preloader">
<div id="status"> </div>
</div><!-- /#preloader -->
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.backstretch.min.js"></script>
<script src="js/templatemo_script.js"></script>
</body>
</html>
<?php
}
?>
With the binding try
$stmt->bindParam(1, $username);
$stmt->bindParam(2, $password);
$stmt -> execute();
$stmt->store_result();
instead of
$bind_result = $stmt->bind_param("ss", $username, $password);
$stmt->execute();
$stmt->store_result();

Categories