Data Retrieve from HTML Select Box and Print into PHP

Simple but tricky. without ajax or Jquery or JavaScript, you can simply get onchange html select box data into your php and can do great things easily. Step-1: make a html form into a php page. select.php <form method=”POST”> <select name=”selectBox” id=”selectBox” onchange=”this.form.submit()”> <option value=””>Select...

Retrieve data using Procedure in Oracle

Step-1:  Create table CREATE TABLE student ( USER_ID NUMBER (5) NOT NULL, USERNAME VARCHAR2 (20) NOT NULL, PRIMARY KEY ( USER_ID ) ) Step-2: Create Procedure CREATE OR REPLACE PROCEDURE getStudentByUserId( p_userid IN STUDENT.USER_ID%TYPE, p_username OUT STUDENT.USERNAME%TYPE) IS BEGIN SELECT USERNAME INTO p_username from STUDENT...

JavaScript Problem-2

Questions: Write an HTML document to find X to power n where value of x and n taken from user? Ans. The solution of above question is as follows: var x=prompt(“Enter value of X: “,””); var n=prompt(“Enter value of n: “,””); var result=Math.pow(x,n); document.write(result); Happy...

Print Array Elements Using HTML Table

Here is the Solution of how to print array element in HTML table. HTML Code: <p id=”demo”></p> JavaScript Code: var fruits, text, fLen, i; fruits = [“Banana”, “Orange”, “Apple”, “Mango”]; fLen = fruits.length; text = “<table border=’1′><tr><th>Index</th><th>Data</th></tr>”; for (i = 0; i < fLen; i++)...

Simple Exam Grading System

This is very simple grading system based on single subject marks. var mark=60 if(mark>60) { document.write(“pass”); } else{ document.write(“Fail”) } */ var mark=prompt(“Enter Mark”); if(mark>100) { document.write(“Invalid”); } else if(mark>90) { document.write(“A”); } else if(mark>80) { document.write(“B”); } else if(mark>70) { document.write(“C”); } else if(mark>60)...