CSS not getting applied even though console shows no error - php

I am designing page in CI framework and have correctly included files but the css is not getting applied even though browser shows its calling them correctly..not sure where I am going wrong.
Below is the code I have written:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<title>login</title>
<?php include_once 'header.php'; ?>
</head>
<body class="bg-dark">
<div class="container">
<div class="card card-login mx-auto mt-5">
<div class="card-header">Please enter your login details:</div>
<div class="card-body">
<form>
<div class="form-group">
<label for="name">Username</label>
<input class="form-control" placeholder="User name" name="name" type="text" id="name" autofocus>
</div>
<div class="form-group">
<label for="password">Password</label>
<input class="form-control" id="password" type="password" placeholder="Password" id="password">
</div>
<div>
<input type="submit" name="submit" value="Login" class="btn btn-lg btn-success btn-block">
</div>
</form>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="<?php echo base_url('assets/vendor/jquery/jquery.min.js');?>"></script>
<script src="<?php echo base_url('assets/vendor/bootstrap/js/bootstrap.bundle.min.js');?>"></script>
<!-- Core plugin JavaScript-->
<script src="<?php echo base_url('assets/vendor/jquery-easing/jquery.easing.min.js');?>"></script>
</body>
</html>
When I click on browser by pressing F12 I get this :
<!DOCTYPE html>
<html lang="en">
<head>
<title>login</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<!-- Bootstrap core CSS-->
<link href="http://localhost/polyropes_new/assets/vendor/bootstrap/css/bootstrap.min.css">
<!-- Custom fonts for this template-->
<link href="http://localhost/polyropes_new/assets/vendor/font-awesome/css/font-awesome.min.css">
<!-- Page level plugin CSS-->
<link href="http://localhost/polyropes_new/assets/vendor/datatables/dataTables.bootstrap4.css">
<!-- Custom styles for this template-->
<link href="http://localhost/polyropes_new/assets/css/sb-admin.css">
</head>
<body class="bg-dark">
<div class="container">
<div class="card card-login mx-auto mt-5">
<div class="card-header">Please enter your login details:</div>
<div class="card-body">
<form>
<div class="form-group">
<label for="name">Username</label>
<input class="form-control" placeholder="User name" name="name" type="text" id="name" autofocus>
</div>
<div class="form-group">
<label for="password">Password</label>
<input class="form-control" id="password" type="password" placeholder="Password" id="password">
</div>
<div>
<input type="submit" name="submit" value="Login" class="btn btn-lg btn-success btn-block">
</div>
</form>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="http://localhost/polyropes_new/assets/vendor/jquery/jquery.min.js"></script>
<script src="http://localhost/polyropes_new/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="http://localhost/polyropes_new/assets/vendor/jquery-easing/jquery.easing.min.js"></script>
</body>
</html>
This shows all files and CSS have been called correctly as none of them is blank.Please guide me

Related

Simple template import

How to make it so that when you access a simple page like CONTACT.PHP, it already comes with the main html embedded (TEMPLATE.PHP): Example:
PAGE CONTENT "CONTACT.PHP"
<form method="post" autocomplete="off" class="logg">
<div class="row">
<div class="col-xs-12 col-sm-4">
<div class="form-group">
<label for="aaa" class="control-label">Name</label>
<input name="name" type="text" class="form-control" value="" required/>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="form-group">
<label for="aaa" class="control-label">Email</label>
<input name="email" type="email" class="form-control" value="" required/>
</div>
</div>
</div>
<button type="submit" class="btn btn-success pull-right"> Save </button>
</form>
PAGE CONTENT "TEMPLATE.PHP"
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.2/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- PAGE CONTENT BEGINS -->
<?= contact page here ?> <<<<<<<<<<<<<<<<<<<<<<<<<<<<
<!-- PAGE CONTENT ENDS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.2.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Operation:
When the contato.php page is accessed, the template would also be loaded so that the layout is fully assembled.

multi page form laravel

Hello I am creating a multi form page but when data is insetting in database it insert on 2 row with different ids I need each submit be as one id not 2 ids kindly check the code below note that I am new should I add the session or what is the best way to do it .thank you
Controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class secmultiController extends Controller
{
public function NameMentionded(){
return view('multiform.name');
}
public function AddNameMentionded(Request $request){
$request->validate([
'empname'=> 'required ',
'empnum'=> 'required ',
]);
$query = DB::table('secmultis')->insert([
'empname'=>$request->input('empname'),
'empnum'=>$request->input('empnum'),
]);
return redirect('reports');
}
public function ReportPerson(){
return view('multiform.as');
}
public function adds(Request $request){
$request->validate([
'incnam'=> 'required ',
'incnum' => 'required ',
'inctdes' => 'required ',
'inctype' => 'required ',
'inncity' => 'required ',
'incday' => 'required ',
'incatt' => 'required ',
'incterm' => 'required ',
]);
$query = DB::table('secmultis')->insert([
'incnam'=>$request->input('incnam'),
'incnum'=>$request->input('incnum'),
'inctdes'=>$request->input('inctdes'),
'inctype'=>$request->input('inctype'),
'incterm'=>$request->input('incterm'),
'inncity'=>$request->input('inncity'),
'incday'=>$request->input('incday'),
'incatt'=>$request->input('incatt'),
]);
if($query){
return back()->with('success','Data have been successfully inserted');
}else{
return back()->with('fail','Data have not been successfully inserted');
}
}
}
Route
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\MultiformController;
use App\Http\Controllers\secmultiController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('test');
});
/// multipage form
Route::controller(secmultiController::class)->group(function(){
Route::get('/name','NameMentionded')->name('name.mentioned');
Route::post('/add','AddNameMentionded')->name('addname.mentioned');
Route::get('/reports','ReportPerson');
Route::POST('/adds','adds');
});
Route::get('/dashboard', function () {
return view('admin.index');
})->middleware(['auth','verified'])->name('dashboard');
require __DIR__.'/auth.php';
nano.blade
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dashboard | Makassed Speak </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
<meta content="Themesdesign" name="author" />
<!-- App favicon -->
<link rel="shortcut icon" href="{{ asset('backend/assets/images/favicon.ico') }}">
<!-- jquery.vectormap css -->
<link href="{{ asset('backend/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css') }}" rel="stylesheet" type="text/css" />
<!-- DataTables -->
<link href="{{ asset('backend/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css') }}" rel="stylesheet" type="text/css" />
<!-- Responsive datatable examples -->
<link href="{{ asset('backend/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css') }}" rel="stylesheet" type="text/css" />
<!-- Bootstrap Css -->
<link href="{{ asset('backend/assets/css/bootstrap.min.css') }}" id="bootstrap-style" rel="stylesheet" type="text/css" />
<!-- Icons Css -->
<link href="{{ asset('backend/assets/css/icons.min.css') }}" rel="stylesheet" type="text/css" />
<!-- App Css-->
<link href="{{ asset('backend/assets/css/app.min.css') }}" id="app-style" rel="stylesheet" type="text/css" />
<!-- App bootstrap-->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/bootstrap.tagsinput/0.8.0/bootstrap-tagsinput.css" >
<!-- App toastr-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.css" >
<!-- App datepicker-->
<link href="{{asset('backend/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row" style="margin-top:50px;";>
<br>
</div>
</div>
<form action="add" method="POST" novalidate="">
#csrf
<div class="container">
<div class="col-md-6 offset-md-3">
<div class="card">
<div class="card-header bg-secondary text-white">nona </div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label class="form-label">Employee Name </label>
<input type="text" class="form-control" name="empname" placeholder="" required="">
<span style="color:red;">#error('empname') {{$message}} #enderror</span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label class="form-label"> Employee #</label>
<input type="text" class="form-control" name="empnum" placeholder="" required="">
<span style="color:red;">#error('empnum') {{$message}} #enderror</span>
</div>
</div>
</div>
<button class="btn btn-primary" type="submit">Next</button>
</div>
</form>
<script src="{{asset('backend/assets/libs/jquery/jquery.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/metismenu/metisMenu.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/simplebar/simplebar.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/node-waves/waves.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/parsleyjs/parsley.min.js')}}"></script>
<script src="{{asset('backend/assets/js/pages/form-validation.init.js')}}"></script>
<script src="{{asset('backend/assets/js/app.js')}}"></script>
<script src="{{asset('backend/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
</body>
</html>
as.blade
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dashboard | Makassed Speak </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
<meta content="Themesdesign" name="author" />
<!-- App favicon -->
<link rel="shortcut icon" href="{{ asset('backend/assets/images/favicon.ico') }}">
<!-- jquery.vectormap css -->
<link href="{{ asset('backend/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css') }}" rel="stylesheet" type="text/css" />
<!-- DataTables -->
<link href="{{ asset('backend/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css') }}" rel="stylesheet" type="text/css" />
<!-- Responsive datatable examples -->
<link href="{{ asset('backend/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css') }}" rel="stylesheet" type="text/css" />
<!-- Bootstrap Css -->
<link href="{{ asset('backend/assets/css/bootstrap.min.css') }}" id="bootstrap-style" rel="stylesheet" type="text/css" />
<!-- Icons Css -->
<link href="{{ asset('backend/assets/css/icons.min.css') }}" rel="stylesheet" type="text/css" />
<!-- App Css-->
<link href="{{ asset('backend/assets/css/app.min.css') }}" id="app-style" rel="stylesheet" type="text/css" />
<!-- App bootstrap-->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/bootstrap.tagsinput/0.8.0/bootstrap-tagsinput.css" >
<!-- App toastr-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.css" >
<!-- App datepicker-->
<link href="{{asset('backend/assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css')}}" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row" style="margin-top:50px;";>
<br>
</div>
</div>
s
<form action="adds" method="POST" novalidate="">
#csrf
<div class="container">
<div class="col-md-6 offset-md-3">
<div class="card">
<div class="card-header bg-secondary text-white">Emlpoyee </div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label class="form-label">Employee Name </label>
<input type="text" class="form-control" name="incnam" placeholder="" required="">
<span style="color:red;">#error('incnam') {{$message}} #enderror</span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label class="form-label"> Employee #</label>
<input type="text" class="form-control" name="incnum" placeholder="" required="">
<span style="color:red;">#error('incnum') {{$message}} #enderror</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="mb-3">
<label class="form-label">INCIDENT DETAILS</label>
<textarea class="form-control" name="inctdes" id="" cols="30" rows="10"></textarea>
<span style="color:red;">#error('inctdes') {{$message}} #enderror</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="mb-3">
<label for="" class="form-label">INCIDENT TYPE</label>
<select class="form-select" name="inctype" id="" required="">
<option selected="" disabled="" value="">Choose...</option>
<option>THEFT</option>
<option>NON COMPLIANCE WITH COMPANY POLICY</option>
<option>ABUSING POWER</option>
<option>USING COMPANY PROPERTY FOR PERSONAL INTEREST</option>
<option>NEGLIGENCE</option>
</select>
<span style="color:red;">#error('inctype') {{$message}} #enderror</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="mb-3">
<label for="" class="form-label">INCIDENT TYPE</label>
<select class="form-select" name="inncity" id="" required="">
<option selected="" disabled="" value="">Choose...</option>
<option>Beirut</option>
<option>North</option>
<option>South</option>
</select>
<span style="color:red;">#error('inncity') {{$message}} #enderror</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="mb-4">
<label class="form-label">INCIDENT DATE
</label>
<div class="input-group" id="datepicker2">
<input type="text" name="incday" class="form-control" placeholder="dd M, yyyy" data-date-format="dd M, yyyy" data-date-container="#datepicker2" data-provide="datepicker" data-date-autoclose="true">
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
<span style="color:red;">#error('incday') {{$message}} #enderror</span>
</div><!-- input-group -->
</div>
</div>
<div class="col-md-6">
<div class="mb-6">
<label class="form-label">INCIDENT DATE
</label>
<div class="input-group">
<input type="file" class="form-control" name="incatt" id="customFile">
<span style="color:red;">#error('incatt') {{$message}} #enderror</span>
</div>
</div>
</div>
/div>
<div class="row">
<div class="col-md-12">
<div class="mb-3">
<div class="d-flex flex-wrap gap-2">
<h6>I confirm that, all above provided information is correct.
</h6>
<input type="checkbox" name="incterm" id="switch3" switch="bool" checked="">
<label for="switch3" data-on-label="Yes" data-off-label="No"></label>
<span style="color:red;">#error('incterm') {{$message}} #enderror</span>
</div>
</div>
</div>
</div>
<button class="btn btn-primary" type="submit">Next</button>
</div>
</form>
<script src="{{asset('backend/assets/libs/jquery/jquery.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/metismenu/metisMenu.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/simplebar/simplebar.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/node-waves/waves.min.js')}}"></script>
<script src="{{asset('backend/assets/libs/parsleyjs/parsley.min.js')}}"></script>
<script src="{{asset('backend/assets/js/pages/form-validation.init.js')}}"></script>
<script src="{{asset('backend/assets/js/app.js')}}"></script>
<script src="{{asset('backend/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js')}}"></script>
</body>
</html>

how to redirect with php?

I want my code once press submit to be redirected to another website.
I want this to be done through a PHP script so it can be expanded.
The problem is that when I test the code the PHP script is loaded in the browser with a blank page instead of redirecting it to the web I want.
I leave you my current code:
SIGN_IN.HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="https://getbootstrap.com/docs/4.0/assets/img/favicons/favicon.ico">
<title>Signin Template for Bootstrap</title>
<link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/sign-in/">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/signin.css" rel="stylesheet">
</head>
<body class="text-center">
<div class="form-signin">
<form action="post.php">
<img class="mb-4" src="https://getbootstrap.com/docs/4.0/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<input class="btn btn-lg btn-primary btn-block" type="submit" value="Sign in"/>
<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
</form>
</div>
</body>
</html>
POST.PHP
<?php
header ("Location: https://getbootstrap.com/docs/4.0/examples/sign-in/");exit;
?>
PD:As you can see, the page is an example website, I do not intend to carry out any cybercrime, just learn
Thanks
I think your file is Capital letter, right? It should be post.php, not POST.php.
Please check again.
I've tested your code with post.php. It works well.

PHP Display single value from session array

I currently have a PHP form for our partners to register quotes. After the user log in they are brought to the beginning of the quote form. I would like the user's first name to display in the first form field automatically.
The user's session information includes an array of values; one of which is the firstName value. This is the value that I would like to display in the first field when the user logs in.
When I try to load the page I am getting an error instead of the user's first name.
This is the error I am getting:
Notice: Undefined index: user in C:\wamp64\www\quote_generator\quote_tool.php on line 77
Here is the updated page code:
<?php
require("config.php");
if(empty($_SESSION['user']))
{
header("Location: index.php");
die("Redirecting to index.php");
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Quoting Tool </title>
<meta name="description" content="Teo partner quote generator tool">
<meta name="Kenneth Carskadon" content="www.kencarskadon.com">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSS -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
<link rel="stylesheet" href="assets/css/bootstrap.min.css" media="screen">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/css/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" href="assets/css/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="assets/css/form-elements.css">
<link rel="stylesheet" href="assets/css/datepicker.css">
<link rel="stylesheet" href="assets/css/style.css">
<style>
body {
background: url("assets/images/backgrounds/background.jpg") no-repeat fixed center;
background-size: cover;
}
</style>
</head>
<body>
<!-- Top menu -->
<nav class="navbar navbar-inverse navbar-no-bg" role="navigation">
<div class="container">
<div>
<a class="navbar-brand" href="#">
<img src="assets/images/logo/Teo%20Logo%20White.png" class="img-responsive" id="teo-logo">
</a>
</div>
</div>
</nav>
<!-- Top content -->
<div class="top-content">
<div class="inner-bg">
<div class="container form-container">
<div class="row">
<div class="col-sm-8 col-sm-offset-2 text">
<h1><strong>Teo</strong> Partner Quote Generation Form</h1>
</div>
</div>
<div class="row">
<div class="col-sm-8 col-sm-offset-2 form-box">
<form role="form" action="" method="post" class="registration-form">
<!-- Fieldset 1: Partner Information -->
<fieldset>
<div class="form-top">
<div class="form-top-left">
<h2>Partner Information</h2>
<h3>Tell us who you are</h3>
</div>
<div class="form-top-right">
<img src="assets/images/icons/partner_info.png" class="form-icon">
</div>
</div>
<div class="form-bottom">
<div class="form-group">
<input type="text" name="form-partner-name" placeholder="Partner name" class="form-partner-name form-control" id="form-partner-name"
value="<?php echo $_POST['user']['firstName']?>">
</div>
<div class="form-group">
<select name="partner-level" type="text" title="Select partner level" class="form-control" id="form-partner-level" >
<option>Select partner level</option>
<option data-price="34">Platinum</option>
<option data-price="32">Gold</option>
<option data-price="29">Silver</option>
</select>
</div>
<div class="form-group">
<input type="text" readonly="readonly" name="discount-perc" placeholder="Discount(%)" class="form-control" id="form-discount-perc">
</div><br />
<div class="form-group">
<input type="text" name="form-margin-perc" placeholder="Margin(%)" class="form-control" id="form-margin-perc">
</div>
<br /><br />
<button type="button" class="btn btn-next">Next</button>
</div>
</fieldset>
<!-- Fieldset 2: Quote Information -->
<fieldset>
<div class="form-top">
<div class="form-top-left">
<h2>Quote Information</h2>
<h3>Tell us about your customer</h3>
</div>
<div class="form-top-right">
<img src="assets/images/icons/partner_info.png" class="form-icon">
</div>
</div>
<div class="form-bottom">
<div class="form-group">
<input type="text" name="form-customer-name" placeholder="Customer name" class="form-customer-name form-control" id="form-customer-name">
</div>
<div class="form-group">
<input type="text" name="form-quote-number" placeholder="Quote Number" class="form-quote-number form-control" id="form-quote-number">
</div>
<div class="form-group">
<input type="text" name="form-incentive-exp" placeholder="Incentive Expiration Date" class="teo-datepicker">
</div>
<div class="form-group">
<input type="text" name="form-proposal-exp" placeholder="Proposal Expiration Date" class="teo-datepicker">
</div>
<br /><br />
<button type="button" class="btn btn-previous">Previous</button>
<button type="button" class="btn btn-next">Next</button>
</div>
</fieldset>
<!-- Fieldset 3: Select Servers -->
<fieldset>
<div class="form-top">
<div class="form-top-left">
<h2>Select Servers</h2>
<h3>Tell us about the servers you need</h3>
</div>
<div class="form-top-right">
<img src="assets/images/icons/select_servers.png" class="form-icon">
</div>
</div>
<div class="form-bottom">
<div class="form-group">
<label for="server-select">What kind of server do you need?</label>
<select class="form-control" id="server-type-select">
<option>Please select and option below</option>
<option>Pro Server</option>
<option>Mini Server</option>
</select>
</div>
<div class="form-group">
<label for="server-select">How many servers do you need?</label>
<input type="text" name="form-server-quantity" placeholder="Number of servers" class="form-control" id="form-server-quantity">
</div>
<br /><br />
<button type="button" class="btn btn-previous">Previous</button>
<button type="button" class="btn btn-next">Next</button>
<button type="button" class="btn btn-skip">skip</button>
</div>
</fieldset>
<!-- Fieldset 4: Configure Servers -->
<fieldset>
<div class="form-top">
<div class="form-top-left">
<h2>Select Servers</h2>
<h3>Tell us about the servers you need</h3>
</div>
<div class="form-top-right">
<img src="assets/images/icons/select_servers.png" class="form-icon">
</div>
</div>
<div class="form-bottom">
<div class="form-group">
<label for="server-select">What kind of server do you need?</label>
<select class="form-control" id="server-type-select">
<option>Please select and option below</option>
<option>Pro Server</option>
<option>Mini Server</option>
</select>
</div>
<div class="form-group">
<label for="server-select">How many servers do you need?</label>
<input type="text" name="form-server-quantity" placeholder="Number of servers" class="form-control" id="form-server-quantity">
</div>
<br /><br />
<button type="button" class="btn btn-previous">Previous</button>
<button type="button" class="btn btn-next">Next</button>
<button type="button" class="btn btn-skip">Skip</button>
</div>
</fieldset>
<div class="btn-logout">
Logout
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Javascript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.backstretch.min.js"></script>
<script type='text/javascript' src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script>
<script src="assets/js/bootstrap-datepicker.js"></script>
<script src="assets/js/scripts.js"></script>
<!--[if lt IE 10]>
<script src="assets/js/placeholder.js"></script>
<![endif]-->
</body>
</html>
Update: I have a session page that shows me the information on the current session, and these are the results for the form I am talking about:
View Image
The screenshot clarified it.
You should be able to use
$session['user']['firstName']
As noted in the comments above though, you will want to migrate away from using eval, which has security implications.

troubleshooting php contact form

I have a form made with bootstrap, and a very simple script that post to self, but I can't get it to work, I uploaded to my site, but it is not posting the input fields back in the same page.
here is the script
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Contact Us</title>
<!-- Bootstrap -->
<link href="bootstrap.min.css" rel="stylesheet">
<!-- stylesheet for this form -->
<link href="contact-stylesheet.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for 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/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="my-form">
<form class="form-horizontal" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" >
<div class="form-group" id="hori-form">
<label for="inputEmail3" class="col-sm-2 control-label">Name:</label>
<div class="col-sm-5">
<input type="name" class="form-control" id="inputEmail3" placeholder="Name">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Email:</label>
<div class="col-sm-5">
<input type="email" class="form-control" id="inputPassword3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Text:</label>
<div class="col-sm-8">
<textarea class="form-control" rows="7" placeholder="Text"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Send</button>
</div>
</div>
</div>
</form>
<?php
Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"];
?>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
You are missing name html attribute for your input tags.
<input type="name" name="name" class="form-control" id="inputEmail3" placeholder="Name">
and this part of your page must change also
Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"];?>

Categories