vinay Archive

How to Create Dynamic text box Using PHP?

Index.php <html> <head> <title>php example</title> </head> <body> <form name=“frm” action=“Quantity.php” method=“post”> Enter No of Item<input name=“no_of_item” type=“text”><br> <input name=“btn” type=“submit” value=“submit”> </form> </body> </html>   Quantity.php <html> <head>
Read More

How to Search Student Result through Array?

<?php $message_array=array(“Roll No”,”Name”,”Math”,”Enlish”,”Hindi”,”Science”,”Computer”); $result[0]=array(1001,”Ashok”,64,8,84,56,34); $result[1]=array(1002,”Sanjay”,44,75,39,56,34); $result[2]=array(1003,”Vinod”,84,78,49,56,35); ?> <html> <head> <title>Find Result through Array</title> </head> <body> <form name=”frm” action=”” method=”post”> Enter the number <input name=”roll_no” type=”text” /><br> <input name=”button”
Read More

How to Searching data in an Array?

<?php if(isset($_POST[‘btnsubmit’])) { $found=’no’; $data=array(23,56,67,78,29); $num=$_POST[‘num’]; foreach($data as $value) { if($value==$num) { $found=’yes’; break; } } if($found==’yes’) echo “Value Found”; else echo “Value not Found”; } ?> <html>
Read More

How to Select Letter from dropdown and print array element?

<?php if(isset($_POST[‘btnsubmit’])) { $a_name=array(“Amit”,“Anil”,“Ajay”,“Atul”); $b_name=array(“Benu”,“Brijesh”,“Bipul”); $c_name=array(“Charu”,“Chadan”,“Chandu”); if($_POST[“personname”]==‘A’) foreach($a_name as $value) echo $value.“<br>”; if($_POST[“personname”]==‘B’) foreach($b_name as $value) echo $value.“<br>”; if($_POST[“personname”]==‘C’) foreach($c_name as $value) echo $value.“<br>”; } ?> <html> <head>
Read More