How to arrange web page layout with bootstrap? - php

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

Related

Converting HTML Code to human understandable code

Most of my content in the database is recorded in this way. How can this be translated into HTML code structure?
<div class="main_title mb-4">n <h2>New Arrival</h2>n <span>Products</span>n <p>Cum doctus civibus efficiantur in imperdiet deterruisset.</p>n </div>n <div class="isotope_filter">n <ul><li><a href="http://www.example.com/index-2.html#0" id="all" data-filter="*">All</a></li><li><a href="http://www.example.com/index.html#0" id="popular" data-filter=".popular">Popular</a></li><li><a href="http://www.example.com/index-2.html#0" id="sale" data-filter=".sale">Sale</a></li></ul>n </div>
Convert to:
<div class="main_title mb-4">n <h2>New Arrival</h2>n <span>Products</span>n <p>Cum doctus civibus efficiantur in imperdiet deterruisset.</p>n </div>n <div class="isotope_filter">n <ul><li>All</li><li>Popular</li><li>Sale</li></ul>n </div>
You could use html_entity_decode():
$str = '<div class="main_title mb-4">n <h2>New Arrival</h2>n <span>Products</span>n <p>Cum doctus civibus efficiantur in imperdiet deterruisset.</p>n </div>n <div class="isotope_filter">n <ul><li><a href="http://www.example.com/index-2.html#0" id="all" data-filter="*">All</a></li><li><a href="http://www.example.com/index.html#0" id="popular" data-filter=".popular">Popular</a></li><li><a href="http://www.example.com/index-2.html#0" id="sale" data-filter=".sale">Sale</a></li></ul>n </div>';
echo html_entity_decode($str);
output:
<div class="main_title mb-4">n <h2>New Arrival</h2>n <span>Products</span>n <p>Cum doctus civibus efficiantur in imperdiet deterruisset.</p>n </div>n <div class="isotope_filter">n <ul><li>All</li><li>Popular</li><li>Sale</li></ul>n </div>

Change div content using PHP

I'm creating a movie database website. What I'm trying to achieve is that when a user clicks on one of the movies in the Latest movies collection (shown in the picture) the main movie banner (currently displaying "Transformers", show in the picture) will update and display the selected movie's title and poster, using PHP.
Picture showing the Main Movie and Latest Movie
Main movie code:
<!-- SPECIAL MOVIE SECTION -->
<div class="section">
<div class="hero-slide-item">
<img src="./images/transformer-banner.jpg" alt="">
<div class="overlay"></div>
<div class="hero-slide-item-content">
<div class="item-content-wraper">
<div class="item-content-title">
Transformer
</div>
<div class="movie-infos">
<div class="movie-info">
<i class="bx bxs-star"></i>
<span>9.5</span>
</div>
<div class="movie-info">
<i class="bx bxs-time"></i>
<span>120 mins</span>
</div>
<div class="movie-info">
<span>HD</span>
</div>
<div class="movie-info">
<span>16+</span>
</div>
</div>
<div class="item-content-description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quas, possimus eius. Deserunt non odit, cum vero reprehenderit laudantium odio vitae autem quam, incidunt molestias ratione mollitia accusantium, facere ab suscipit.
</div>
<div class="item-action">
<a href="#" class="btn btn-hover">
<i class="bx bxs-right-arrow"></i>
<span>Watch now</span>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- END SPECIAL MOVIE SECTION -->
Latest movie code:
<!-- MOVIE ITEM -->
<a href="#" class="movie-item">
<img src="<?php echo $row ["PosterLink"]; ?>" alt="">
<div class="movie-item-content">
<div class="movie-item-title">
<?php echo $row ["Title"]?>
</div>
<div class="movie-infos">
<div class="movie-info">
<i class="bx bxs-star"></i>
<span><?php echo $rating?></span>
</div>
<div class="movie-info">
<i class="bx bxs-time"></i>
<span><?php echo $runTime?></span>
</div>
<div class="movie-info">
<span>Director: <?php echo $director?></span>
</div>
</div>
</div>
</a>
<!-- END MOVIE ITEM -->
there
If you want to use only PHP, then you can pass some parameter to server when a user clicks on any movies in latest movie section so,
add some unique query parameter in anchor tag where user will be redirected when he clicks on a movie.
<your code>
then on server side get movie_id using $_GET['movie_id'] and fetch data of that movie,
then you need to make SPECIAL MOVIE SECTION also dynamic,
store movie data in any variable and use that variable in rendering SPECIAL MOVIE SECTION.
Let me know if you don't understand anything.

The main html in Wordpress front-page is not displaying, how can i fix it?

The html inside the main tag is not displaying but when I inspect the code, the html is there. This happens after I added the get_header function which gets a new header that is only for the front-page (other pages will get the normal header). The header and the footer are displaying without issues, only some listed items in the hero section aren't displaying either. I'm new to Wordpress and PHP, what is the best way to fix this?
My header-new.php code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Title</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Montserrat:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<?php wp_head();?>
</head>
<body>
<!-- ======= Hero Section ======= -->
<section id="hero">
<div class="hero-container">
<img src ="<?php bloginfo('template_directory');?>/assets/img/light-logo.png" alt="Logo" class="img-fluid hero-logo" data-aos="zoom-in">
<ul data-aos="fade-up">
<li>Listed Item 1</li>
<li>Listed Item 2</li>
<li>Listed Item 3</li>
<li>Listed Item 4</li>
</ul>
<a data-aos="fade-up" href="#about" class="btn-get-started scrollto">Learn More</a>
</div>
</section><!-- End Hero -->
<!-- ======= Header ======= -->
<header id="header" class="d-flex align-items-center">
<div id="navbar-container">
<div class="logo d-block d-lg-none">
<img src="<?php bloginfo('template_directory');?>/assets/img/dark-logo.png" alt="Maite Richert Logo" class="img-fluid">
</div>
<nav class="nav-menu d-none d-lg-block">
<ul class="nav-inner">
<li class="active">Meet Me</li>
<li class="drop-down">Programs
<ul>
<li>One-to-one Coaching</li>
<li>Posing Lessons</li>
</ul>
</li>
<li class="nav-logo"><img src="<?php bloginfo('template_directory');?>/assets/img/dark-logo.png" alt="Logo" class="img-fluid logo-image"></li>
<li>Shop</li>
<li>Contact</li>
</ul>
</nav><!-- .nav-menu -->
</div>
</header><!-- End Header -->
<main id="main">
My footer.php code:
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="footer-top">
<div class="container">
<div class="social-links">
<img src="<?php bloginfo('template_directory');?>/assets/img/tiktok.png" alt="TikTok Icon" class="tiktok">
<i class="bx bxl-instagram"></i>
<i class='bx bxl-youtube'></i></i>
</div>
</div>
</div>
<div class="container footer-bottom clearfix">
<div class="copyright">
© <strong><span>Maite Richert</span></strong>. All Rights Reserved. 2020
</div>
</div>
</footer><!-- End Footer -->
<i class="icofont-simple-up"></i>
<?php wp_footer();?>
</body>
</html>
And my front-page.php code:
<!-- ======= About Us Section ======= -->
<section id="about" class="about">
<div class="container">
<div class="section-title" data-aos="fade-up">
<h2>Meet Me</h2>
</div>
<div class="row">
<div class="col-lg-6" data-aos="fade-right">
<div class="image">
<img src="<?php bloginfo('template_directory');?>/assets/img/maite.jpg" class="img-fluid" alt="Fitness Coach">
</div>
</div>
<div class="col-lg-6" data-aos="fade-left">
<div class="content pt-4 pt-lg-0 pl-0 pl-lg-3 ">
<h3>Hi, I'm Maite</h3>
<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, 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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<ul>
<li><i class="bx bx-check"></i> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li><i class="bx bx-check"></i> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li><i class="bx bx-check"></i> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li><i class="bx bx-check"></i> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li><i class="bx bx-check"></i> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
</ul>
</div>
</div>
</div>
</div>
</section><!-- End About Us Section -->
<!-- ======= Services Section ======= -->
<section id="services" class="services">
<div class="container">
<div class="section-title" data-aos="fade-up">
<h2>Programs</h2>
</div>
<div class="row" style="margin-bottom: 10vh;">
<div class="col-lg-6 order-2 order-lg-1 services-box">
<div class="icon-box mt-5 mt-lg-0" data-aos="fade-up">
<i class="icofont-muscle-weight"></i>
<h4>One-to-one coaching</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<div class="learn-more-btn">Learn More</div>
</div>
<div class="icon-box mt-5" data-aos="fade-up" data-aos-delay="100">
<i class="icofont-trophy"></i>
<h4>Posing Coach</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<div class="learn-more-btn">Learn More</div>
</div>
</div>
<div class="col-lg-6 order-1 order-lg-2" data-aos="fade-left" data-aos-delay="100"><img class="img-fluid" src="<?php bloginfo('template_directory');?>/assets/img/services.jpg" alt="Fitnees posing"></div>
</div>
</div>
</section><!-- End Services Section -->
<!-- ======= Why Us Section ======= -->
<section id="why-us" class="why-us">
<div class="container">
<div class="row">
<div class="col-lg-12 order-2 order-lg-1 d-flex flex-column justify-content-center align-items-stretch">
<div class="content" data-aos="fade-up">
<h3><b>Why should you choose me?</b></h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</p>
<h4>How can you help you?</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</p>
<h4>Will this work for you?</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</p>
<h4>Aren't all the personal trainers the same?</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
</div>
</div>
</section><!-- End Why Us Section -->
<!-- ======= Sponsors Section ======= -->
<section id="sponsors" class="sponsors">
<div class="container">
<h3>Sponsors</h3>
<div class="row sponsor-img-container">
<div class="col-lg-2 col-md-4 col-6" data-aos="zoom-in" data-aos-delay="400">
<img src="<?php bloginfo('template_directory');?>/assets/img/sponsors/sponsor-5-1.png" id="womens-best" class="img-fluid" alt="Women's Best">
</div>
<div class="col-lg-2 col-md-4 col-6" data-aos="zoom-in" data-aos-delay="500">
<img src="<?php bloginfo('template_directory');?>/assets/img/sponsors/sponsor-6.png" class="img-fluid" alt="Ryderwear">
</div>
<div class="col-lg-2 col-md-4 col-6" data-aos="zoom-in" data-aos-delay="300">
<img src="<?php bloginfo('template_directory');?>/assets/img/sponsors/sponsor-4-1.png" id="wbff" class="img-fluid" alt="WBFF">
</div>
<div class="col-lg-2 col-md-4 col-6" data-aos="zoom-in" data-aos-delay="100">
<img src="<?php bloginfo('template_directory');?>/assets/img/sponsors/sponsor-2.png" class="img-fluid" alt="FitGriff">
</div>
<div class="col-lg-2 col-md-4 col-6" data-aos="zoom-in" data-aos-delay="200">
<img src="<?php bloginfo('template_directory');?>/assets/img/sponsors/sponsor-3-1.png" id="f4" class="img-fluid" alt="Factory 4">
</div>
<div class="col-lg-2 col-md-4 col-6" data-aos="zoom-in">
<img src="<?php bloginfo('template_directory');?>/assets/img/sponsors/sponsor-1.png" class="img-fluid" alt="Basic Fit">
</div>
</div>
</div>
</section><!-- End Sponsors Section -->
<!-- ======= Contact Section ======= -->
<section id="contact" class="contact section-bg">
<div class="container">
<div class="section-title">
<h2>Contact</h2>
<p>If you are interested in my services or if you have any questions, don't hesitate to contact me!</p>
</div>
<div class="row">
<div class="col-lg-8 mt-5 mt-lg-0 form-box">
<form action="forms/contact.php" method="post" role="form" class="php-email-form" data-aos="fade-left">
<div class="form-row">
<div class="col-md-6 form-group">
<input type="text" name="name" class="form-control" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" />
<div class="validate"></div>
<p>So I can get to know you better.</p>
</div>
<div class="col-md-6 form-group">
<input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" />
<div class="validate"></div>
<p>Only to reply you back. No marketing.</p>
</div>
</div>
<div class="form-group" style="padding-bottom: 2rem;">
<input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
<div class="validate"></div>
</div>
<div class="form-group">
<textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"></textarea>
<div class="validate"></div>
</div>
<div class="mb-3">
<div class="loading">Loading</div>
<div class="error-message"></div>
<div class="sent-message">Your message has been sent. Thank you!</div>
</div>
<div class="text-center form-btn-container"><button type="submit">Send Message</button></div>
</form>
</div>
</div>
</div>
</section><!-- End Contact Section -->
<?php get_footer();?>
This is not a direct answer to your question, but it may solve your problem, so I hope the answer is helpful for you.
If you only want to add a hero section to your front page, I think you do not need a page template and header template only for this one case. You could add a if clause inside of your default header.php checking if you are on frontpage. If it is true, your hero section is being inserted:
<body>
<?php if (is_front_page()) { ?>
<!-- ======= Hero Section ======= -->
<section id="hero">
<div class="hero-container">
<img src ="<?php bloginfo('template_directory');?>/assets/img/light-logo.png" alt="Logo" class="img-fluid hero-logo" data-aos="zoom-in">
<ul data-aos="fade-up">
<li>Listed Item 1</li>
<li>Listed Item 2</li>
<li>Listed Item 3</li>
<li>Listed Item 4</li>
</ul>
<a data-aos="fade-up" href="#about" class="btn-get-started scrollto">Learn More</a>
</div>
</section><!-- End Hero -->
<?php } ?>
.
.
.
This would be my solution. Does it work for you? If not, try chaning the content of your hero-container to check if something is wrong with this code. Just add a <p>test</p> to see that the if clause is working and that only the frontpage is outputting the paragraph with "test".
If you want to have a different page template (maybe because there are more pages you want to show the hero section), make sure you use the right file names to make wordpress template hierarchy work: https://developer.wordpress.org/themes/basics/template-hierarchy/
Page Template can be created with copying the page.php, renaming it page-frontpage.php and adding /* Template Name: Frontpage */ at the top of it. Go to your wordpress backend and edit your frontpage. On the right side under "page attributes" select the created page template.
Inside of your page-frontpage.php change the get_header() function to:
get_header('frontpage');
Then create a copy of your header.php and name it "header-frontpage.php".
Now every page that has the "frontpage" page template, will use the header with the name "frontpage". In the header-frontpage.php you make your changes.
For me a template only makes sense, if it is applied to more pages. For one case, you can do more easy and faster using an if clause.
Hope this can help you.

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

Issue with multiple forms

I have two forms on my page. One is in the footer which I cannot change. The second is in my main page. Confused? I hope not.
When I open the style-demo page (link below) you can see that the information belonging in the Footer form is partially entered into the comment form on the page.
The Form in the footer works correctly however the comment section does not.
Any help to have both work would be greatly appreciated.
Thank you.
Here are my links
http://richardtamm.com/includes/footer.php
http://richardtamm.com/style-demo.php
Here is the code
Footer
<div class="wrapper">
<div id="footer" class="clear">
<div class="fl_left">
<div id="about_us" class="border">
<h2>About R. Tamm</h2>
<p>Richard Tamm is an avid photographer and writer. Richard was born in the state of Michigan and currently lives in the state of Indiana. He is married with 4 wonderful children who love to call him daddy. </p>
<p>When not writing or taking photographs Richard enjoys watching movies and spending quality time with his family.</p>
</div>
<div id="contact" class="clear">
<h2>Contact Us</h2>
<div class="fl_left">
<form name="contactform" method="post" action="send_form_email.php">
<label for="first_name">First Name:</label>
<input type="text" name="first_name" id="first_name" value="">
<label for="last_name">Last Name:</label>
<input type="text" name="last_name" id="last_name" value="">
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="">
<label for="comments">Message:</label>
<textarea name="comments" id="comments" cols="45" rows="10"></textarea>
<button type="submit" value="submit"><span>Submit</span></button>
</form>
</div>
<div class="fl_right">
<address>
<strong class="title">Company Name</strong><br>
Richard Tamm<br>
EYE-TO-IMAGE<br>
Jasonville, Indiana<br>
47438
</address>
<ul>
<!--<li><strong class="title">Tel:</strong><br>
xxxxx xxxxxxxxxx</li>
<li><strong class="title">Fax:</strong><br>
xxxxx xxxxxxxxxx</li>-->
<li><strong class="title">Email:</strong><br>
<?php echo $emailaddress; ?></li>
</ul>
</div>
</div>
</div>
<!-- ####################################################################################################### -->
<div class="fl_right">
<div id="tabcontainer" class="border">
<ul id="tabnav">
<li>From The Blog</li>
<li>Latest Tweets</li>
<li class="last">Link Share</li>
</ul>
<div id="tabs-1" class="tabcontainer">
<script src="layout/scripts/blogfeed.setup.js"></script>
<script src="http://widget.feed.mikle.com/js/rssmikle.js"></script>
<div style="font-size:10px; text-align:right;">RSS widget</div>
</div>
<!-- ########### -->
<div id="tabs-2" class="tabcontainer">
<a class="twitter-timeline" href="https://twitter.com/rltamm" data-widget-id="435882309061865472">Tweets by #rltamm</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<!-- ########### -->
<div id="tabs-3" class="tabcontainer">
<ul>
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</div>
</div>
<h2>Keep Up To Date</h2>
<ul class="socialize">
<li><span>Facebook:</span> www.facebook.com/rltamm</li>
<li class="last"><span>Twitter:</span> www.twitter.com/rltamm</li>
</ul>
</div>
</div>
<div id="backtotop">To The Top <span class="icon-arrow-up"></span></div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright © 2011 - 2014 All Rights Reserved - <?php echo $sitename; ?></p>
<p class="fl_right">Website by <?php echo $sitename; ?> & <a target="_blank" href="http://www.os-templates.com/" title="Free Website Templates">OS Templates</a></p>
</div>
</div>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script src="layout/scripts/jquery.defaultvalue.js"></script>
<script src="layout/scripts/jquery.scrollTo-min.js"></script>
<script>
$(document).ready(function () {
$("#first_name, #last_name, #email, #comments").defaultvalue("First Name", "Last Name", "Email", "Message");
$('a.topOfPage').click(function () {
$.scrollTo(0, 1200);
return false;
});
$("#tabcontainer").tabs({
event: "click"
});
});
</script>
<script src="layout/scripts/jquery-prettyPhoto.js"></script>
<script src="layout/scripts/jquery-prettyPhoto-setup.js"></script>
Main Page
<?php
$titletag = 'Bookshelf - Page 1';
$metdescr = 'This is the SEO description - not too long not to short used in Google search results';
include_once($_SERVER["DOCUMENT_ROOT"].'/includes/header.php');
?>
<!-- ####################################################################################################### -->
<div class="wrapper col4">
<div id="container" class="clear">
<!-- ####################################################################################################### -->
<?php include_once($_SERVER["DOCUMENT_ROOT"].'/includes/shout.php'); ?>
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
<div id="content">
<h1><h1> to <h6> - Headline Colour and Size Are All The Same</h1>
<img class="imgr" src="images/demo/imgr.gif" alt="" width="125" height="125" />
<p>Aliquatjusto quisque nam consequat doloreet vest orna partur scetur portortis nam. Metadipiscing eget facilis elit sagittis felisi eger id justo maurisus convallicitur.</p>
<p>Dapiensociis temper donec auctortortis cumsan et curabitur condis lorem loborttis leo. Ipsumcommodo libero nunc at in velis tincidunt pellentum tincidunt vel lorem.</p>
<img class="imgl" src="images/demo/imgl.gif" alt="" width="125" height="125" />
<p>This is a W3C compliant free website template from OS Templates. This template is distributed using a Website Template Licence.</p>
<p>You can use and modify the template for both personal and commercial use. You must keep all copyright information and credit links in the template and associated files. For more CSS templates visit Free Website Templates.</p>
<p>Portortornec condimenterdum eget consectetuer condis consequam pretium pellus sed mauris enim. Puruselit mauris nulla hendimentesque elit semper nam a sapien urna sempus.</p>
<h2>Table(s)</h2>
<table summary="Summary Here" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
<th>Header 4</th>
</tr>
</thead>
<tbody>
<tr class="light">
<td>Value 1</td>
<td>Value 2</td>
<td>Value 3</td>
<td>Value 4</td>
</tr>
<tr class="dark">
<td>Value 5</td>
<td>Value 6</td>
<td>Value 7</td>
<td>Value 8</td>
</tr>
<tr class="light">
<td>Value 9</td>
<td>Value 10</td>
<td>Value 11</td>
<td>Value 12</td>
</tr>
<tr class="dark">
<td>Value 13</td>
<td>Value 14</td>
<td>Value 15</td>
<td>Value 16</td>
</tr>
</tbody>
</table>
<div id="comments">
<h2>Comments</h2>
<ul class="commentlist">
<li class="comment_odd">
<div class="author"><img class="avatar" src="images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name">A Name</span> <span class="wrote">wrote:</span></div>
<div class="submitdate">August 4, 2009 at 8:35 am</div>
<p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
</li>
<li class="comment_even">
<div class="author"><img class="avatar" src="images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name">A Name</span> <span class="wrote">wrote:</span></div>
<div class="submitdate">August 4, 2009 at 8:35 am</div>
<p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
</li>
<li class="comment_odd">
<div class="author"><img class="avatar" src="images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name">A Name</span> <span class="wrote">wrote:</span></div>
<div class="submitdate">August 4, 2009 at 8:35 am</div>
<p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
</li>
</ul>
</div>
<h2>Write A Comment</h2>
<div id="respond">
<form action="#" method="post">
<p>
<input type="text" name="name" id="name" value="" size="22" />
<label for="name"><small>Name (required)</small></label>
</p>
<p>
<input type="text" name="email" id="email" value="" size="22" />
<label for="email"><small>Mail (required)</small></label>
</p>
<p>
<textarea name="comment" id="comment" cols="100%" rows="10"></textarea>
<label for="comment" style="display:none;"><small>Comment (required)</small></label>
</p>
<p>
<input name="submit" type="submit" id="submit" value="Submit Form" />
<input name="reset" type="reset" id="reset" tabindex="5" value="Reset Form" />
</p>
</form>
</div>
</div>
<div id="column">
<div class="subnav">
<h2>Secondary Navigation</h2>
<ul>
<li>Open Source Templates</li>
<li>Free CSS Templates
<ul>
<li>Free XHTML Templates</li>
<li>Free Website Templates</li>
</ul>
</li>
<li>Open Source Layouts
<ul>
<li>Open Source Software</li>
<li>Open Source Webdesign
<ul>
<li>Open Source Downloads</li>
<li>Open Source Website</li>
</ul>
</li>
</ul>
</li>
<li>Open Source Themes</li>
</ul>
</div>
<div class="holder">
<h2 class="title"><img src="images/demo/60x60.gif" alt="" />Nullamlacus dui ipsum conseque</h2>
<p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque.</p>
<p class="readmore">Continue Reading »</p>
</div>
<div id="featured">
<ul>
<li>
<h2>Indonectetus facilis</h2>
<p class="imgholder"><img src="images/demo/240x90.gif" alt="" /></p>
<p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque congue magnis vestibulum quismodo nulla et feugiat. Adipisciniapellentum leo ut consequam ris felit elit id nibh sociis malesuada.</p>
<p class="readmore">Continue Reading »</p>
</li>
</ul>
</div>
<div class="holder">
<h2>Lorem ipsum dolor</h2>
<p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed.</p>
<ul>
<li>Lorem ipsum dolor sit</li>
<li>Etiam vel sapien et</li>
<li>Etiam vel sapien et</li>
</ul>
<p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed. Condimentumsantincidunt dui mattis magna intesque purus orci augue lor nibh.</p>
<p class="readmore">Continue Reading »</p>
</div>
</div>
<!-- ####################################################################################################### -->
<div class="clear"></div>
</div>
</div>
<!-- ####################################################################################################### -->
<?php include_once($_SERVER["DOCUMENT_ROOT"].'/includes/footer.php'); ?>
</body>
</html>
In the main page, the form is defined as <form action="#" method="post">. For the action, you need to put the PHP file you're calling. # doesn't make sense. Look at your other declaration:
<form name="contactform" method="post" action="send_form_email.php">
This makes sense. It's telling HTML to send to send_form_email.php the information through POST.

Categories