How to correctly display #yield() content? - php

I'm working on learning Laravel and while the quickstart taught me a lot I've been having nothing but problems trying to build off of that.
Currently, I'm trying to use a file public.blade.php as the main public layout for my site. This is working correctly. Within that file, I am trying to display #yield('title') and and #yield('content') within it, this is the part I am having issues with.
Within app/views/public.blade.php I have the following structure:
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>#yield('title')</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
...
... <!--layout code would be here-->
...
<div class="container">
<div class="container">
#yield('content')
<hr />
<footer>
<p>© Example Site 2013</p>
</footer>
</div> <!-- /container -->
Within app/views/home.blade.php I have the following:
#extends('public')
#section('title')
#parent
BootstrapCMS
#stop
#section('content')
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit">
<h1>Welcome!</h1>
<p>The goal of BootstrapCMS is to build a basic working content management system built around Twitter Bootstrap. This is primarily for personal learning purposes, as I look to better understand how content management systems function.</p>
<p><a class="btn btn-primary btn-large">Learn more »</a></p>
</div>
<!-- Example row of columns -->
<div class="row">
<div class="span4">
<h2>Über Secure</h2>
<p>One of the main goals of this project, aside from basic learning, was to ensure that the design and implementation of all code was safe and secure. For this reason, passwords are securely encrypted using Blowfish, which prevents the password for being decrypted. For this reason, you can be sure that the passwords used with this system, even if leaked online, will be safe and secure.</p>
<p><a class="btn" href="#">View details »</a></p>
</div>
<div class="span4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details »</a></p>
</div>
<div class="span4">
<h2>Register Now!</h2>
<form name="register" action="sections/register/take_register.php" method="POST">
<div class="control-group">
<label class="control-label" for="inputUsername">Username</label>
<div class="controls">
<input type="text" class="span4" id="inputUsername" name="registerUsername" placeholder="Username" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label>
<div class="controls">
<input type="password" class="span4" id="inputPassword" name="registerPassword" placeholder="Password" required>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary">Register</button>
</div>
</div>
</form>
</div>
</div>
#stop
I know that I will need to modify the route, so I have my app/routes.php
Route::get('/', function()
{
return View::make('public');
});
I also assume, potentially incorrectly, I need to modify my app/controllers/HomeController.php:
public function showWelcome()
{
$this->layout->content = View::make('public');
}
I know this has to be more simple than it seems to me right now. What am I missing to get the Laravel #yield('content') to work? Even if you don't want to give me the code, just somewhere where I can learn this or find thorough documentation to help me wrap my head around how this works.
Thank you for your time and assistance.

You are calling the template view (public) and suspect it to be filled with the right content?
I guess you meant to call View::make('home') which will call call the blade file it extends automatically.

Related

How to arrange web page layout with bootstrap?

I am using the bootstrap framework for layout on my system. I want to arrange the layout of the page like this(See image below)
But I am facing a challenge. My code is showing this (See image below)
I need the Login forum section to go to the right like on the first picture that i have uploaded.
This is my code
<?php if($topics) : ?>
<p id="topics">
<div class="row">
<?php foreach ($topics as $topic) : ?>
<p class="topic">
<div class="row">
<div class="col">
</div>
<div class="col-md-5">
<div class="topic-content pull-right">
<h3><?php echo $topic['title']; ?></h3>
<div class="topic-info">
<?php echo $topic['name']; ?> >>
<?php echo $topic['username']; ?> >>
Posted on: <?php echo formatDate($topic['create_date']); ?>
<span class="badge pull-right"><?php echo replyCount($topic['id']); ?></span>
</div>
</div>
</div>
</div>
</p>
<?php endforeach; ?>
</p>
<?php else : ?>
<p>No Topics to Display.</p>
<?php endif; ?>
<div class="col-md-4" align="pull-right">
<div class="sidebar">
<div class="block">
<h3>Login Form</h3>
<?php if(isLoggedIn()) : ?>
<div class="userdata">
Logged in as <?php echo getUser()['username']; ?>
</div>
<br />
<form role="form" method="post" action="logout.php">
<input type="submit" name="do_logout" class="btn btn-default" value="Log Out" />
<hr>
<h4>All Topics</h4>
<h4>Create Topic</h4>
</form>
<?php else : ?>
<form role="form" method="post" action="login.php">
<div class="form-group">
<label>Username</label>
<input name="username" type="text" class="form-control" placeholder="Enter Username" />
</div>
<div class="form-group">
<label>Password</label>
<input name="password" type="password" class="form-control" placeholder="password" />
</div>
<button name="do_login" type="submit" class="btn btn-primary">Login</button> <a class="btn btn-default" href="register.php">Create Account</a>
</form>
<?php endif; ?>
</div>
<div class="block">
<h3>Categories</h3>
<div class="list-group">
All topics <span class="badge pull-right"><?php echo totalPostCount() ;?></span>
<?php foreach(getCategories() as $category) : ?>
<a href="topics.php?category=<?php echo $category['id']; ?>" class="list-group-item <?php echo is_active($category['id']); ?>">
<?php echo $category['name']; ?>
<span class="badge pull-right">
<?php echo postCountByCategory($category['id']) ;?>
</span>
</a>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<hr>
<h3>Forum Statistics</h3>
<p>
<h6>Total Number of Users: <strong><?php echo $totalUsers; ?></strong></li>
<h6>Total Number of Topics: <strong><?php echo $totalTopics; ?></strong></li>
<h6>Total Number of Categories: <strong><?php echo $totalCategories; ?></strong></li>
</ul>
There seems to be plenty of unnecessary rows and <p> tags within other <p> tags. It needs a restructure to be honest. It is best practice not to wrap divs inside <p> tags as they shouldn't really be used as a wrapper.
You want to separate the 2 columns into 2 separate Bootstrap cols which should be wrapped inside a row class.
For example:
<div class="row">
<div class="col-xs-12 col-sm-8">
<p>All your forum info here etc.</p>
</div>
<div class="col-xs-12 col-sm-4">
*Login Form Here*
*Categories Here*
</div>
</div>
The columns above will separate them into 66.66666667% by 33.33333333% width columns on desktop and then both full width (100%) on smaller devices.
you can simply use the bootstrap grid Grid system to achieve this task. Please checkout the official documentation through this link...
https://getbootstrap.com/docs/4.1/layout/grid/
However, I created a sample layout that I think fit to your requirement.
<html>
<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="">
<link rel="icon" href="../../../../favicon.ico">
<title>sample web page</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style type="text/css">
.left-block{
width:100%;
height:500px;
padding: 20px;
}
.right-block{
width:100%;
padding: 20px;
height:500px;
background-color: #D3D3D3;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-8">
<div class="left-block">
<h1>sample content</h1>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ullamcorper nisl ut sodales tincidunt. Praesent tristique lobortis tincidunt. Cras aliquet, lectus ut facilisis tempor, nulla felis porta sem, quis pulvinar lacus justo eget sapien. Integer dapibus bibendum sodales. Sed semper sagittis ex, et suscipit odio luctus vel. Fusce laoreet a sapien vitae mattis. Quisque ligula massa, sagittis vel odio vel, hendrerit iaculis leo. Aliquam erat volutpat. Fusce mollis, augue vel egestas tristique, nunc ligula placerat erat, sed venenatis elit ex et nulla. </p>
</div>
</div>
<div class="col-lg-4">
<div class="right-block">
<h2>Login Section</h2>
<hr>
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</div>
</body>
</html>
still you have any problem, feel free to add a comment below...
Dont put structural divs inside a <p> tag! Try this:
<div class="container">
<div class="row">
<div class="col-md-4">
This is one third of the page wide (4/12)
</div>
<div class="col-md-8">
This is two thirds of the page wide (8/12)
</div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<div class="col-md-8">
<p> this is where 'normalization' text should go </p>
</div>
<div class="col-md-4">
<p> this is where the form goes </p>
</div>
</div>
</div>
Try above code. This is an example of basic bootstrap grid layout. The first define the page as '12' - the remaining divs inside this must add up to 12 also, this example is 8 + 4 ( 2 columns ) but can also have 3 4+4+4 and so on.
You can use the following example to arrange the web page layout with Bootstrap:
<div class="col-md-12">
<div class="row">
<div class="col-md-8">
<p> Your Left area put here </p>
</div>
<div class="col-md-4">
<p> Your right area Put here </p>
</div>
</div>
</div

How to render more than one dynamic sections / includes / yields in master template using laravel 5.4.6

i am new to laravel and working on my first project in laravel 5.4.6. I have a problem that is how to render multiple dynamic sections / include / yield content into master template. I have already used #section('content') but need more sections( which have dynamic data from database) to show on my layout page. Below is my problem details:
1- Route
Route::group(['middleware' => ['web']], function () {
Route::get('/', 'HomeController#showIndex');
Route::get('/index', 'HomeController#showIndex');});
2- master.blade.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>#yield('title')-Al Quraish Publications</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="Author" content="" />
<link href="favicon.png" rel="icon" type="image/png">
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1, user-scalable=0" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,800" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/plugins/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/font-awesome.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/plugins/owl-carousel/owl.carousel.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/plugins/owl-carousel/owl.theme.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/plugins/owl-carousel/owl.transitions.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/plugins/magnific-popup/magnific-popup.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/animate.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/superslides.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/plugins/revolution-slider/css/settings.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/essentials.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/layout.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/slider.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/layout-responsive.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('assets/css/color_scheme/brown.css')}}" rel="stylesheet" type="text/css" /><!-- orange: default style -->
<link href="{{asset('assets/css/color_scheme/brown.css')}}" rel="alternate stylesheet" type="text/css" title="brown" />
<script type="text/javascript" src="assets/plugins/modernizr.min.js"></script>
<link href="assets/css/jquery.bxslider.css" rel="stylesheet">
</head>
<body>
<div class="top-header">
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="topleft">
<ul class="socials-icons">
<li><a href="https://web.facebook.com/AlQuraishPublishers?_rdr" target="_blank">
<i class="fa fa-facebook"></i> Facebook</a></li>
#if(\Auth::check())
<li>
<i class="fa fa-user"></i> Dashboard
</li>
#else
<li>
<i class="fa fa-user"></i> Log In
</li>
#endif
</ul>
</div>
</div>
<div class="col-sm-6">
<div class="topright">
<i class="fa fa-phone"></i> 92 42 37668958 , 37652546 , 37361439
<i class="fa fa-envelope-o"></i> <a class="wht" href="mailto:info#alquraish.com">info#alquraish.com</a>
</div>
</div>
</div>
</div>
</div>
<!-- TOP NAV -->
<div class="pos-absolute">
<header id="topNav" style="height: 100px !important;"><!--data-spy="affix" data-offset-top="100" -->
<div class="container">
<!-- Top Header -->
<div class="clearfix"></div>
<!-- Mobile Menu Button -->
<button class="btn btn-mobile" data-toggle="collapse" data-target=".nav-main-collapse">
<i class="fa fa-bars"></i>
</button>
<!-- Logo text or image -->
<!-- Logo text or image -->
<a class="logo" href="index.html">
<img src="assets/images/logo.png">
</a>
<!-- Top Nav -->
<div class="navbar-collapse nav-main-collapse collapse pull-right">
<nav class="nav-main mega-menu">
<ul class="nav nav-pills nav-main scroll-menu" id="topMain">
<li>Home</li>
<li>About Us</li>
<li>Books</li>
<li>Order Now</li>
<li>Contact Us</li>
</ul>
</nav>
</div>
<!-- /Top Nav -->
</div>
</header>
</div>
<!-- WRAPPER -->
<div id="wrapper" >
<!-- REVOLUTION SLIDER -->
<div class="fullwidthbanner-container roundedcorners pos-reletive">
<div class="fullwidthbanner">
<ul>
<li data-transition="curtain-2" data-slotamount="5" data-masterspeed="700">
<img src="assets/images/sliders/1.jpg" alt="" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
</li>
<li data-transition="curtain-2" data-slotamount="5" data-masterspeed="700">
<img src="assets/images/sliders/2.jpg" alt="" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
</li>
<li data-transition="3dcurtain-vertical" ddata-slotamount="15" data-masterspeed="300" data-delay="9400">
<img src="assets/images/sliders/3.jpg" alt="" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
</li>
<li data-transition="3dcurtain-vertical" ddata-slotamount="15" data-masterspeed="300" data-delay="9400">
<img src="assets/images/sliders/4.jpg" alt="" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
</li>
<li data-transition="3dcurtain-vertical" ddata-slotamount="15" data-masterspeed="300" data-delay="9400">
<img src="assets/images/sliders/5.jpg" alt="" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
</li>
<li data-transition="3dcurtain-vertical" ddata-slotamount="15" data-masterspeed="300" data-delay="9400">
<img src="assets/images/sliders/6.jpg" alt="" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
</li>
</ul>
<div class="tp-bannertimer"></div>
</div>
</div>
<!-- /REVOLUTION SLIDER -->
#section('content')
#show
<div class="container">
<div class="row">
<div class="scroll-img">
<div id="clients-flexslider" class="flexslider home clients">
<div class="slider1">
<div class="slide">
<img src="assets/images/gallery-scroll/1.png">
<p>Nazia Kanwal Nazi</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/2.png">
<p>Riaz Aqab</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/3.png">
<p>Rizq Shah</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/4.png">
<p>Malik Safdar Hayat</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/5.png">
<p>Mehwish Iftikhar</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/6.png">
<p>Fakhira Gull</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/7.png">
<p>Asia Mirza</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/8.png">
<p>Mirza Amjad Baig</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/9.png">
<p>Anwar Ulaiqi</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/10.png">
<p>Iffat Tahir</p>
</div>
<div class="slide">
<img src="assets/images/gallery-scroll/11.png">
<p>MA Rahat</p>
</div>
</div>
</div>
</div> <!--scroll-img ends-->
=> here is i have problem becuase this setion has data from database and giving me the error of " Undefined variable: "
**<div class="col-md-12">
#include('layouts.homeWelcomeHeading')
</div>**
</div> <!--row ends-->
</div>
</div>
<!-- /WRAPPER -->
<div class="container">
<div class="row padding60">
<!-- FORM -->
<div class="col-md-6">
<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FAlQuraishPublishers%2F&tabs=timeline&width=800&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId" width="800" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
</div>
<div class="col-md-6">
<h3>Message Board</h3>
<h4>Publisher, Books & Magazine Distribution Book Store</h4>
<p>Order your favorite Book / Novel And Get 35% Discount...
For Online Order message Us
Book will be delivered to your door step
Free Home Delivery all across Pakistan </p>
<form class="white-row" action="#" method="post">
<div class="row">
<div class="form-group">
<div class="col-md-6">
<label>Full Name *</label>
<input type="text" value="" data-msg-required="Please enter your name." maxlength="100" class="form-control" name="name" id="name">
</div>
<div class="col-md-6">
<label>E-mail *</label>
<input type="email" value="" data-msg-required="Please enter your email address." data-msg-email="Please enter a valid email address." maxlength="100" class="form-control" name="email" id="email">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-6">
<label>Phone / Mobile *</label>
<input type="text" value="" data-msg-required="Please enter your name." maxlength="100" class="form-control" name="name" id="name">
</div>
<div class="col-md-6">
<label>Subject *</label>
<input type="email" value="" data-msg-required="Please enter your email address." data-msg-email="Please enter a valid email address." maxlength="100" class="form-control" name="email" id="email">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<label>Message *</label>
<textarea maxlength="5000" data-msg-required="Please enter your message." rows="10" class="form-control" name="message" id="message"></textarea>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<input type="submit" value="Submit Message" class="btn btn-primary btn-lg" data-loading-text="Loading...">
</div>
</div>
</form>
</div>
</div>
</div>
<section class="cover margin-footer parallax" data-stellar-background-ratio="0.7" style="background-image: url('assets/images/parallax_bg.jpg');">
<div class="container">
<h3 align="center">Our customers have said</h3>
<div class="owl-carousel text-center" data-plugin-options='{"items": 1, "singleItem": true, "navigation": true, "pagination": false, "autoPlay": true, "transitionStyle":"fadeUp"}'><!-- transitionStyle: fade, backSlide, goDown, fadeUp, -->
<div class="testimonial">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
<cite><strong>Writer Name</strong>, Customer</cite>
</div>
<div class="testimonial">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
<cite><strong>Writer Name</strong>, Customer</cite>
</div>
<div class="testimonial">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
<cite><strong>Writer Name</strong>, Customer</cite>
</div>
<div class="testimonial">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
<cite><strong>Writer Name</strong>, Customer</cite>
</div>
</div>
</div>
</section>
<!-- FOOTER -->
<footer>
<div class="clearfix"></div>
<!-- footer content -->
<div class="footer-content">
<div class="container">
<div class="row">
<!-- FOOTER CONTACT INFO -->
<div class="column col-md-8">
<h3>Title</h3>
<p class="contact-desc">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
<p class="contact-desc">
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
<!-- /FOOTER CONTACT INFO -->
<!-- FOOTER Profile -->
<div class="column col-md-4">
<h3>Get In Touch</h3>
<address class="font-opensans">
<ul>
<li class="footer-sprite address">
text will be here
</li>
<li class="footer-sprite phone">
<strong>Landline:</strong> +1234567789<br>
</li>
<li class="footer-sprite email">
info#mail.com<br>
</li>
</ul>
</address>
</div>
<!-- /FOOTER Profile -->
</div>
</div>
</div>
<!-- footer content -->
<!-- copyright , scrollTo Top -->
<div class="footer-bar">
<div class="container">
<span class="copyright">Copyright © All Rights Reserved.
<span style="display:inline-block; text-align: right; float: right; "> ||
Powered by: <small>Me</small></span>
</span>
<a class="toTop" href="#topNav">Go To Top <i class="fa fa-arrow-circle-up"></i></a>
</div>
</div>
<!-- copyright , scrollTo Top -->
</footer>
<!-- /FOOTER -->
<script type="text/javascript" src="assets/plugins/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="assets/plugins/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="assets/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="assets/plugins/jquery.appear.js"></script>
<script type="text/javascript" src="assets/plugins/jquery.isotope.js"></script>
<script type="text/javascript" src="assets/plugins/masonry.js"></script>
<script src="assets/js/jquery.bxslider.js"></script>
<script src="assets/js/jquery.bxslider.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.slider1').bxSlider({
auto: true,
autoControls: true,
slideWidth: 155,
minSlides: 2,
maxSlides: 7,
slideMargin: 10,
pager: true,
moveSlides: 2,
/*'auto': true,
'autoControls': true,
'pager':false,
'pager':false,
'infiniteLoop':false,
'minSlides':1,
'maxSlides': 3,
'slideWidth': '210px',
'slideMargin':5*/
});
$('#slider2').bxSlider({
'auto': true,
'autoControls': true,
'adaptiveHeight': true,
/*mode: 'vertical',*/
});
});
</script>
<script type="text/javascript" src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/plugins/magnific-popup/jquery.magnific-popup.min.js"></script>
<script type="text/javascript" src="assets/plugins/owl-carousel/owl.carousel.min.js"></script>
<script type="text/javascript" src="assets/plugins/stellar/jquery.stellar.min.js"></script>
<script type="text/javascript" src="assets/plugins/knob/js/jquery.knob.js"></script>
<script type="text/javascript" src="assets/plugins/jquery.backstretch.min.js"></script>
<script type="text/javascript" src="assets/plugins/superslides/dist/jquery.superslides.min.js"></script>
<script type="text/javascript" src="assets/plugins/mediaelement/build/mediaelement-and-player.min.js"></script>
<script type="text/javascript" src="assets/plugins/revolution-slider/js/jquery.themepunch.tools.min.js"></script>
<script type="text/javascript" src="assets/plugins/revolution-slider/js/jquery.themepunch.revolution.min.js"></script>
<script type="text/javascript" src="assets/js/slider_revolution.js"></script>
<script type="text/javascript" src="assets/js/scripts.js"></script>
</body>
</html>
3- Controller
public function showIndex()
{
//$text = DB::table('content')->get();
$text = Content::all();
return view('index', ['ok', $text]);
}
Please help me in this problem i am stuck.
As far as I understand from your question if you need multiple dynamic section to be inserted into master, you need multiple yeilds like
#yield('content')
#yield('dynamin-1')
#yield('dynamic-2')
.......
.......
then in another blade file you need to extend the master and insert the sections like
#extends('layouts.master')
#section('content')
bla bla <strong>bla bla bla....</strong>
#endsection
#section('dynamin-1')
bla bla <strong>bla bla bla....</strong>
#endsection
#section('dynamin-2')
bla bla <strong>bla bla bla....</strong>
#endsection
....
so in your case you do not need the #section('content') in you master unless you put it consciously! whenever you will put #section('content') in a extended view this section in master will be overridden!
Dear i think you are using
#section() // instead of yield()
make sure you use
#yield('content')
#yield('section1')
#yield('section2')
in master.blade php
in child pages you can do it like this
#extends('layouts.master')
#section('content')
#endsection
#section('section1')
#endsection
#section('section2')
#endsection

Fatal error: Call to undefined function navigator_web() in

I just uploaded my website to hostinger(hosting provider)
.It works on localhost.
I get this error
Fatal error: Call to undefined function navigator_web() in /home/u664439336/public_html/index.php on line 45
localhost php version : 5.3.1
hostinger php version : 5.3
this my index.php
<?php
session_start();
unset($_SESSION['SESS_USERNAME']);
?>
<html>
<head>
<title>Sistem Pakar Diagnosa Bipolar Disorder</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href='http://fonts.googleapis.com/css?family=Questrial' rel='stylesheet' type='text/css'>
<!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-panels.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel-noscript.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-desktop.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
<?php include("library.php"); include("koneksi_db.php");?>
</head>
<body id="homepage">
<!-- Header -->
<div id="header">
<div id="logo-wrapper">
<div class="container">
<!-- Logo -->
<div id="logo">
<h1><marquee scrollamount="10">Sistem Pakar Diagnosa Gangguan Bipolar Disorder 1</marquee></h1>
<!--<span>Design by TEMPLATED</span>-->
</div>
</div>
</div>
<div class="container">
<!-- Nav -->
<nav id="nav">
<ul>
<?php navigator_web();?>
</ul>
</nav>
</div>
</div>
<!-- Header -->
<!-- Banner -->
<div id="banner">
<div class="container">
</div>
</div>
<!-- /Banner -->
<!-- Main -->
<div id="main">
<?php
$page = $_GET['page'];
if ($page==1)
include ('halaman_utama.php');
else if ($page==2)
include ('bantuan.php');
else if ($page==3)
include ('informasi.php');
else if ($page==4)
include ('registrasi.php');
else if ($page==5)
include ('lupa_password.php');
else if ($page==7)
include ('user_diagnosa.php');
else if ($page=="daftar")
include ('pasienaddfm.php');
else if ($page=="daftarsim")
include ('pasienaddsim.php');
else if ($page=="konsul")
include ('konsultasifm.php');
else if ($page=="konsul2")
include ('konsultasifm_gejala.php');
else if ($page=="konsulcek")
include ('konsultasiperiksa.php');
else if ($page=="konsulcek2")
include ('konsulperiksa2.php');
else if ($page=="hasil")
include ('analisahasil.php');
else if ($page=="mania")
include ('episodemania.php');
else if ($page=="hipomania")
include ('episodehipomania.php');
else if ($page=="depresi")
include ('episodedepresi.php');
else if ($page=="berhasil")
include ('berhasil_registrasi.php');
else if ($page=="gagal")
include ('gagal_registrasi.php');
else if ($page=="gagal2")
include ('gagal_registrasi2.php');
else if ($page=="gagal_login")
include ('gagal_login.php');
else if ($page=="gagal_login2")
include ('gagal_login2.php');
else if ($page=="haruslogin")
include ('harus_login.php');
else if ($page=="about")
include ('about.php');
else
include ('halaman_utama.php');
?>
<!-- Featured -->
<div class="container">
</div>
<!-- /Featured -->
<!-- /Main Content -->
</div>
<!-- /Main -->
<!-- Footer -->
<div id="footer">
<div class="container">
<div class="row">
<div class="6u">
<section>
<header>
<h2 align="center">Beri Komentar </h2>
</header>
<form align="center">
<div>
<input type="text" name="nama" placeholder="Nama" />
</div>
<div>
<input type="text" name="email" placeholder="Email" />
</div>
<div>
<textarea name="komentar" rows="5" placeholder="Komentar"></textarea>
</div>
<div>
<input type="submit" value="Tambahkan Komentar"/>
</div>
</form>
</section>
</div>
<div id="fbox1" class="3u">
<section>
<!--<header>
<h2>Praesent mattis</h2>
</header>
<ul class="default">
<li class="fa fa-angle-right">Vestibulum luctus venenatis dui</li>
<li class="fa fa-angle-right">Integer rutrum nisl in mi</li>
<li class="fa fa-angle-right">Etiam malesuada rutrum enim</li>
<li class="fa fa-angle-right">Aenean elementum facilisis ligula</li>
<li class="fa fa-angle-right">Ut tincidunt elit vitae augue</li>
<li class="fa fa-angle-right">Sed quis odio sagittis leo vehicula</li>
</ul>
</section>
</div>
<div id="fbox2" class="3u">
<section>
<header>
<h2>Maecenas luctus</h2>
</header>
<ul class="default">
<li class="fa fa-angle-right">Vestibulum luctus venenatis dui</li>
<li class="fa fa-angle-right">Integer rutrum nisl in mi</li>
<li class="fa fa-angle-right">Etiam malesuada rutrum enim</li>
<li class="fa fa-angle-right">Aenean elementum facilisis ligula</li>
<li class="fa fa-angle-right">Ut tincidunt elit vitae augue</li>
<li class="fa fa-angle-right">Sed quis odio sagittis leo vehicula</li>
</ul>-->
</section>
</div>
</div>
</div>
</div>
<!-- /Footer -->
<!-- Copyright -->
<div id="copyright">
<!--<div class="container">
<section>
Design: TEMPLATED Images: Unsplash (CC0)
</section>
</div>-->
</div>
</body>
Line 45
<?php navigator_web();?>
Thank you
Yes the problem is that you are calling the function navigator_web() but didnt defined in the coding.You need to first define the function and then call it
Please add this file inclusion code at php as navigator_nav() is at library.php
Include('library.php');

Fatal error:call to member function fetch_array?

I am trying to create a login form, in that login form I am using fetch_array() method to fetch the fields that user enter,but it showing some errors:
Login.php
<?php
include ("Connection.php");
?>
<?php
if(isset($_POST['Login']))
{
$Em = $_POST['form-email'];
$Pw = $_POST['form-password'];
$result = $con->query("SELECT * FROM userdetails where Email='$Em' Password='$Pw'");
$row = $result->fetch_assoc(MYSQLI_BOTH);
session_start();
$_SESSION["UserID"] = $row['UserID'];
header('Location: index.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GTEC Registration Form Template</title>
<!-- CSS -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/form-elements.css">
<link rel="stylesheet" href="assets/css/style.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]-->
<!-- Favicon and touch icons -->
</head>
<body>
<!-- Top content -->
<div class="top-content">
<div class="inner-bg">
<div class="container">
<div class="row">
<div class="col-sm-7 text">
<h1><strong>GTEC Network</strong> Registration Form</h1>
<div class="description">
<p class="jumbotron">
To be a premier Institution of choice in the region and become one of the leading educational Institutions in the country widely recognized for providing high quality, transformative and affordable value based education in the field of Engineering and Technology.
</p>
</div>
<div class="top-big-link">
<a class="btn btn-link-2" href="registrer.php">Sign Up!</a>
</div>
</div>
<div class="col-sm-5 form-box">
<div class="form-top">
<div class="form-top-left">
<h3>Login</h3>
<p>Fill in the form below to get instant access:<br/>
Once you login your account ,<br/>
You can access gtec network thereby you can view ur syllabus,timetable,updates,
internal marks,results,also you can ur forum for many purpose</p>
</div>
<div class="form-top-right">
<i class="fa fa-pencil"></i>
</div>
</div>
<div class="form-bottom">
<form role="form" action="" method="post" class="Login-form">
<div class="form-group">
<label class="sr-only" for="form-email">Email</label>
<input type="email" name="form-email" placeholder="Email..." class="form-email form-control" id="form-email">
</div>
<div class="form-group">
<label class="sr-only" for="form-password">Email</label>
<input type="password" name="form-password" placeholder="Password..." class="form-password form-control" id="form-password">
</div>
<button type="submit" class="btn" name="Login">Login!</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Javascript -->
<script src="assets/js/jquery-1.11.1.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.backstretch.min.js"></script>
<script src="assets/js/retina-1.1.0.min.js"></script>
<script src="assets/js/scripts.js"></script>
<!--[if lt IE 10]>
<script src="assets/js/placeholder.js"></script>
<![endif]-->
</body>
</html>
index.php
<?php session_start();
?>
<!DOCTYPE html>
<html lang="en">
<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="">
<title>GTEC NetWork</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/business-frontpage.css" rel="stylesheet">
<!-- 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]-->
</head>
<body>
<?php echo $_SESSION['UserID'];?>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">GTEC NetWork</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
About
</li>
<li>
Services
</li>
<li>
Contact
</li>
<li>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Image Background Page Header -->
<!-- Note: The background image is set within the business-casual.css file. -->
<header class="business-header">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="tagline">GTEC Student Info System</h1>
</div>
</div>
</div>
</header>
<!-- Page Content -->
<div class="container">
<hr>
<div class="row">
<div class="col-sm-8">
<h2>What We Do</h2>
<p>Introduce the visitor to the business using clear, informative text. Use well-targeted keywords within your sentences to make sure search engines can find the business.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et molestiae similique eligendi reiciendis sunt distinctio odit? Quia, neque, ipsa, adipisci quisquam ullam deserunt accusantium illo iste exercitationem nemo voluptates asperiores.</p>
<p>
<a class="btn btn-default btn-lg" href="#">Call to Action »</a>
</p>
</div>
<div class="col-sm-4">
<h2>Contact Us</h2>
<address>
<strong>Start Bootstrap</strong>
<br>3481 Melrose Place
<br>Beverly Hills, CA 90210
<br>
</address>
<address>
<abbr title="Phone">P:</abbr>(123) 456-7890
<br>
<abbr title="Email">E:</abbr> name#example.com
</address>
</div>
</div>
<!-- /.row -->
<hr>
<div class="row">
<div class="col-sm-4">
<img class="img-circle img-responsive img-center" src="http://placehold.it/300x300" alt="">
<h2>Marketing Box #1</h2>
<p>These marketing boxes are a great place to put some information. These can contain summaries of what the company does, promotional information, or anything else that is relevant to the company. These will usually be below-the-fold.</p>
</div>
<div class="col-sm-4">
<img class="img-circle img-responsive img-center" src="http://placehold.it/300x300" alt="">
<h2>Marketing Box #2</h2>
<p>The images are set to be circular and responsive. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.</p>
</div>
<div class="col-sm-4">
<img class="img-circle img-responsive img-center" src="http://placehold.it/300x300" alt="">
<h2>Marketing Box #3</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.</p>
</div>
</div>
<!-- /.row -->
<hr>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
This is login form and index.php, I already created register form it working perfectly, the data that I registered is stored correctly, but the problem is in login form, it is redirection to index page, and the error is:
Fatal error: Call to a member function fetch_assoc() on a non-object in C:\xampp\htdocs\Studentmanagementsys\Login.php on line 13
You have syntax error in your sql query. When you executing query by mysqli, if there some sql syntax errors, method $con->query(...) will return boolean false. So, you have false value in your $result.
Php cant call method on boolean value: $result->fetch_assoc(), cause boolean is scalar value, not object. (sorry for my english)

CSS doesn't work if I include the HTML from a PHP

This is the situation.
I have three files:
index.html
completeupdate.html
chronus.php
(1) and (2) are almost identical, (2) was modified to remove a button and modify some body text.
What Happens is that I call (2) from (3).
So on (1) and (2) if they are called directly from the browser the CSS works fine, but as (2) is being called from inside (3) the CSS just doesn't work.
This is how the PHP script:
<?php
//GETTING SEVER DATE
date_default_timezone_set('America/Sao_Paulo');
$currentDate = date('Y-m-d H:i:s');
//UPDATES THE LOG
function logUpdate()
{
//bunch of unharmfull and uninteresting code
}
logUpdate();
include("../jude/updatecomplete.html");
?>
UPDATE-1
Here is the (1):
Here is the (2):
UPDATE-1-END
UPDATE-2
Code for (1):
<!DOCTYPE HTML>
<html>
<head>
<title>Judith Lars</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,800" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Oleo+Script:400" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/config.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-panels.min.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel-noscript.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-desktop.css" />
</noscript>
<!--[if lte IE 8]><script src="js/html5shiv.js"></script><link rel="stylesheet" href="css/ie8.css" /><![endif]-->
<!--[if lte IE 7]><link rel="stylesheet" href="css/ie7.css" /><![endif]-->
</head>
<body class="homepage">
<!-- Header Wrapper -->
<div id="header-wrapper">
<div class="container">
<div class="row">
<div class="12u">
<!-- Header -->
<header id="header">
<!-- Logo -->
<div id="logo">
<h1>Judith Lars</h1>
<span>Lorem ipsum dolor sit amet.</span>
</div>
</header>
</div>
</div>
</div>
</div>
<!-- Banner Wrapper -->
<div id="banner-wrapper">
<div class="container">
<div class="row">
<div class="12u">
<!-- Banner -->
<div id="banner" class="box">
<div>
<div class="row">
<div class="7u">
<h2>Nam rutrum est gravida, adipiscing ipsum vel, viverra nisl.</h2>
<p>Donec viverra nisi in urna vestibulum, sed pharetra risus.</p>
</div>
<div class="5u">
<ul>
<li>Update it now.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer Wrapper -->
<div id="footer-wrapper">
<footer id="footer" class="container">
<div class="row">
<div class="3u">
<!-- Contact -->
<section class="widget-contact last">
<h2>Contact Us</h2>
<ul>
<li><span>Twitter</span></li>
<li><span>Facebook</span></li>
</ul>
<p>Av. João, 1234<br />
São Paulo, São Paulo<br />
(11) 1234-1234</p>
</section>
</div>
</div>
<div class="row">
<div class="12u">
<div id="copyright">
© App4U Sistemas de Informação Ltda. All rights reserved.
</div>
</div>
</div>
</footer>
</div>
</body>
</html>
Code for (2):
<!DOCTYPE HTML>
<html>
<head>
<title>Judith Lars</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,800" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Oleo+Script:400" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/config.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-panels.min.js"></script>
<noscript>
<link rel="stylesheet" href="http://www.app4u.com.br/labs/royalib/verti/css/skel-noscript.css" />
<link rel="stylesheet" href="http://www.app4u.com.br/labs/royalib/verti/css/style.css" />
<link rel="stylesheet" href="http://www.app4u.com.br/labs/royalib/verti/css/style-desktop.css" />
</noscript>
<!--[if lte IE 8]><script src="js/html5shiv.js"></script><link rel="stylesheet" href="css/ie8.css" /><![endif]-->
<!--[if lte IE 7]><link rel="stylesheet" href="css/ie7.css" /><![endif]-->
</head>
<body class="homepage">
<!-- Header Wrapper -->
<div id="header-wrapper">
<div class="container">
<div class="row">
<div class="12u">
<!-- Header -->
<header id="header">
<!-- Logo -->
<div id="logo">
<h1>Judith Lars</h1>
<span>Lorem ipsum dolor sit amet.</span>
</div>
</header>
</div>
</div>
</div>
</div>
<!-- Banner Wrapper -->
<div id="banner-wrapper">
<div class="container">
<div class="row">
<div class="12u">
<!-- Banner -->
<div id="banner" class="box">
<div>
<div class="row">
<div class="7u">
<h2>Morbi ultrices ultrices sem, sed placerat tortor pulvinar sed. </h2>
<p>Nullam nec nulla nisi. Nunc mauris mi, pharetra eu placerat vitae, luctus nec enim.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer Wrapper -->
<div id="footer-wrapper">
<footer id="footer" class="container">
<div class="row">
<div class="3u">
<!-- Contact -->
<section class="widget-contact last">
<h2>Contact Us</h2>
<ul>
<li><span>Twitter</span></li>
<li><span>Facebook</span></li>
</ul>
<p>Av. João, 1234<br />
São Paulo, São Paulo<br />
(11) 1234-1234</p>
</section>
</div>
</div>
<div class="row">
<div class="12u">
<div id="copyright">
© App4U Sistemas de Informação Ltda. All rights reserved.
</div>
</div>
</div>
</footer>
</div>
</body>
</html>
UPDATE-2-END
Can anyone give a head up for me?
Cheers.
You have this:
include("../jude/updatecomplete.html");
And that is including an HTML file that has in it something like this:
<LINK href="../css/styles.css" rel="stylesheet" type="text/css" />
The HTML file has its reference to the CSS relative to its location. But the PHP file is in a different location, so once the HTML file's contents are printed into the output of the PHP file, the browser cannot load the CSS file because the relative path is not correct based on the location of the PHP file.
The CSS doesn't work because your PHP script is in another directory from what the HTML you're including is. By doing so, the stylesheet your including in the HTML file does not have the correct paths. Try appending the stylesheet's paths with a ../, like so:
<link href="../css/style.css" rel="stylesheet">
and you will see that it starts working when calling the PHP script but not the HTML file directly.
You'll need to use relative paths.
Make sure in your css includes to specify relative file path with a /.
Non-relative: <link rel="stylesheet" media="all" href="css/skin.css">
Relative: <link rel="stylesheet" media="all" href="/css/skin.css">
Thanks for all the advice, tried the three options suggestions that were offered, but what really made the trick was putting the "css" folder in the "php" folder.
So I think it's not a fancy move but got it going.
Thanks.

Categories