In This Tutorial we show haow Making application with test
What you need is everything to make an application:
Below I will show you how to make and use through the code.
In This Tutorial we show haow Making application with test
What you need is everything to make an application:
Below I will show you how to make and use through the code.
Here we will show you the steps on how to start your website with the admin panel (FrontEnd and BackEnd)
<?php
$server = "localhost";
$user = "root";
$password = "root";
$base = "energy_cms";
$conection = mysqli_connect($server, $user, $password, $base);
?>
By following these steps, you have created a database, linked your site to the database, and launched your site
The next steps are from yours, Have you created a login page for logging in or a blog where you can immediately write or chat,...
FrontEnd is an integral part of every website. FrontEnd displays everything the user needs to see (login, register, post, comment, ..). FrontEnd can be as separate as a plain HTML page. You can add CSS for a nicer look and JavaScript for functionality. FrontEnd can be without BackEnd.
An example for FrontEnd just took our BLOG temples. On our BLOG template you can see the following:
Examples of our templates that we made for frontend and backend and which are open source and download can be found here:
Too here you can find more details about our frontend tempaltes with a description of the code
you need CSS where you can copy and paste here:
Title website Template 3
Blog - Example
Center
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
BackEnd is a part of the website in which you control the website or have various other functionalities that allow you to work better on your site or FrontEnd. In most cases, the BackEnd is connected to the base (MySql, JSON, XML, MSSQL,...). BackEden will most often be called "Admin dashboard" or "Admin panel".
The content that the BackEnd should contain are:
As we said in the fontend you can use our backpack admin template.
An example can be found at this address: This is an example with login.
Example for Admin panel with loginThis part of the code belongs to the chat from the example above. Details and description of the code can be found at the following address:
Template Documentation
<?php
//Details and a description of the code can be found in the Admin Template tutorial
session_start();
require 'conection.php';
if (isset($_POST['login'])) {
$password = $_POST['password'];
$user = $_POST['user'];
$upit = "SELECT * FROM users WHERE user = '$user' AND password = '$password'";
$pokretanje_upita = mysqli_query($conection, $upit);
$row=mysqli_num_rows($pokretanje_upita);
$row=mysqli_fetch_assoc($pokretanje_upita);
$role=$row['role'];
$_SESSION['user']=$user;
$_SESSION['role']=$role;
if($role=='admin'){
header('location:home.php');
}
}
?>
<?php
//Details and a description of the code can be found in the Admin Template tutorial
$server = "localhost";
$user = "root";
$password = "root";
$base = "example"
$conection = mysqli_connect($server, $user, $password, $base);
?>
GET & POST method serves to send data to a web server.
You can find an example of the GET & POST method on the main page of the tutorial index.php Tutorials
A complete ttutrial with explanation and crud can be found on the Function 7 & Grid Exmple page. Here you can also find examples for the GET and POST method. Function 7 & Grid
The GET method sends data and adds a request to the page. The best example is CRUD. when you want to do EDIT or DELETE, for example, you send a value via ID, and on the edit.pgp page, "catch" the value for ID.
Example below, indes. we send the value of ID to example 1. id = 1. On the edit.php page we capture this unit we sent so again the id will have a value of 1 id = $ _GET ['1']; and there is a match "1 = 1"
<a href="edit.php?id=<?php echo $id; ?>"><button class="btn-2">Edit</button></a>
<?php
$id = $_GET['id'];
?>
POST method transfers information via HTTP.
An example of the POST method is on the edit page when you have caught id 1 from the previous example you are listed for example where all the information related to id 1 SELECT * FROM user WHERE id = $ id. That is, where is the id from the database which is 1 and $ id when we caught the GET method and it is also 1.
In this case, we will use the POST method when we want to edit, for example, the user and his name on the edit.php page, so we use the POST method. $ name = $ _POST ['name']; This POST method is important because you intrude in this case or when we add for example the user to the inster into. Update example $ result = mysqli_query ($ chon, "UPDATE user SET name = '$ name' WHERE id = $ id"); Here we have taken from the forum that needs to be changed, we do it using the POST method and the ID serves us to match the id from the database and the GET method.
require 'con.php';
$id = $_GET['id'];
$q= "SELECT * FROM user WHERE id = $id";
$s = mysqli_query($con, $q);
while ($row = mysqli_fetch_assoc($s)) {
$id = $row['id'];
$name = $row['name'];
}
if (isset($_POST['edit'])) {
$name = $_POST['name'];
$result = mysqli_query($con, "UPDATE user SET name='$name' WHERE id=$id");
}
?>
<form action="" method="post" enctype="multipart/form-data">
<label>Name</label>
<input type="text" name="name" value="<?php echo $name; ?>">
<input type="submit" name="edit" value="Edit">
</form>