How to make website secure using php mysql - Learn With Riwash

Breaking

Learn With Riwash

learn with riwash learn with riwash is the personal blog/youtube channel that provide best knowledge of software development. Here we give complate trainning of techonology as will as build software. We teach you related to web developing and programming in html,javascript,php,python,c++, c#, java programming ect. It is not a complate teaching siti like W3schools but it it a blog where we give code that help you to become better programmer.

ads

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Wednesday, March 21, 2018

How to make website secure using php mysql

How to make website secure using php?
Learn with riwash 
Article by technical riwash.
Hello friends in this article i am going to teach you How to make website secure using php
you search in google that How to make website secure using php python jave what ever but you 
don't found. why but that are not work .
  In this article i am going to give fact tech ok now here are php script.

<?php
//here for variable 
$name="";
if($_SERVER["REQUEST_METHOD"]=="POST") {
$name=test_input($_POST["yourname"]);
}
function test_input($data){
$data=trim($data);
$data=stripslashes($data);
$data=htmlspecialchars($data);
return $data;
}
?>

what we do up $name is php variable that from html name="yourname",
$_POST is a goable variable that use for sent data .
Now  this is the text  test_input is use for the secure your website .
function test_input($data){
$data=trim($data);
$data=stripslashes($data);
$data=htmlspecialchars($data);
return $data;


This are the define of test_input function .
What this test_input do .
just make a website with out using test_input and check it.
post any php script like echo "hello world" 
that send only hello world.
 
          and again use test_input and post it echo all what you post this way this code was work.
This is a way how you can make website secure using php.
my name is riwash chamlagain if you want to contact me then send mail in technicalriwash@gmail.com

No comments:

Post Top Ad

Responsive Ads Here