Posts

Showing posts from September, 2020

Delete data Using php with backend for beginners

  Delete data Using php   with backend :- Code (delete.php) :-   <?php $con=mysql_connect("localhost","root",""); mysql_select_db("exam",$con); $i=$_GET['id']; $q=mysql_query("delete from tblpersons where id=$i"); header("location:show.php"); ?> For Full demo with backend please comment we sent you on your gmail..thank you

Update Inserted Data into table using Php

  Update Inserted Data into table using Php with backend: Code(update.php):- <?php $con=mysql_connect("localhost","root",""); mysql_select_db("exam"); $id=$_POST['id']; $fname=$_POST['fname']; $lname=$_POST['lname']; $dob=$_POST['dob']; $org=$_POST['org']; $dst=$_POST['dst']; $country=$_POST['country']; $state=$_POST['state']; $city=$_POST['city']; $query="update tblpersons set id='$id',firstname='$fname',lastname='$lname',doj='$dob',organization='$org',designation='$dst',countryid='$country',state='$state', city='$city' where id=".$id.""; $q=mysql_query($query,$con); if($q) { echo "sucess"; } else { echo "unsuccess"; } mysql_close($con); header("location:show.php"); echo ...

Insert Form Data into Database Table in Php

Image
  Insert or Add and Show data  into Database Table Using PHP:  Code (insert.php) :- <?php $con=mysql_connect("localhost","root",""); mysql_select_db("exam"); $fname=$_POST['fname']; $lname=$_POST['lname']; $dob=$_POST['dob']; $org=$_POST['org']; $dst=$_POST['dst']; $country=$_POST['country']; $state=$_POST['state']; $city=$_POST['city']; $query="insert into tblpersons(firstname,lastname,doj,organization,designation,countryid,state,city)values('$fname','$lname','$dob','$org','$dst','$country','$state','$city')"; $q=mysql_query($query,$con); mysql_close($con); echo "insert successfully.."; header("location:show.php"); ?> Code(Display Your data):- <html> <head> </head> <body> <p align="right...

Create Simple Form Using php

Image
Create Simple Form Using Php with backend With all types of input : Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Php Form Demo</title> </head> <body> <form method="post" action="insert.php"> <font size="+1"> <fieldset> <legend>Personal Information</legend> <p> firstname * <input type="text" name="fname" required /> <br/><br/> lastname: <input type="text" name="lname" /> <br/><br/> Date of birth: <input type="date" name="dob" value="2018-07-22" ...