Tags » Php

Change Default Port of XAMPP Apache Server

This problem comes many times when you install skype and other application to your system that conflict the port issue with xampp port i.e 80 . 415 more words

PHP

PAYPAL PAYMENT DATA TRANSFERS (PDT)

To use PDT, you must activate PDT and Auto Return in your PayPal account profile. You must also acquire a PDT identity token, which is used in all PDT communication you send to PayPal. 476 more words

PHP

Laravel 5 + Google APIs Client Library

Prerequisite;

  1. Created a google app project
  2. Enabled Google+ API at your google project
  3. Created new Client ID
  4. Generated API Key
  5. Get service account name

You can find in this… 330 more words

PHP

As you aware, currently cPanel doesn’t provide the support for PHP 5.2.17. Also we can’t rebuild the old PHP versions using EasyApache. So we need to do it as custom. 229 more words

Downgrade

Intro to PHP

There are two types of Language used in web development.

  • Client Side Language
  • Server Side Language

Client side languages are those language which run on the end-user’s system. 71 more words

Into To Php

Hashing Password Di PHP

Slamat siang, sekarang saya ingin share tentang hal sepele ya mungkin udh banyak yang tau juga, sekarang saya ingin share tentang hashing password di php, mungkin banyak teknik hasing password tp saya hanya akan share beberapa saja ya sesuai dengan kasus yang saya alami hhe. 117 more words

PHP

insert,update,Delete

DEMO.PHP
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Basic</title>
</head>

<body>
<form action="demo.php" method="post">
Id <br>
<input type="text" name="id" required="required">
<br>
Name <br>
<input type="text" name="name" required="required"><br>
<br><input type="submit" name="sub" value="submit">
</html>

<?php

$con=mysql_connect("localhost","root","");
if(!$con)
{
echo "Not Connect";
}
error_reporting(0);

mysql_select_db("test2",$con)or die("Cannot Connect");
$id=$_POST['id'];
$name=$_POST['name'];
$query="insert into registration values('$id','$name')";
$result=mysql_query($query,$con);
if(!$result)
{
echo "Not Insert";
}
else
{
echo "Insert";
}
?>

Display.php

<?php
$con=mysql_connect("localhost","root","");
 if(!$con)
 {
 echo "Not Connect";
 }
 error_reporting(0);
 
 mysql_select_db("test",$con)or die("Cannot Connect");
 
 $sql="Select * from test";
 
 // pass the query
 $query=mysql_query($sql,$con);
 
 //$row=mysql_num_rows($query);
?>
 <table border="2" cellspacing="10" cellpadding="10">
 <tr>
 <th>Id</th>
 <th>Name</th>
 </tr>
 
 <?php
 while($row=mysql_fetch_assoc($query))//for datafetch three mathods are avillable 1.assoc 2.row 3.array
 {
 ?>
 <tr>
 <td><?php echo $row['id'] ?></td>
 <td><?php echo $row['name']?></td>
 <td><a href="disp.php?Id=<?php echo $row['id']; ?>">Delete</a></td>
 <td><a href="update.php">Update</a></td>
 </tr>
 <?php
 $Id=$_GET['Id'];
 
 
 
 $sql="delete from test WHERE id='$Id'";
 $result=mysql_query($sql,$con);
 if(!$result)
 {
 echo "Not Delete";
 }
 else
 {
 echo "Deleted";
 }
 
 
 }
 
?>

Delete.php

<?php
$con=mysql_connect("localhost","root","");
 if(!$con)
 {
 echo "Not Connect";
 }
 error_reporting(0);
 
 mysql_select_db("test",$con)or die("Cannot Connect");
 
 $Id=$_GET['Id'];
 
 $sql="delete from test WHERE id='$Id'";
 $result=mysql_query($sql,$con);
 if(!$result)
 {
 echo "Not Delete";
 }
 else
 {
 echo "Deleted";
 }
 
 
?>

Update.php

<!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>Untitled Document</title>
</head>

<body>
<form action="update.php"" method="post">
Id:-<input type="text" name="Id" />
Name:-<input type="text" name="name" />
<input type="submit" name="Up" value="Update" />
</form>
</body>
</html>

<?php

 $con=mysql_connect("localhost","root","");
 if(!$con)
 {
 echo "Not Connect";
 }
 error_reporting(0);
 
 mysql_select_db("test",$con)or die("Cannot Connect");
 
 $name=$_POST['name'];
 
 
 $id=$_POST['Id'];
 if($_POST['Up'])
 {
 $sql = "UPDATE test SET name='$name' WHERE id='$id' ";
 $result=mysql_query($sql,$con);
 if(!$result)
 {
 echo "Not Update";
 }
 else
 {
 echo "Update";
 }
 }
Php