Coding lines appear after each closed div. (only in DOM inspector) - php

I had some very strange annoying results while working on my 'project'.
To loop through MySQL results I used a while loop.
One of the lines echo'ed in the while loop now keeps appearing after every closed div.
This is only visible in firebug or another DOM inspector and not in the source code.
I have no idea what is causing it, so any help is appreciated.
Underneath I included all the code involved.
Thanks,
Sam
Btw. This is still in early development so please take that into consideration.
Code:
Firebug:
<div class="contentainer_wrapper">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="wrapper">
<div class="sidebar_navigation gradient">
<ul class="navigation">
<li id="nav1" class="active tip-right" style="height: auto;" data-original-title="Dashboard">
<li id="nav2" class="tip-right" style="height: auto;" data-original-title="Forms">
<li id="nav3" class="tip-right" style="height: auto;" data-original-title="UI Elements">
<li id="nav4" class="tip-right" style="height: auto;" data-original-title="Typography">
<li id="nav5" class="tip-right" style="height: auto;" data-original-title="Tables">
<li id="nav6" class="tip-right" style="height: auto;" data-original-title="Gallery">
<li id="nav7" class="tip-right" style="height: auto;" data-original-title="Grid">
<li id="nav8" class="tip-right" style="height: auto;" data-original-title="Charts">
<a class="i_charts" onclick="load_page('nav8', 'test.html')"> </a>
</ul>
<a class="i_charts" onclick="load_page('nav8', 'test.html')"> </a>
</div>
<a class="i_charts" onclick="load_page('nav8', 'test.html')"> </a>
</div>
<a class="i_charts" onclick="load_page('nav8', 'test.html')">
<div id="canvas" class="content_wrapper">This page was loaded succesfully :D</div>
<div id="loading_modal" class="modal hide fade">
</a>
</div>
<a class="i_charts" onclick="load_page('nav8', 'test.html')"> </a>
</div>
<a class="i_charts" onclick="load_page('nav8', 'test.html')"> </a>
</div>
<a class="i_charts" onclick="load_page('nav8', 'test.html')"> </a>
</div>
<a class="i_charts" onclick="load_page('nav8', 'test.html')">
</body>
</html>
Php File:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="Sam Kool">
<title>Admin panel</title>
<link rel="stylesheet" href="../css/bootstrap.css"/>
<link rel="stylesheet" href="../css/bootstrap-responsive.css"/>
<link rel="stylesheet" href="../css/style.css"/>
<!--[if IE 8]><link href="css/ie8.css" rel="stylesheet"><![endif]--><!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body onLoad="prepare()">
<?php
session_start();
if(!isset($_SESSION['name'])){
header('Location: http://localhost/CMS/Admin/');
}
include ('../config.php');
?>
<div class="highligts_content">
<div class="container-fluid">
<div class="stats">
<div class="row-fluid">
<div class="span12">
<div class="statistics">
<ul class="quickstats">
<?php
$conn = mysql_connect($config['db_host'], $config['db_user'], $config['db_pass']);
$conn = mysql_select_db($config['db_db']);
$mysql['sql'] = " SELECT *
FROM admin_layout
WHERE enabled = '1' and type = 'quickstats'
";
$mysql['query'] = mysql_query($mysql['sql']);
while($row = mysql_fetch_array($mysql['query'])){
echo '<li> <img src="../img/icons/'.$row["image"].'" alt=""> <span>'.$row["title"].'</span> </li>';
}
mysql_close();
?>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="contentainer_wrapper">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="wrapper">
<div class="sidebar_navigation gradient">
<ul class="navigation">
<?php
$i = 1;
$conn = mysql_connect($config['db_host'], $config['db_user'], $config['db_pass']);
$conn = mysql_select_db($config['db_db']);
$mysql['sql'] = " SELECT *
FROM admin_components
WHERE enabled = '1'
";
$mysql['query'] = mysql_query($mysql['sql']);
while($row = mysql_fetch_assoc($mysql['query'])){
echo '<li id="nav'.$i.'" class="tip-right" data-original-title="'.$row["title"].'" style="height: auto;">';
echo '<a class="'.$row["icon"].'" onClick="load_page(\'nav'.$i.'\', \''.$row["url"].'\')">';
echo '<span class="tab_label" style="visibility: visible;">'.$row["title"].'</span>';
echo '<span class="tab_info" style="visibility: visible;">'.$row["description"].'</span></li>';
$i ++;
}
mysql_close();
?>
</ul>
</div>
</div>
<div class="content_wrapper" id="canvas">
</div>
<div class="modal hide fade" id="loading_modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Loading....</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function load_page(id, component){
if($('#'+id).attr('class') == 'active tip-right'){
alert('nope');
return;
}
$('.navigation li').each(function(i){
var myClass = $(this).attr("class");
if(myClass == 'active tip-right'){
$(this).attr('class', 'tip-right');
}
});
$('#'+id).attr('class', 'active tip-right');
$('#loading_modal').modal('show');
setTimeout(function(){
$('#canvas').load('/SCMS/admin/components/'+component, function(){
$('#loading_modal').modal('hide');
});
},1000);
}
function prepare(){
$('#nav1').attr('class', 'active tip-right');
$('#canvas').load('/SCMS/admin/components/dashboard.php');
$('#loading_screen').modal({
keyboard: false,
hide: true
})
}
</script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.js"></script>
<script type="text/javascript" src="../js/jquery.dataTables.js"></script>
</body>
</html>

The DOM inspector is almost always correct, your HTML source is wrong. When things like this happen, it usually indicates you forgot to close a tag, or that you closed them in the wrong order.
This is an extremely easy mistake to make when echoing out html, because you dont usually have indentation or IDE color coding to help you out.
In your second while loop, it appears you opened an a tag and didnt echo out the closing tag.
echo '<li id="nav'.$i.'" class="tip-right" data-original-title="'.$row["title"].'" style="height: auto;">';
//OPENED AN A TAG HERE
echo '<a class="'.$row["icon"].'" onClick="load_page(\'nav'.$i.'\', \''.$row["url"].'\')">';
echo '<span class="tab_label" style="visibility: visible;">'.$row["title"].'</span>';
echo '<span class="tab_info" style="visibility: visible;">'.$row["description"].'</span></li>';
//OOPS, ENDED LI WITHOUT ENDING A

Related

How can i sort with filter A-Z after getting the fetch values on page with POST method?

User first search for specified "doctors" at it redirects to the "search.php" page. Then it shows the results from database.What i want is , when the user is seeing the results to sort them "A-Z". If you need also the place when users searches for "specified doctors i will post it,just thought you would not need it :)
<?php
include 'models/doctors.class.php';
// error_reporting(0);
$search = new doctors();
if(isset($_POST['submit'])){
$s= $search->filterDoctors($_POST);
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons#1.3.0/font/bootstrap-icons.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="assets/css/search.css">
<link rel="stylesheet" href="assets/css/sanascout-font.css">
<link rel="icon" type="image/png" href="assets/images/logo-ssc1.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<title>Healthcare</title>
</head>
<body>
<!-- <section>
<div class="container-fluid firstSectionn">
<div class="popins-font">
<p class="searchHere text-center"><i class="bi bi-arrow-left-short pull-left"></i>Zürich <i class="bi bi-chat-dots pull-right"></i></p>
</div>
</div> -->
<section>
<div class="container-fluid thisContainerBGColor popins-font">
<div class="row">
<div class="col text-center pt-4 pb-3">
<a href="#" onclick="history.go(-1)" class="text-decoration-none text-light"> <i
class="bi bi-arrow-left-short"></i></a>
</div>
<div class="col text-center lh-1 pt-3 pb-3">
<span class="span-selected-area">Selected area</span> <br>
<span class="span-place">
<?php
$i = 0;
foreach($s as $row){
echo $row['location'];
$i++;
if($i == 1){
break;
}
}
?>
</span>
</div>
<div class="col text-center pt-4 pb-3">
<!-- <i class="bi bi-chat-dots"></i> -->
</div>
</div>
</div>
</section>
</section>
<section>
<section class="searched-area mt-4">
<div class="container">
<div class="header66">
<div style="display: flex; justify-content: space-between;">
<p class="fs-6 popins-font fw-bold" id="text-color">Available Doctors</p>
<!-- <a href="#" class="text-decoration-none">
<p class="fs-6 popins-font fw-bold" id="text-color">See all</p>
</a> -->
</div>
</div>
</div>
</section>
Filter-A-Z
<div>
<?php
if(isset($_SESSION['msg'])){
echo $_SESSION['msg'];
unset($_SESSION['msg']);
}
?>
</div>
<section>
<div class="container">
<?php
foreach($s as $row1){
?>
<a href="therapist.php?id=<?php echo $row1['User_ID']; ?>" class="text-decoration-none">
<div class="therapistCardOne mx-2 popins-font my-2">
<div class="row py-2">
<div class="col-3 g-0">
<div class="imgW text-center g-0 ps-2">
<img src="assets/images/006.png" class="img-fluid ms-2" alt="" width="70px"
height="80px">
</div>
</div>
<div class="col-8 g-0 ps-2">
<span class="span1"><?php echo $row1['full_name'];?></span>
<span class="ps-2">
<i class="bi bi-star-fill icon-ccc"></i>
<i class="bi bi-star-fill icon-ccc"></i>
<i class="bi bi-star-fill icon-ccc"></i>
<i class="bi bi-star-fill icon-ccc"></i>
<i class="bi bi-star icon-ccc"></i></span><br>
<span class="span2">Location :
<?php echo $row1['location'];?>
</span> <br>
<span class="span3"><i class="bi bi-clock icon-cc"></i> 12:00pm - 16:00pm</span> <span
class="span4 ps-2"><i class="bi bi-geo-alt icon-cc"></i> Zurich New Clinic</span>
</div>
<div class="col-1 g-0 pe-2">
<i class="bi bi-three-dots-vertical"></i>
</div>
</div>
</div>
</a>
<?php
}
}
else {
header("Location:therapist-list.php");
}
?>
</section>
You can use ajax and a php function ,
Create a form inside the search.php
And then save the post that you used to redirect to search.php ,
And use php function to order the doctors.

Hide and show button based on user SESSION in php foreach loop

Im trying to not show the remove button to the users that did not uploaded image to website, and I want the remove button be shown only for the user that uploaded a specific image.
The problem is, it is in foreach loop, I tried with
if($user_id == $_GET['id']
but it show every button, but when I put
if($user_id != $_GET['id'])
all button disappear.
This is the button I would like to show/hide
<?php
require('dbconfig.php');
if(!$user->is_loggedIn()) {
$user->Redirect('index.php');
}
$user_id = $_SESSION['user_session'];
$stmt = $db_conn->prepare("SELECT * FROM users WHERE user_id=:user_id");
$stmt->execute(array(":user_id"=>$user_id));
$userRow=$stmt->fetch(PDO::FETCH_ASSOC);
// print_r($userRow);
if(isset($_POST['ok'])) {
$folder = "/Library/WebServer/Documents/Website/uploads/";
$image = $_FILES['image']['name'];
$path = $folder . $image ;
$target_file=$folder.basename($_FILES["image"]["name"]);
$imageFileType=pathinfo($target_file,PATHINFO_EXTENSION);
$allowed=array('jpeg','png' ,'jpg'); $filename=$_FILES['image']['name'];
$ext=pathinfo($filename, PATHINFO_EXTENSION);
if(!in_array($ext,$allowed)) {
echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
} else {
$success = "Image uploaded successfully";
move_uploaded_file( $_FILES['image'] ['tmp_name'], $path);
$stmt = $db_conn->prepare("INSERT INTO images (img, user_id) VALUES (:image, :user_id)");
$stmt->bindparam(":image",$image);
$stmt->bindparam(":user_id",$user_id);
$stmt->execute();
}
}
$subjects = $db_conn->prepare("SELECT img FROM images");
$subjects->setFetchMode(PDO::FETCH_ASSOC);
$subjects->execute();
$stmt = $db_conn->prepare("SELECT user_id FROM images");
$stmt->execute();
$nesto=$stmt->fetchAll(PDO::FETCH_ASSOC);
echo '<pre>';
print_r($nesto);
echo '</pre>';
// echo $nesto['user_id'];
$ids = $_GET['id'];
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Jekyll v4.0.1">
<title>Management</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="album.css" rel="stylesheet">
</head>
<body>
<header>
<div class="navbar navbar-dark bg-dark shadow-sm">
<div class="container d-flex justify-content-between">
<a href="#" class="navbar-brand d-flex align-items-center">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true" class="mr-2" viewBox="0 0 24 24" focusable="false"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>
<strong>Pictures</strong>
</a>
Home
Profile
</div>
</div>
</header>
<main role="main">
<section class="jumbotron text-center">
<div class="container">
<h1>Shared Gallery</h1>
<p class="lead text-muted"><?php print($userRow['user_name']); ?></p>
<p>
<p><?php echo $success; ?></p>
<!-- Upload Image Form -->
<div>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="image" />
<input type="submit" name="ok"/>
</form>
</div>
<!-- End Upload Image Form -->
Logout
</p>
</div>
</section>
<div class="album py-5 bg-light">
<div class="container">
<div class="row">
<!-- START -->
<?php foreach($subjects as $subject) { ?>
<div class="col-md-4">
<div class="card mb-4 shadow-sm">
<img src="uploads/<?php echo $subject['img']; ?>" class="bd-placeholder-img card-img-top" width="100%" height="225" focusable="false"/>
<div class="card-body">
<p class="card-text">
<ul>
<li>Username</li>
<li>Email</li>
<li>Address</li>
</ul>
</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
THIS IS THE BUTTON I WANT TO SHOW AND HIDE
<button type="button" class="btn btn-sm btn-outline-secondary">Remove</button>
THIS IS THE BUTTON I WANT TO SHOW AND HIDE
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<?php } ?>
<!-- END -->
</div>
</div>
</div>
</main>
<footer class="text-muted">
<div class="container">
<p class="float-right">
Back to top
Back to index
</p>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="/docs/4.5/assets/js/vendor/jquery.slim.min.js"><\/script>')</script><script src="/docs/4.5/dist/js/bootstrap.bundle.min.js" integrity="sha384-1CmrxMRARb6aLqgBO7yyAxTOQE2AKb9GfXnEo760AUcUmFx3ibVJJAzGytlQcNXd" crossorigin="anonymous"></script>
</body></html>
If you change these 2 queries into one query, you would have a resultset with the img and the users id, you can then use that to compare with the user that is logged in
//$subjects = $db_conn->prepare("SELECT img FROM images");
//$subjects->setFetchMode(PDO::FETCH_ASSOC);
//$subjects->execute();
//$stmt = $db_conn->prepare("SELECT user_id FROM images");
//$stmt->execute();
//$nesto=$stmt->fetchAll(PDO::FETCH_ASSOC);
Replace as
$result = $db_conn->query("SELECT img, user_id FROM images");
$subjects = $result->fetchAll(PDO::FETCH_ASSOC);
Then around your button you can do
<?php
// If this user uploaded this image they are allowed to remove it
if ($subject->user_id == $_SESSION['user_session']) :
<button type="button" class="btn btn-sm btn-outline-secondary">Remove</button>
endif;
?>
Big Note
I dont see a session_start() in this code, as you are using $_SESSION you would need one of those right at the top of this script.
I decided to do it this way
This worked for me perfectly.
<!-- START -->
<?php foreach($subjects as $subject) : ?>
<div class="col-md-4">
<div class="card mb-4 shadow-sm">
<img src="uploads/<?php echo $subject['img']; ?>" class="bd-placeholder-img card-img-top" width="100%" height="225" focusable="false"/>
<div class="card-body">
<p class="card-text">
<ul>
<li><?php echo $subject['img_id']; ?></li>
<li><?php echo $subject['user_name']; ?></li>
<li><?php echo $subject['user_email']; ?></li>
<li>Address</li>
</ul>
</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<?php foreach($subject as $val) : ?>
<?php if ($user_id == $_SESSION['user_session'] && $val == $user_id) : ?>
<?php $id = $subject['img_id']; ?>
<form method="POST" action="<?php echo "delete.php?id=" . $subject['img_id']?>">
<!-- <button name="remove" type="button" class="btn btn-sm btn-outline-secondary">Remove</button> -->
<input type="hidden" name="del" value="1" />
<input type="submit" name="del" class="btn btn-sm btn-outline-secondary" value="Remove" />
</form>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<!-- END -->

Sending Data from database in HTML email using PHP

i'm having trouble with my code, i want it to send a user their username via email when they have forgotten it.
What it does:
Retrieves user information from database
Send HTML Email to User's email
What it doesn't do:
Display the user's login username when sent to the email.
The PHP code is below for the page "forgot-username.php"
<?php
require_once('../../Connections/localhost.php');
require('../../PHPMailer/PHPMailerAutoload.php');
if(isset($_POST) & !empty($_POST)){
$username = mysql_real_escape_string($_POST['username'], $localhost);
$sql = "SELECT * FROM database.users WHERE users.email = '$email'";
$res = mysql_query($sql, $localhost) or die(mysql_error());
$count = mysql_num_rows($res);
if($count == 1){
$r = mysql_fetch_assoc($res);
$username = $r['username'];
$to = $r['email'];
$subject = "Your Recovered Username";
$message = file_get_contents("email_template.html");
$headers = 'From: Your name <info#address.com>';
if(mail($to,$subject,$message,$headers)){
header('Location: username-sent.html');
}else{
echo "Failed to Recover your email, try again";
}
}else{
echo "email does not exist in database";
}
}
?>
<!DOCTYPE html>
<!--[if IE 8 ]><html class="no-js oldie ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="no-js oldie ie9" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
<!-- ====== Basic Page Needs ====== -->
<meta charset="utf-8">
<title>Forgot Username</title>
<!-- ====== Mobile Specs Meta ====== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- ====== CSS ====== -->
<link rel="stylesheet" href="../../css/base.css">
<link rel="stylesheet" href="../../css/vendor.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/zerogrid.css">
<!-- ====== Java Scripts ====== -->
<script src="../../js/modernizr.js"></script>
<script src="../../js/pace.min.js"></script>
<!-- ====== Favicon ====== -->
<link rel="shortcut icon" href="../../favicon.ico" type="image/x-icon">
<link rel="icon" href="../../favicon.ico" type="image/x-icon">
</head>
<body id="top">
<!-- ====== Header Begin ====== -->
<header>
<div class="header-logo">
Logo
</div>
<a id="header-menu-trigger" href="#0">
<span class="header-menu-text" style="color: white">Menu</span>
<span class="header-menu-icon"></span>
</a>
<nav id="menu-nav-wrap">
<span>Close</span>
<img alt="KBG" src="../../images/logo.png" style="height: 100px;width: 100px;" />
<ul class="nav-list">
<li class="current"><a class="" href="../../index.html">Home</a></li>
<li><a class="" href="../../about.html" title="">About</a></li>
<li>
<a class="" >Services</a>
<div>
<ul>
<li>Service 1</li>
<li>Service 2</li>
<li>Service 3</li>
<li>Service 4</li>
</ul>
</div>
</li>
<li><a class="" href="../../Service5.html" >Service 5</a></li>
<li><a class="" href="../../competition.html" >Competition</a></li>
<li><a class="" href="../../login.php" >Sign In</a></li>
<li><a class="" href="../../signup.html" >Sign Up</a></li>
<li>Contact Us</li>
</ul>
</nav> <!-- end #menu-nav-wrap -->
</header>
<section id="services">
<div class="overlay"></div>
<div class="zerogrid">
<div class="row">
<!--Start Box-->
<div class="col-1-3 offset-1-3">
<div class="wrap-col">
<div class="row">
<div class="animate-this">
<h1 style="color: white">Forgot username?</h1>
<p class="lead" style="color: white">Fill in your email below and we will send you your username.</p>
<?php if(isset($smsg)){ ?><div class="alert alert-success" role="alert"> <?php echo $smsg; ?> </div><?php } ?>
<?php if(isset($fmsg)){ ?><div class="alert alert-danger" role="alert"> <?php echo $fmsg; ?> </div><?php } ?>
<form method="post">
<div class="form-field">
<input name="email" style="color: white" class="full-width" type="text" id="email" placeholder="Email" value="" minlength="5" required>
</div>
<div class="form-field">
<input type="submit" class="submitform full-width" style="background-color: white; color: black" value="Send" name="forgotusername">
</div>
Go Back
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="footer-bottom">
<div class="row">
<div class="col-full">
<div class="copyright">
<span>© Copyright Company 2017.</span>
</div>
</div>
</div>
</div>
<div id="go-top">
<a class="smoothscroll" title="Back to Top" href="#top">
<i class="fa fa-long-arrow-up" aria-hidden="true"></i>
</a>
</div>
</footer>
<div id="preloader">
<div id="loader"></div>
</div>
<!-- ====== Java Scripts ====== -->
<script src="../../js/jquery-2.1.3.min.js"></script>
<script src="../../js/plugins.js"></script>
<script src="../../js/main.js"></script>
<script src="../../js/cookiechoices.js"></script>
<script>
cookieChoices.showCookieBar({
linkHref: '../../cookie-policy.html',
language: 'en'
});
</script>
</body>
</html>
this is the code that is sent to the users email "email_template.html"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="https://www.website.com/favicon.png" type="image/x-icon">
<link rel="icon" href="https://www.website.com/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="https://www.website.com/css/base.css">
<link rel="stylesheet" href="https://www.website.com/css/vendor.css">
<link rel="stylesheet" href="https://www.website.com/css/main.css">
<link rel="stylesheet" href="https://www.website.com/css/zerogrid.css">
</head>
<body style="max-width: 100%">
<section style="background-color: black; text-align: center; height: 20%; min-height: 5%"><img src="https://www.website.com/images/logo.png" alt="logo" style="max-height: 150px; max-width: 150px; margin-top: 1%" /></section>
<section id="services">
<div class="overlay"></div>
<div class="zerogrid">
<div class="row">
<!--Start Box-->
<div class="col-1-3 offset-1-3">
<div class="wrap-col">
<div class="row">
<div class="animate-this">
<h1 style="color: white">Forgot Your Username?</h1>
<p class="lead" style="color: white">Not a problem, we've searched our database for your username.</p>
<p class="lead" style="color: white">Your username is:</p>
<div class="form-field">
<input type="button" class="full-width" style="background-color: white; color: black" value="$username">
</div>
<br />
<br />
<p class="lead" style="color: white">Regards,<br />Support Team</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>
Everything does as it should but the username doesn't show up, instead "$username" shows up in the email.
Someone please help. Thanks in advance.
First of all, email_template.html is an .html file, you need to change it to .php file.
Second, you are getting the file contents to variable how would you expect $username variable to be in same scope ?
Probable solution would be :
Get the file content and then replace the $username in your .html file content with $username value.
$message = file_get_contents("email_template.html");
$message = str_replace('$username', $username, $message);
file_get_contents() function does not parse the contents. SO you have to add this line after you get contents into $message :
$message = str_replace('$username', $username, $message);
And I suggest that you replace $username in your html by something like %USERNAME% and you use it like that :
$message = str_replace('%USERNAME%', $username, $message);
You can't use PHP code inside a HTML document. Any PHP code in HTML document will parse as a string.
Change file extension for 'email_template.html' to. Php:
email_template.php
Note that now you will have to use PHP echo to print any HTML. I suggest to read how php works: http://www.php.net

Issue in inserting data using PHP and MySQLi

My code is working fine, but the problem is I can't insert data with same userid. Like only I can add only row with userid same in row - how can I insert data with same rows?
I can't add same thing in next rows like userid = 1 email= test#test.com message=hello.
Like when I send from userid 1 message is = hello and email = hassan#test.com, but when I send it again with different message its not inserting into database and sending previous message.
<?php
//mysqli connectivity, select database
$connect= new mysqli("localhost","root","","demo") or die("ERROR:could not connect to the database!!!");
//extract all html field
extract($_POST);
if(isset($save))
{
//store textarea values in <pre> tag
$msg="$a";
//insert values in textarea table
$query="insert into textarea values('','$e','$msg')";
$connect->query($query);
echo "Data saved";
$query1="select * from textarea";
$result=$connect->query($query1);
while($row=$result->fetch_array())
{
$email = $row['email'];
$message1 =$row['message'];
}
$type = "xml";
$tos = preg_replace('#\s+#',',',trim($email));
$id = "id";
$pass = "pass";
$lang = "English";
$mask = "VOGUE";
// Data for text message
$to = "$tos";
$message = "$message1";
// Prepare data for POST request
$data = "id=".$id."&pass=".$pass."&msg=".$message."&to=".$to."&lang=".$lang."&mask=".$mask."&type=".$type;
// Send the POST request with cURL
$ch = curl_init('http://www.outreach.pk/api/sendsms.php/sendsms/url');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch); //This is the result from Outreach
curl_close($ch);
}
?>
<html>
<head>
<style>
input,textarea{width:250px}
textarea{height:200px}
input[type=submit]{width:150px}
</style>
<!--
* #Package: Ultra Admin - Responsive Theme
* #Subpackage: Bootstrap
* #Version: 1.0
* This file is part of Ultra Admin Theme.
-->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta charset="utf-8" />
<title> Admin : Sms Send</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta content="" name="description" />
<meta content="" name="author" />
<link rel="shortcut icon" href="assets/images/favicon.png" type="image/x-icon" /> <!-- Favicon -->
<link rel="apple-touch-icon-precomposed" href="assets/images/apple-touch-icon-57-precomposed.png"> <!-- For iPhone -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/apple-touch-icon-114-precomposed.png"> <!-- For iPhone 4 Retina display -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/apple-touch-icon-72-precomposed.png"> <!-- For iPad -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/apple-touch-icon-144-precomposed.png"> <!-- For iPad Retina display -->
<!-- CORE CSS FRAMEWORK - START -->
<link href="assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/fonts/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" type="text/css"/>
<!-- CORE CSS FRAMEWORK - END -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - START -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - END -->
<!-- CORE CSS TEMPLATE - START -->
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css"/>
<!-- CORE CSS TEMPLATE - END -->
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class=" ">
<!-- START TOPBAR -->
<div class='page-topbar '>
<div class='logo-area'>
</div>
</div>
<!-- END TOPBAR -->
<!-- START CONTAINER -->
<div class="page-container row-fluid">
<!-- SIDEBAR - START -->
<div class="page-sidebar ">
<!-- MAIN MENU - START -->
<?php include('header.php'); ?>
<!-- MAIN MENU - END -->
</div>
<!-- SIDEBAR - END -->
<!-- START CONTENT -->
<section id="main-content" class=" ">
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
<div class="page-title">
<div class="pull-left">
<h1 class="title">Form Validations</h1> </div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-lg-6">
<section class="box ">
<header class="panel_header">
<h2 class="title pull-left">Message Validations</h2>
</header>
<form method="post">
<table width="200" border="1">
<tr>
<td>Email</td>
<td><textarea type="text" name="e" /></textarea></td>
</tr>
<tr>
<td>Message</td>
<td><textarea placeholder="contents" name="a"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Save" name="save"/>
<input type="submit" value="Display" name="disp"/>
</td>
</tr>
</table>
</form>
</section></div>
</section>
</section>
<!-- END CONTENT -->
<div class="page-chatapi hideit">
<div class="search-bar">
<input type="text" placeholder="Search" class="form-control">
</div>
<div class="chat-wrapper">
<h4 class="group-head">Groups</h4>
<ul class="group-list list-unstyled">
<li class="group-row">
<div class="group-status available">
<i class="fa fa-circle"></i>
</div>
<div class="group-info">
<h4>Work</h4>
</div>
</li>
<li class="group-row">
<div class="group-status away">
<i class="fa fa-circle"></i>
</div>
<div class="group-info">
<h4>Friends</h4>
</div>
</li>
</ul>
<h4 class="group-head">Favourites</h4>
<ul class="contact-list">
<li class="user-row" id='chat_user_1' data-user-id='1'>
<div class="user-img">
<img src="data/profile/avatar-1.png" alt="">
</div>
<div class="user-info">
<h4>Clarine Vassar</h4>
<span class="status available" data-status="available"> Available</span>
</div>
<div class="user-status available">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_2' data-user-id='2'>
<div class="user-img">
<img src="data/profile/avatar-2.png" alt="">
</div>
<div class="user-info">
<h4>Brooks Latshaw</h4>
<span class="status away" data-status="away"> Away</span>
</div>
<div class="user-status away">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_3' data-user-id='3'>
<div class="user-img">
<img src="data/profile/avatar-3.png" alt="">
</div>
<div class="user-info">
<h4>Clementina Brodeur</h4>
<span class="status busy" data-status="busy"> Busy</span>
</div>
<div class="user-status busy">
<i class="fa fa-circle"></i>
</div>
</li>
</ul>
<h4 class="group-head">More Contacts</h4>
<ul class="contact-list">
<li class="user-row" id='chat_user_4' data-user-id='4'>
<div class="user-img">
<img src="data/profile/avatar-4.png" alt="">
</div>
<div class="user-info">
<h4>Carri Busey</h4>
<span class="status offline" data-status="offline"> Offline</span>
</div>
<div class="user-status offline">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_5' data-user-id='5'>
<div class="user-img">
<img src="data/profile/avatar-5.png" alt="">
</div>
<div class="user-info">
<h4>Melissa Dock</h4>
<span class="status offline" data-status="offline"> Offline</span>
</div>
<div class="user-status offline">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_6' data-user-id='6'>
<div class="user-img">
<img src="data/profile/avatar-1.png" alt="">
</div>
<div class="user-info">
<h4>Verdell Rea</h4>
<span class="status available" data-status="available"> Available</span>
</div>
<div class="user-status available">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_7' data-user-id='7'>
<div class="user-img">
<img src="data/profile/avatar-2.png" alt="">
</div>
<div class="user-info">
<h4>Linette Lheureux</h4>
<span class="status busy" data-status="busy"> Busy</span>
</div>
<div class="user-status busy">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_8' data-user-id='8'>
<div class="user-img">
<img src="data/profile/avatar-3.png" alt="">
</div>
<div class="user-info">
<h4>Araceli Boatright</h4>
<span class="status away" data-status="away"> Away</span>
</div>
<div class="user-status away">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_9' data-user-id='9'>
<div class="user-img">
<img src="data/profile/avatar-4.png" alt="">
</div>
<div class="user-info">
<h4>Clay Peskin</h4>
<span class="status busy" data-status="busy"> Busy</span>
</div>
<div class="user-status busy">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_10' data-user-id='10'>
<div class="user-img">
<img src="data/profile/avatar-5.png" alt="">
</div>
<div class="user-info">
<h4>Loni Tindall</h4>
<span class="status away" data-status="away"> Away</span>
</div>
<div class="user-status away">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_11' data-user-id='11'>
<div class="user-img">
<img src="data/profile/avatar-1.png" alt="">
</div>
<div class="user-info">
<h4>Tanisha Kimbro</h4>
<span class="status idle" data-status="idle"> Idle</span>
</div>
<div class="user-status idle">
<i class="fa fa-circle"></i>
</div>
</li>
<li class="user-row" id='chat_user_12' data-user-id='12'>
<div class="user-img">
<img src="data/profile/avatar-2.png" alt="">
</div>
<div class="user-info">
<h4>Jovita Tisdale</h4>
<span class="status idle" data-status="idle"> Idle</span>
</div>
<div class="user-status idle">
<i class="fa fa-circle"></i>
</div>
</li>
</ul>
</div>
</div>
<div class="chatapi-windows ">
</div> </div>
<!-- END CONTAINER -->
<!-- LOAD FILES AT PAGE END FOR FASTER LOADING -->
<!-- CORE JS FRAMEWORK - START -->
<script src="assets/js/jquery-1.11.2.min.js" type="text/javascript"></script>
<script src="assets/js/jquery.easing.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/plugins/pace/pace.min.js" type="text/javascript"></script>
<script src="assets/plugins/perfect-scrollbar/perfect-scrollbar.min.js" type="text/javascript"></script>
<script src="assets/plugins/viewport/viewportchecker.js" type="text/javascript"></script>
<!-- CORE JS FRAMEWORK - END -->
<!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - START -->
<script src="assets/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script> <script src="assets/plugins/jquery-validation/js/additional-methods.min.js" type="text/javascript"></script> <script src="assets/js/form-validation.js" type="text/javascript"></script> <!-- OTHER SCRIPTS INCLUDED ON THIS PAGE - END -->
<!-- CORE TEMPLATE JS - START -->
<script src="assets/js/scripts.js" type="text/javascript"></script>
<!-- END CORE TEMPLATE JS - END -->
<!-- Sidebar Graph - START -->
<script src="assets/plugins/sparkline-chart/jquery.sparkline.min.js" type="text/javascript"></script>
<script src="assets/js/chart-sparkline.js" type="text/javascript"></script>
<!-- Sidebar Graph - END -->
<!-- General section box modal start -->
<div class="modal" id="section-settings" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label" aria-hidden="true">
<div class="modal-dialog animated bounceInDown">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Section Settings</h4>
</div>
<div class="modal-body">
Body goes here...
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default" type="button">Close</button>
<button class="btn btn-success" type="button">Save changes</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
</body>
</html>
If your need duplicate rows, remove indexes from the table:
ALTER TABLE `textarea`
DROP INDEX `message`
DROP INDEX `user_id`
DROP INDEX `numb`
DROP PRIMARY KEY;
The above is one statement.
Please also read the manual

how to show jquery rating in html <list> tag in while loop using multiple tables

i want to show rating of each item or name of company with company name (driven from another table in database) in "li" tag of html (transporters.php). I have got the rating for each company page individually (transporters2.php) but i want to get all the ratings of all the companies or items in "li" tab so user can overview it and after clicking an "li" item it will show the profile of company "transporters2.php". Here are my two files transporters.php and transporters2.php and also their snapshots.
transporters.php and transporters2.php ,Mydatabase
Note: Both files are working correctly there is no syntax error, if an error occurs that might be occurred while posting the question thanks.
Transporters.php
<?php
include "header.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<script src="../js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="../css/rating.css" />
<script type="text/javascript" src="../js/rating.js"></script><title>Transporters</title>
<!-- Bootstrap Core CSS -->
<link href="file:///C|/xampp/htdocs/bin/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="file:///C|/xampp/htdocs/bin/css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="file:///C|/xampp/htdocs/bin/font-awesome/css/font
awesome.min.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="../css/example.css" rel="stylesheet" type="text/css" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
</head>
<body>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Transporters
<small> Companies</small>
</h1>
<ol class="breadcrumb">
<li>Home
</li>
<li class="active">Transporters</li>
</ol>
</div>
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<div class="col-lg-12"><?php
require("Config.php");
$sql =mysql_query("SELECT * FROM transporters");
?>
<ul style="list-style:none;">
<?php while($row=mysql_fetch_array($sql) )
{
$cid=$row['CompanyID'];
?>
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<li><div class="product" style="font: 10px verdana, sans-serif;margin: 0 auto 40px auto;width: 71px;height: 4px;margin-right: 75%;">
<div id="<?php echo $cid ?>" class="ratings" style="border: 1px solid #CCC;overflow: visible;padding: 10px;position: relative;width: 182px;height: 47px;float: left;margin-left: -195px;"><div class="star_1 ratings_stars ratings_vote"></div><div class="star_2 ratings_stars ratings_vote"></div><div class="star_3 ratings_stars ratings_vote"></div><div class="star_4 ratings_stars ratings_blank"></div><div class="star_5 ratings_stars ratings_blank"></div>
</div>
<a href='transporters2.php?CompanyID=<?php echo $cid;?>'><?php print $row['CompanyName']; ?>
</a></div>
</li>
</div>
</div>
</div>
<?php
}//end of while loop
?>
</ul>
</div>
</div>
<script>
function sendcompanyname()
{
var x= document.getElementById("cpn").value;
}
</script>
</body></html>
Transporters2.php
<?php
$db=mysqli_connect("localhost","root","","db1") or die("unable to connect");
include("header.php");
$cname;
if(isset($_GET['CompanyID'])){
$CompanyID = $_GET['CompanyID'];
$get_name= "SELECT * from `transporters` where `CompanyID`='$CompanyID'";
$run_name= mysqli_query($db,$get_name);
while($row_name=mysqli_fetch_array($run_name)){
$cname = $row_name['CompanyName'];}
}
include("settings.php");
connect();
$ids=array(1);
?>
<!DOCTYPE html>
<html>
<head>
<script src="../js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="../css/rating.css" />
<!--<script type="text/javascript" src="../js/rating.js"></script>-->
<script>
$(document).ready(function() {
$('.ratings_stars').hover(
// Handles the mouseover
function() {
$(this).prevAll().andSelf().addClass('ratings_over');
$(this).nextAll().removeClass('ratings_vote');
},
// Handles the mouseout
function(){
$(this).prevAll().andSelf().removeClass('ratings_over');
}
);
//send ajax request to rate.php
$('.ratings_stars').bind('click', function(){
var id=$(this).parent().attr("id");
var num=$(this).attr("class");
var poststr="id="+id+"&stars="+num;
$.ajax({url:"../bin/rate.php",cache:0,data:poststr,success:function(result){
document.getElementById(id).innerHTML=result;}
});
});
});
</script>
</head>
<body>
<!-- Page Content -->
<div class="container">
<!-- /.row -->
<div class="row">
<?php
for($i=0;$i<count($ids);$i++)
{
$rating_tableName = 'ratings';
$id=$CompanyID;
$q="SELECT total_votes, total_value FROM $rating_tableName WHERE id=$id";
$r=mysql_query($q);
if(!$r) echo mysql_error();
while($row=mysql_fetch_array($r))
{
$v=$row['total_votes'];
$tv=$row['total_value'];
$rat=$tv/$v;
}
$id=$CompanyID;
$j=$id;
echo'<div class="product">
Rate Item '.$j.'
<div id="rating_'.$id.'" class="ratings">';
for($k=1;$k<6;$k++){
if($rat+1>$k)$class="star_".$k."ratings_stars ratings_vote";
else $class="star_".$k." ratings_stars ratings_blank";
echo '<div class="'.$class.'"></div>';
}
echo' <div class="total_votes"><p class="voted"> Rating
<strong>'.#number_format($rat).'</strong>/5 ('.$v. 'vote(s) cast)
</div>
</div></div>';}
?>
<div class="col-lg-12">
<h2 class="page-header"><?php echo $cname;?></h2>
</div>
<!--<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-car fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Show Drivers</h4>
<p>Show drivers of this company.</p>
<button id="popup" onclick="div_show()" class="btn btn
primary">Add</button>
</div>
</div>
</div>-->
<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-support fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Show routes</h4>
<p>check which routes are following this company...</p>
<a href="routes.php?CompanyID=<?php echo $CompanyID;?>" class="btn btn
primary">show routes</a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-database fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Schedule</h4>
<p>Check the timings of journey.</p>
Show Schedule
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="panel panel-default text-center">
<div class="panel-heading">
<span class="fa-stack fa-5x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-database fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<h4>Show Drivers Positions</h4>
<p>Check the positions of all drivers.</p>
<a href="positions.php" class="btn btn-primary">Show Drivers
Positions</a>
</div>
</div>
</div>
</div>
</div>
<!---END Page Content-->
</body>
</html>

Categories