Thursday, November 7, 2019

PHP THREE

php five

<?php

if (isset ($_POST ['b1'])){

function add() {
$a = $_POST ['num1'];
$b = $_POST ['num2'];
echo  $a + $b ;
}
?>
   <h3>  <?php add () ?> </h3>
   <?php
}
?>

<?php

if (isset ($_POST ['b2'])){

function add() {
$a = $_POST ['num1'];
$b = $_POST ['num2'];
echo  $a - $b ;
}
?>
   <h3>  <?php add () ?> </h3>
   <?php
}
?>

<?php

if (isset ($_POST ['b3'])){

function add() {
$a = $_POST ['num1'];
$b = $_POST ['num2'];
echo  $a * $b ;
}
?>
   <h3>  <?php add () ?> </h3>
   <?php
}
?>

<?php

if (isset ($_POST ['b4'])){

function add() {
$a = $_POST ['num1'];
$b = $_POST ['num2'];
echo  $a / $b ;
}
?>
   <h3>  <?php add () ?> </h3>
   <?php
}
?>


<form method="post">
<label> Enter first number </label>
<input type="number" name="num1"/> 

</br>
 </br>
     
     
<label> Enter second number </label>
<input type="number" name="num2"/>     
        </br>
        </br>
        <input type="submit" value="Add" name="b1"/>
     
        <input type="submit" value="Sub" name="b2"/>
     
        <input type="submit" value="Mulip" name="b3"/>
     
        <input type="submit" value="Divid" name="b4"/>
   
</form>

Aggregate funtion in mysql

AVG()

BIT_AND()

BIT_OR()

BIT_XOR()

COUNT(DISTINCT)

COUNT()

GROUP_CONCAT()

MAX()

MIN()

STD()

STDDEV_POP()

STDDEV_SAMP()

STDDEV()

SUM()

VAR_POP()

VAR_SAMP()

VARIANCE()

Set password in mysql xampp

You want to edit this file: "\xampp\phpMyAdmin\config.inc.php"

change this line:

$cfg['Servers'][$i]['password'] = 'WhateverPassword';

Wednesday, November 6, 2019

Remote Connection Guide


  1. Right Click on This PC
  2. Goto to Properties
  3. Click advanced system settings
  4. Click Remote
  5. Allow remote connection to this computer
  6. disallow the below one
  7. click ok

then 

  1. type credential manager in search
  2.  select windows credential
  3. remove all credential 
  4. and make new one with your username and password in windows credential

then

  1. Goto another computer and type open remote desktop connection and type than name of that computer where you selected allow option and then type credential of your system thats it.

Wednesday, July 3, 2019

How to connect xamp server to all pc from one

goto C
goto Xamp
Goto Apache
Goto conf
Goto extra
Open httpd-xampp.conf

change this para into this:
old:
    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        AllowOverride AuthConfig
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>

    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        AllowOverride AuthConfig Limit
        Require all granted
Order allow,deny
Allow from all
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

    </Directory>




Monday, June 24, 2019

Add column in sql

Alter table "Table_Name"
Add 'New_Column_Name' 'Datatype';


alter table product
Add quantity bigint;

PHP THREE