PHP Tutorials

0

PHP OOP Classes and Objects

Program 1 <?php class MyClass { public $m,$n,$r; // instacne function add() { echo “<center>”; $this->r=$this->m + $this->n; echo “Addition is”.$this->r; echo “</center>”; return $this->r; } function sub() { echo “<center>”; $this->r=$this->m – $this->n;...

0

PHP Project – Book Searching Application

Program 1 <html> <body> <center> <font color=red size=10>B</font><font color=black size=10>o</font><font color=green size=10>o</font><font color=blue size=10>k</font> <font color=black size=10>S</font> <font color=red size=10>e</font> <font color=green size=10>a</font> <font color=blue size=10>r</font> <font color=black size=10>h</font> <form method=post action=BookSearch.php> <textarea rows=2...

0

PHP mysqli fetch_all() and fetch_field() Function

Program 1 <html> <body> <center> <pre> <?php $mycon=$mycon=mysqli_connect(“localhost”,”root”,””,”Library”) or die(“Connection not success”); //echo “Connection success”; $sql=”select * from studentdata”; $record=$mycon->query($sql); //$row=mysqli_fetch_all($record,MYSQLI_NUM); // print_r($row); // foreach($row as $value) // { // echo $value[0].” “.$value[1].” “.$value[2].”...

0

PHP mysqli_fetch_array() Function Part – 2

Program 1 <html> <body> <center> <pre> <?php $mycon=$mycon=mysqli_connect(“localhost”,”root”,””,”Library”) or die(“Connection not success”); $sql=”select * from studentdata”; $record=$mycon->query($sql); $n=mysqli_num_rows($record); //echo “Total Record: “.$n; echo “Using Array Function<br>”; //$row=mysqli_fetch_array($record,MYSQLI_ASSOC); // $row=mysqli_fetch_array($record,MYSQLI_NUM); // $row=mysqli_fetch_array($record,MYSQLI_BOTH); $row=mysqli_fetch_array($record); print_r($row); echo...

0

PHP mysqli_fetch_array() Function

Program 1 <html> <body> <center> <pre> <?php $mycon=$mycon=mysqli_connect(“localhost”,”root”,””,”Library”) or die(“Connection not success”); $sql=”select * from studentdata”; $record=$mycon->query($sql); $n=mysqli_num_rows($record); //echo “Total Record: “.$n; echo “Using Array Function<br>”; //$row=mysqli_fetch_array($record,MYSQLI_ASSOC); // $row=mysqli_fetch_array($record,MYSQLI_NUM); // $row=mysqli_fetch_array($record,MYSQLI_BOTH); $row=mysqli_fetch_array($record); print_r($row); echo...

0

PHP mysqli fetch_row() Function

Program 1 <html> <body> <center> <pre> <?php $mycon=$mycon=mysqli_connect(“localhost”,”root”,””,”Library”) or die(“Connection not success”); //echo “Connection success”; $sql=”select * from studentdata”; $record=$mycon->query($sql); $n=mysqli_num_rows($record); //echo “Total Record: “.$n; echo “Row Function<br>”; $row=mysqli_fetch_row($record); //print_r($row); // echo $row[0].” “.$row[1].”...

0

PHP mysqli fetch_assoc() Function

Program 1 <html> <body> <center> <pre> <?php $mycon=$mycon=mysqli_connect(“localhost”,”root”,””,”Library”) or die(“Connection not success”); //echo “Connection success”; $sql=”select * from studentdata”; $record=$mycon->query($sql); $n=mysqli_num_rows($record); //echo “Total Record: “.$n; while($row=mysqli_fetch_row($record)) echo $row[‘sid’].” “.$row[‘sname’].” “.$row[‘phy’].” “.$row[‘chem’].” “.$row[‘math’]; echo “<br>”;...

0

Student Management System using PHP

Program 1 <?php include ‘FrontPage.php’?> <html> <body> <br><br><br><br><br><br><br><br><br><br> <center> <form method=post action=”StudentUpdate.php”> <table border=1> <tr> <th>Student Id For Update</th> <td><input type=text name=txtid></td> </tr> <tr> <td></td> <td><input type=submit value=Search name=btnSubmit></td> </tr> </table> </form> <pre> <?php...

0

How to Update Record in PHP GUI Application

Program 1 <?php include ‘FrontPage.php’?> <html> <body> <br><br><br><br><br><br><br><br><br><br> <center> <form method=post action=”StudentUpdate.php”> <table border=1> <tr> <th>Student Id For Update</th> <td><input type=text name=txtid></td> </tr> <tr> <td></td> <td><input type=submit value=Search name=btnSubmit></td> </tr> </table> </form> <pre> <?php...