{"id":42025,"date":"2023-03-01T10:00:56","date_gmt":"2023-03-01T04:30:56","guid":{"rendered":"https:\/\/www.aplustopper.com\/?p=42025"},"modified":"2023-03-02T09:39:54","modified_gmt":"2023-03-02T04:09:54","slug":"plus-two-computer-science-notes-chapter-10","status":"publish","type":"post","link":"https:\/\/www.aplustopper.com\/plus-two-computer-science-notes-chapter-10\/","title":{"rendered":"Plus Two Computer Science Notes Chapter 10 Server Side Scripting Using PHP"},"content":{"rendered":"
Overview of PHP (Formerly Personal Home Pages)<\/strong><\/p>\n PHP stands for PHP Hypertext Preprocessor. Normally, it runs on a web server.<\/p>\n Benefits of using PHP<\/span><\/p>\n Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client(browser) so it is impossible to view the source code.<\/p>\n Benefits of PHP are given below<\/p>\n Basics of PHP<\/span><\/p>\n A) Setting up the development environment<\/p>\n Step 1<\/p>\n Step 2<\/p>\n B) Writing and running the script<\/p>\n Take a note pad and type the code, PHP code should begin with <?php andend with ?>. Save this file in the root directory of the web server with extension php.<\/p>\n Step 1 Step 2 Step 3 C) Combining HTML and PHP D) Comments in PHP E) Output statements in PHP eg: <\/p>\n ii) var_dump() Eg:<\/p>\n Fundamentals of PHP<\/strong><\/p>\n Variables<\/span><\/p>\n A variable name starts with $ symbol followed by the name of the variable. There is no need to declare a variable before using it. PHP automatically determines the data type based upon the value stored in it. Rules for naming a variable in PHP<\/p>\n Data type<\/span><\/p>\n <\/p>\n A) Core data types B) Special data types<\/p>\n Operators in PHP<\/span><\/p>\n Operators are the symbols used to perform an operation b) Arithmetic operators c) Relational (Comparison) operators d) Logical operators Both operands must be true to get a true value in the case of && operation If $X=true and $Y=false then<\/p>\n Both operands must be true to get a true value in the case of \u2018and\u2019 operation If $X=true and $Y=false then<\/p>\n Either one of the operands must be true to get a true value in the case of || operation If $X=true and $Y=false then<\/p>\n Either one of the operands must be true to get a true value in the case of or operation If SX=true and $Y=false then<\/p>\n Either one of the operands must be true to get a true value in the case of xor operation If $X= true and $Y=false then<\/p>\n e) String addition operator(\u2018.\u2019, \u2018.=\u2019) f) Combined operators. g) Increment and decrement operators. 2) post increment (variable++) 3) pre decrement\u2014variable) 4) post decrement(variable\u2014) h) Escape sequences Control Structures in PHP<\/strong><\/p>\n In general the execution of the program is sequential, we can change the normal execution by using the control structures.<\/p>\n simple if<\/span><\/p>\n Syntax:<\/p>\n <\/p>\n <\/p>\n The first expression evaluated and selects the statements with matched case value.<\/p>\n Loops in PHP<\/span><\/p>\n a) while loop b) do-while loop * for loop continue and break in loops Continue is used to skip one iteration and continue the loop with next value. But break is used to terminate the execution of the current control structure such as for, for each, while, do while or switch.<\/p>\n Arrays in PHP<\/strong><\/p>\n In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non negative integers or strings as keys.<\/p>\n Different types of arrays in PHP<\/p>\n Indexed arrays-: The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHPthe function arrayO is used to create an array. The function print_r can be used for printing an array. Eg: Associative arrays<\/span><\/p>\n Arrays with named keys and string indices are called associative jarrays. Eg: for each loops (Extension of for loop)<\/span><\/p>\n The number of elements in an array is not known in advance foreach loop is used. Two types<\/p>\n 1) for ($array_variable_name as $value) b) foreach($array_variable_name as key=> $value) FunctionsinPHP<\/strong><\/p>\n Two types user defined and built in functions.<\/p>\n User-defined functions<\/span><\/p>\n The key word function is used to declare a function in PHP. Built-in functions<\/span><\/p>\n a) Date() -:Returns date and time. <\/p>\n b) String functions<\/p>\n Three tier architecture in PHP<\/strong><\/p>\n Tier 1 (Front end Tool): Browser\/ Client uses HTML or HTML embedded with JavaScript. PHP forms<\/strong><\/p>\n This is used to collect information from the client and send it to the Web Server by pressing the submit button. The server receives the data and collects the appropriate data from the data base and send it back as a response.<\/p>\n PHP global variables<\/span><\/p>\n A variable declared as global then it can be accessed from any where in the program.<\/p>\n A) PHP$GLOBALS B) PHP $_SERVER C) PHP $_REQUEST D) PHP $_POST E) PHP S_GET GET and POST comparison<\/span><\/p>\n The difference between GET and POST method is given below.<\/p>\n Connecting PHP to database(MySQL)<\/strong><\/p>\n Establishing connection to MySQL database<\/span><\/p>\n To access data from the data base, the PHP program first establish a connection to the data base server(MySQL) and then specify the data base to use.Consider the following<\/p>\n Step 1 Note : In the above specify the password you given in MVSQL installation<\/span><\/em>.<\/p>\n The out put is as given below. Step 2 Eg: Step 3 a) Execute the SQL query on the data base using the function mysql_query() b) Insert a row using the function mysql_fetch_array() Example 1 : Write SQL statements for the creation of the table and the following requirements.<\/p>\n Step 1. a) Insert data into the fields(min 3 records) b) Display the details of all students. Step 2: Step 3. Step 4. Example 2<\/p>\n Step 1. Step 2 Step 3. Creating a new table using PHP<\/span><\/p>\n It is possible to create a new table using PHP. Eg: Inserting data into a table using PHP<\/span><\/p>\n It is also possible to insert values in to a table using PHP program<\/p>\n Syntax: Ex: Step 2. Step 3. Updating data in a table using PHP<\/span><\/p>\n It is also possible to change or update values in a row by using PHP. Ex: Step 1. Kerala Plus Two Computer Science Notes Chapter 10 Server Side Scripting Using PHP Overview of PHP (Formerly Personal Home Pages) PHP stands for PHP Hypertext Preprocessor. Normally, it runs on a web server. Benefits of using PHP Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source […]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[42728],"tags":[],"yoast_head":"\n\n
\n
\n
\nAfter installing the web server type http:\/\/localhost in the address bar the following screen will be available.
\n<\/li>\n<\/ul>\n
\nTake a notepad and type (he following and save it as first.php on C:\\Abyss Web ServeAhtdocs.
\n<?php
\nechO\u201dMy first PHP web page\u201d;
\n?><\/p>\n
\nStart the web server if it is off<\/p>\n
\nType as \u201chttp:\/\/localhost\/firstphp\u201d in the address bar.
\n<\/p>\n
\nBoth are closely related. We can write PHP code in between HTML code using <?php and ?>.
\nEg:
\n<\/p>\n
\nWe can make some text as a comment i.e. not as part of the program Single line(\/\/) and multi line (starts with \/* and ends with *\/)<\/p>\n<HTML>\r\n<HEAD>\r\n<TITLE>\r\nMy first php page <\/TITLE>\r\n<\/HEAD>\r\n<BODY>\r\n<?php\r\n\/* This program is used to display a message \u201cWelcome to php\u201d *\/ echo \u201c<H2>Welcome to php<\/H2>\u201d; \/\/shows a message?>\r\n<\/BOD Y>\r\n<\/HTML><\/pre>\n
\ni) echo and print are used to display all types of data but echo is used to produce multiple outputs. Parenthesis is optional,<\/p>\n
\necho \u201c first output\u201d, \u201csecond output\u201d;
\nor
\necho (\u201c first output\u201d, \u201csecond output\u201d);
\nprint \u201conly one output\u201d;
\nor
\nprint (\u201conly one output\u201d);
\nThe difference between echo and print<\/p>\n\n\n
\n Echo<\/td>\n Print<\/td>\n<\/tr>\n \n Take more than one parameter<\/td>\n Only one parameter<\/td>\n<\/tr>\n \n Does not return any value<\/td>\n Returns TRUE or l on successful print and FALSE otherwise<\/td>\n<\/tr>\n \n Faster<\/td>\n slower<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nThis is used to display both data type and value of variables.
\nSyntax: var_dumpl(variablel, vanable2,etc…);<\/p>\n
\n<\/p>\n
\nSyntax: $variable_name=value;<\/p>\n\n
\nInteger, Float\/ Double and String, these data types are similar data types of C++. The size of integer or float is depending upon the OS.<\/p>\n\n
\nEg: 8172, -22, etc.<\/li>\n
\nEg: 81.72, 7E-1 0(7 * 1010<\/sup> \u2014Mantissa and Exponent method), 123E1 2(123*1012<\/sup>)<\/li>\n
\nEg: values are yes\/no, on\/off, 1\/0, true\/false
\n<?php
\nSx=false; Il assign the value FALSE to $x.
\n$y=1; \/\/assign the value TRUE to $y.<\/li>\n<\/ul>\n\n
\n$rn=null;<\/li>\n
\nThree types of array
\nIndexed array-:
\nAssociated array-:
\nMulti dimensional array-:<\/li>\n
\na) Assignment operator(=)
\nThe value of RHS is assigned to LHS variable. If $a=10 and $b=3 then $a=$b. This statement sets the value of $a and $b are same ,i.e. it sets a to 3.<\/p>\n
\nIt is a binary operator. It is used to perform addition (+), subtraction(-), division(\/), multiplication(*) ,modulus(%-givesthe remainder).
\nEg. If $x=10 and $y=3then<\/p>\n\n\n
\n $x+$y<\/td>\n $x-$y<\/td>\n $x*$y<\/td>\n $x\/$y<\/td>\n $x%$y<\/td>\n<\/tr>\n \n 13<\/td>\n 7<\/td>\n 30<\/td>\n 3.333<\/td>\n 1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nIt is used to perform comparison or relational operation between two values and returns either true or false.
\nEg: If $X=10and $Y=3then<\/p>\n\n\n
\n $X<$Y<\/td>\n $X<=$Y<\/td>\n $X>$Y<\/td>\n $X>=$Y<\/td>\n $X>==$Y<\/td>\n $X!=$Y<\/td>\n<\/tr>\n \n false<\/td>\n false<\/td>\n true<\/td>\n true<\/td>\n false<\/td>\n true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nHere (and , &&), (or, ||), xorare binary operators and not(!) is a unary operator. It is used to combine relational operations and it gives either true or false
\nIf $X=true and $Y=false then<\/p>\n\n\n
\n $x && $x<\/td>\n $X && $Y<\/td>\n $Y && $X<\/td>\n $Y &&$Y<\/td>\n<\/tr>\n \n true<\/td>\n false<\/td>\n False<\/td>\n false<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n\n
\n $X and $X<\/td>\n $X and $Y<\/td>\n $Y and $X<\/td>\n $Y and $Y<\/td>\n<\/tr>\n \n true<\/td>\n false<\/td>\n False<\/td>\n false<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n\n
\n $X || $X<\/td>\n $X || $Y<\/td>\n SY || $X<\/td>\n $Y || $Y<\/td>\n<\/tr>\n \n true<\/td>\n true<\/td>\n true<\/td>\n false<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n\n
\n $X or $X<\/td>\n $X or $Y<\/td>\n $Y or $X<\/td>\n $Y or $Y<\/td>\n<\/tr>\n \n true<\/td>\n true<\/td>\n true<\/td>\n false<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n\n
\n $X xor $X<\/td>\n $X xor $Y<\/td>\n $Y xor $X<\/td>\n $Y xor $Y<\/td>\n<\/tr>\n \n true<\/td>\n true<\/td>\n true<\/td>\n false<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n\n
\n l$X<\/td>\n !$Y<\/td>\n<\/tr>\n \n false<\/td>\n true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nThis is also called concatenation operator. It joins(concatenates) two strings and forms a string.
\nThey are and \u2018.=\u2019.
\nEg:
\n$x= \u201cBVM HSS
\n$y= \u201c Kalparamba\u201d;
\n$z=$x.$y;<\/p>\n\n
\n$x.=$y;<\/li>\n
\nIt is also called short hands
\nIf $X=1O and $Y= 3 then<\/p>\n\n\n
\n Arithmetic Assignment Expression<\/td>\n Equivalent Arithmetic Expression<\/td>\n The value of $X becomes<\/td>\n<\/tr>\n \n $X+=$Y<\/td>\n $X=$X+$Y<\/td>\n 13<\/td>\n<\/tr>\n \n $X-=$Y<\/td>\n $X=$X-$Y<\/td>\n 7<\/td>\n<\/tr>\n \n $X*=$Y<\/td>\n $X=$X*$Y<\/td>\n 30<\/td>\n<\/tr>\n \n $X\/=$Y<\/td>\n $X=$X\/$Y<\/td>\n 3.333<\/td>\n<\/tr>\n \n $X%=$Y<\/td>\n $X=$X%$Y<\/td>\n 1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\n1) pre increment (++variable)
\nEg:
\nlf$x=10then
\necho(++$x); -> It prints 10+1=11<\/p>\n
\nlf $x=10then
\necho($x++); -> It prints 10 itself.<\/p>\n
\nlf $x=10then
\necho(\u2014$x); It prints 10-1=9<\/p>\n
\nlf $x=10then
\necho($x\u2014);-> It prints 10 itself.<\/p>\n
\nIt Is a character preceded by a back slash(\\)<\/p>\n\n\n
\n Operator<\/td>\n Definition<\/td>\n Example<\/td>\n Output<\/td>\n<\/tr>\n \n \\\u201c<\/td>\n To print”<\/td>\n echo TPHPr<\/td>\n \u201cPHP\u2019<\/td>\n<\/tr>\n \n \\’<\/td>\n To print1<\/sup><\/td>\n echo\u201dX\\ian\u201d<\/td>\n X\u2019ian<\/td>\n<\/tr>\n \n \\n<\/td>\n New line<\/td>\n echo \u201cBVM \\nHSS”<\/td>\n BVM HSS<\/td>\n<\/tr>\n \n \\t<\/td>\n To print tab<\/td>\n echo\u201dBVM\\tHSS\u201d<\/td>\n BVM HSS<\/td>\n<\/tr>\n \n \\r<\/td>\n Print carriage return<\/td>\n <\/td>\n <\/td>\n<\/tr>\n \n \\$<\/td>\n To prints<\/td>\n echo”100\\$\u201d<\/td>\n 100$<\/td>\n<\/tr>\n \n \\\\<\/td>\n To print \\<\/td>\n echo\u201d\\\\n is used as newline”<\/td>\n \\n is used as new line<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nIt is an entry controlled loop The syntax is given below
\nLoop variable initialised
\nwhile(expression)<\/p>\n{\r\nBody of the loop;\r\nUpdate loop variable;\r\n}<\/pre>\n
\nThis loop will execute at least once. The body of the loop will be executed until the expression becomes false,<\/p>\ndo\r\n{\r\nBody of the loop;\r\nUpdate loop variable;\r\n}while(expression);<\/pre>\n
\nThe syntax of for loop is given below For(initialisation; testing; updation)<\/p>\n{\r\nBody of the for loop;\r\n}<\/pre>\n
\n
\nSyntax: $array_name=array(value1 ,value2, );
\nOR
\n$array_variable[key]=value;
\nEg:$mark=array(60,70,80);
\n$course=amay(\u201cScience\u201d,”Commence”,”Humanities\u2019);
\nOR
\n$mark[0]=60;
\n$mark[1]=70;
\n$mark[2]=80;
\n$course=\u201dScience\u201d;
\n$course=\u201dCommerce\u201d;
\n$course=\u201dHumanities\u201d;
\nEg:
\n<!DOCTYPE HTML>
\n<html lang=\u201deii\u201d>
\n<head>
\n<title>
\nWe are learning PHP
\n<\/title>
\n<\/head>
\n<body bgcoior=\u201dcyan\u201d>
\n<?php
\n$course=amay(\u201cScience\u201d, \u201cCommerce\u201d,”Humanities\u2019);
\nfor($i=0;$i<3;$i++)
\necho $course[$i].\u201d,\u201d;
\n?>
\n<\/body>
\n<\/html>
\n<\/p>\n
\nSyntax: print_r(array_name);<\/p>\n
\n<\/p>\n
\nSyntax: $varibale_name=array(key1=>value1, key2=>value2,etc);<\/p>\n
\n
\n<\/p>\n
\nNo need to specify the starting inde and ending index, the array pointer is moved one by one.
\n
\n<\/p>\n
\nHere the value of the current array element is assigned to $value and the key is assigned to $key.
\n
\n<\/p>\n
\n
\n
\n<\/p>\n
\nSyntax: date(format[, timestamp]);<\/p>\n\n\n
\n Format<\/td>\n Purpose<\/td>\n<\/tr>\n \n d<\/td>\n day of the month(0-31)<\/td>\n<\/tr>\n \n m<\/td>\n month(1-12)<\/td>\n<\/tr>\n \n Y<\/td>\n year<\/td>\n<\/tr>\n \n I<\/td>\n day of the week(Eg.Monday)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n
\n<\/p>\n
\nTier 2 (Middle end Tool)- Web Server(Apache \/Microsoft IIS)
\nTier 3 (Back end Tool)-Database(MySQL\/Oracle) This means end user uses Browser(Tier 1) and send requests to the Web Server(Tier 2). The Web Server retrieves data from the Data Base(Tier 3). For this activities user interface, application programs, data storage etc are separated into layers(Tiers)<\/p>\n\n
\n\n
\n Superglobal<\/td>\n Purpose<\/td>\n<\/tr>\n \n SGLOBALS<\/td>\n Global scope variables available. .<\/td>\n<\/tr>\n \n $_SERVER<\/td>\n Information about the server<\/td>\n<\/tr>\n \n $_GET<\/td>\n Data passed using the HTTP GET method<\/td>\n<\/tr>\n \n $_POST<\/td>\n Data passed using the HTTP POST method<\/td>\n<\/tr>\n \n $_REQUEST<\/td>\n Data passed via HTTP request<\/td>\n<\/tr>\n \n $_FILES<\/td>\n Data passed by an HTML file input<\/td>\n<\/tr>\n \n $_SESSION<\/td>\n Current session data specific to the user<\/td>\n<\/tr>\n \n $_COOKIE<\/td>\n Data stored on the browser.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nPHP stores all global variables in an arr\u00e4y calied $GLOBALS[index].
\nIndex is the name of the variable.
\n
\n
\n<\/p>\n
\nThis returns the paths and script locations.<\/p>\n\n\n
\n Code<\/td>\n Description<\/td>\n<\/tr>\n \n $_SERVER [\u2018PHP_SELF]<\/td>\n Returns the currently executing file name<\/td>\n<\/tr>\n \n $_SERVER [\u2018SERVER_NAME’]<\/td>\n Returns the host server name<\/td>\n<\/tr>\n \n $_SERVER [‘SCRIPT_NAME’]<\/td>\n same as $_SERVER[\u2018PHP_SELF\u2019]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\n<\/p>\n
\nWhen a user click a submit button, $_REQUEST gathers all data. $_REQUEST is an array that contains $_GET, $_POST and $_cookie superglobals.<\/p>\n
\nWhen the user presses the submit button and the method=post then the data is passed to the server and we can access the data by using the variable $_POST[\u2018variable name\u2019];<\/p>\n
\nWhen the user presses the submit button and the method=get then the data is passed to the se\u00d1er and we can access the data by using the variable $_GET[\u2019vanable namel;<\/p>\n\n\n
\n Get method<\/td>\n Post method<\/td>\n<\/tr>\n \n 1. Faster<\/td>\n 1. Slower<\/td>\n<\/tr>\n \n 2. To send small volume of data.<\/td>\n 2. To send large volume of data<\/td>\n<\/tr>\n \n 3. Up to 2000 characters<\/td>\n 3. No limit<\/td>\n<\/tr>\n \n 4. Less secure<\/td>\n 4. More secure<\/td>\n<\/tr>\n \n 5. Data visible during submission<\/td>\n 5. Data not visible during submission<\/td>\n<\/tr>\n \n 6. Page link can be book marked<\/td>\n 6. Page link can never be book marked.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n
\nOpen a connection to MySQL
\nFor this rnysql_connect function is used. A link identifier is returned when connected successfully otherwise a NULL value.
\n
\necho connected Successfully\u2019;
\nmysql_dose($dbhandle);
\n?><\/p>\n
\n<\/p>\n
\nSpecify the data base you want to open
\nMySQL server may contain many data bases. mysql_select_db() is a function used to select particular data base. It return true if it finds the data base otherwise false.
\nSyntax: mysql_select_db($database);<\/p>\n
\n
\n<\/p>\n
\nReading data from data base
\nTwo steps<\/p>\n
\nSyntax:
\n$result_set=mysql_query(query,connection);<\/p>\n
\nSresult_set=mysql_query(query, connection);
\n$fetched_row=mysql_fetch_array($result_set);<\/p>\n
\nLet us do the following program The structure of a table is given to store the details of marks scored by students in an exam<\/p>\n\n\n
\n Data<\/td>\n Type<\/td>\n Description<\/td>\n<\/tr>\n \n RegNo<\/td>\n Numeric<\/td>\n Unique<\/td>\n<\/tr>\n \n name<\/td>\n char<\/td>\n upto 30 characters<\/td>\n<\/tr>\n \n course<\/td>\n char<\/td>\n <\/td>\n<\/tr>\n \n marks of 6 subjects<\/td>\n numeric<\/td>\n six separate columns<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nFor this take MySQL and do the following
\n<\/p>\n
\n<\/p>\n
\n<\/p>\n
\nTake a notepad and type the following then save it asform1.html<\/p>\n<html>\r\n<body>\r\n<form method-\u2019post\u201d action=\u201ddbsample3.php\u201d>\r\n<center>RegisterNo:\r\n<inputtype=\u201dtext\u201d name=\u201dregno\u201d><br>\r\n<input type=\u201dsubmit\u201d value=\u201dShow Result\u201d>\r\n<\/center>\r\n<\/form>\r\n<\/body>\r\n<\/html><\/pre>\n
\nTake another notepad then type the following and save itasdbsampleS.php
\n
\n
\n<\/p>\n
\nRun the file forml .html and do the following
\n<\/p>\n
\nTake a notepad and type the following. Save it as form2.html.
\n<\/p>\n
\nTake another notepad then type the following and save it as dbsample4.php
\n
\n
\n<\/p>\n
\nRun the file form2.html and do the following
\n<\/p>\n
\nSyntax: $SQL=\u201dcreate table <table name> (column_name1 data type constraint,etc)\u201d; $select_query=mysql_query($SQL);<\/p>\n
\n
\n
\n<\/p>\n
\n$SQL=\u201dinsert into <table name> values (valuel, value2,…);
\n$select_query=mysql_query($SQL);<\/p>\n
\nStep 1.
\nTake a notepad .then type the following and save it asform3.html
\n<html>
\n<body>
\n<form method-\u2019post\u201d action-\u2019table2.php\u201d>
\n<\/p>\n
\nTake another notepad and type the following then save it as table2.php.
\n<\/p>\n
\nRun the file form3.html and do the following
\n
\n<\/p>\n
\n$SQL=\u201dUpdate ctable_name> set ccolumn_name>= new_value where condition.
\n$select_query=mysql_query($SQL);<\/p>\n
\nIf you want to change the amount deposited by Jose from 2000 to 3000. Do the following.<\/p>\n
\nTake a notepad, then type the following and save it asform3.html
\n
\n<\/p>\nPlus Two Computer Science Notes<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"