More about PHP (with some Python references) HTML forms (lots of repetition if needed?) GET and POST Session variables

Size: px
Start display at page:

Download "More about PHP (with some Python references) HTML forms (lots of repetition if needed?) GET and POST Session variables"

Transcription

1 More about PHP (with some Python references) HTML forms (lots of repetition if needed?) GET and POST Session variables

2 PHP classes and include Using classes are rather simple and works as in Java, C#, C++ etc. Include your include files (files with shared code) with the include or include_once statement # my gps.php file <?php # Include class file or any other php file include_once "position.php";?> # local lat and long $lat = ''; $lng = ''; # create the position object $pos = new Position(" ", " "); # if we have public members we can do like this $lat = $pos->latitude; $lng = $pos->longitude; # do something with the local variables $lat = $lat - 0.1; $lng = $lng + 0.1; # if the members have been private we need a set method $pos->setposition($lat, $lng); # if the members have been private we need get methods $lat = $pos->getlatitude(); $lng = $pos->getlongitude(); #... # file position.php <?php class Position { #var string public $latitude; public $longitude;?> function construct($latitude="", $longitude=""){ if(!empty($latitude)) $this->latitude($latitude); if(!empty($longitude)) $this->longitude($longitude); public function setposition($latitude="", $longitude="") { if(!empty($latitude)) $this->latitude($latitude); if(!empty($longitude)) $this->longitude($longitude); public function getlatitude() { return $this->latitude; public function getlongitude() { return $this->longitude;

3 The local function scope Unlike JavaScript and most other program languages global scope defined variables are not seen inside local functions <?php include "utils.php"; $a = 1; // global scope $b = 2; // global scope /* Global scope variables as the $a and $b variables and similar variables and functions in the included utils.php will be available within the local script file. However, within user-defined functions a local function scope is introduced. Any variable used inside a function is by default limited to the local function scope. */ function test() { echo $a; /* reference to local scope variable which is undefined */ test(); // will not produce any output! Since local $a is undefined it will raise an exception /* In PHP global variables must be declared global inside a function if they are going to be used in that function. Otherwise use the $GLOBALS array or send/return variables to/from the function */ function sum() { global $a, $b; // equivalent to $b = $a + $b; // using: $GLOBALS['b'] = $GLOBALS['a'] + $GLOBALS['b']; sum(); echo $b; // will output 3?> // receiving function parameters function sum($a, $b){ return $a + $b; //returning the result echo sum($a, $b); // sending function arguments

4 Debug variables Syntax errors A syntax error in a PHP file will normally prevent the entire program from running, Parse error: in xyz on line # Usually turned off to prevent clues about the application Coding errors Your best friend is the echo statement or functions as var_dump() and print_r() Configure server debugging and get it working Dumping local variables <?php echo "<html><body>"; # debug example print_r($room) "<br>"; echo "<br>"; echo "XYZ: ". $room[1], "<br>"; exit(); $rooms[1] = "ABC"; $rooms[2] = "DEF"; $rooms[3] = "GHI"; echo "<pre>"; var_dump($rooms); echo "</pre>";?> echo "</body></html>";

5 HTML Forms 1 Forms are user interfaces for data input Main application - to provide user input for Programs and databases located on a web server Local (client-side) scripts associated with the form Server-based scripts/programs may return data to the client as a web page Client-side scripts can read input data To validate the data, prior to sending to server To use in local processing which may output web page content that is displayed on the client Examples Questionnaires to provide feedback on a web site E-commerce, to enter name, address, details of purchase and credit-card number Run a database query and receive results

6 HTML Forms 2 There are two ways of sending information into a server script (PHP, Python, ASP.NET, etc.) One is to use parameters on the URL, and retrieve them with $_GET in PHP (in the form you set: method= get ) Can also be done via REST (hyperlinks), but the form create the URL with parameters in this case The other method, which is more powerful and secure is to use a form with $_POST in PHP (in the form you set: method= post ) The data goes within the HTTP message body (not visible on the browsers address field) To see (debug) what you send, set: method= get or view the form data params in the web developers network tab (F12) There is a variety of form field types that you can use, depending on the type of information that you're requesting from a visitor

7 A form consists of two main components First, one or more input fields into which the visitor types or clicks the information you have requested Second, a "submit" button which, when clicked, sends the contents of the form to a server-side program for processing in whatever way it wishes HTML Forms 3

8 Example form (post) Having designed a form, there are 3 more things you need to do before it's ready for use Ensure that each form object is named properly Add an "action" to the <form> tag which is the server program that processes the data Write some server side code to handle the submitted forms When the site visitor presses the Submit button, the contents of the form will be sent to a server script/program as a series of variables (with values if they are used in the form) The sent variable names will be the name= parameters that you have assigned to the objects in the form <form method="post" action="breakfast.php"> <label>name: </label> <input type="text" name="tb_name" size="40" /> <label>bacon: </label> <input type="checkbox" name="cb_bacon" value="y" /> <label>boiled: </label> <input checked type="radio" name="rb_eggs" value="f" /> <label>order your breakfast?</label> <input type="submit" value="submit" /> </form>

9 The HTTP protocol TCP/IP based request/response protocol HTTP requests (known as methods) GET (retrive/select) or POST (create/insert) HTTP response In all cases a resonse code will be returned HTTP message Request/response line - the http method/status Header variables - request metadata Message body - content of message

10

11 GET and POST difference? The difference between METHOD="GET" (the default) and METHOD="POST" is primarily defined in terms of form data encoding The official recommendations say that "GET" should be used if and only if the form processing is idempotent, which typically means a pure query form (we do not change the back end data). Generally it is advisable to do so There are, however, problems related to long URLs and non-ascii character repertoires which can make it necessary to use "POST" even for idempotent processing The HTML specifications technically define the difference between "GET" and "POST" so that former means that form data is to be encoded (by a browser) into a URL while the latter means that the form data is to appear within a message body But the specifications also give the usage recommendation that the "GET" method should be used when the form processing is "idempotent", and in those cases only As a simplification, we might say that "GET" is basically for just getting (retrieving) data whereas "POST" may involve anything, like storing or updating data, ordering a product or sending

12 Debug globals and server variables In additon to the print_r() array function we can use the $_SERVER with var_dump() Dumps out a tremendous amout of variables To long to list here Other useful examples get_defined_vars() # dump server variables echo "<pre>"; var_dump($_server); echo "</pre>"; # get_defined_vars() # dump global variables # and all other possible # variables the the program # knows about echo "<pre>"; var_dump(get_defined_vars()); echo "</pre>"; echo "<pre>"; echo $_SERVER["REQUEST_URI"]; echo "</pre>"; ["REQUEST_URI"]=> string(16) "/myhome/test.php" # not alls web servers pass this variable on if (isset($_server["http_referer"])) { echo "You came from ", $_SERVER["HTTP_REFERER"];

13 Debug POST form input 1 Using get_defined_vars() - showing the empty() vs. isset() function <form action="next.php" method="post"> <table> <tr> <td>paul</td> <td>attuck</td> <td>paulattuck@yahoo.com</td> <td><input checked type="checkbox" name="cb_1" value="paulattuck@yahoo.com" /></td> </tr> <tr> <td>james</td> <td>bond</td> <td>jamesbond@yahoo.com</td> <td><input type="checkbox" name="cb_2" value="jamesbond@yahoo.com" /></td> </tr> <tr> <td>name</td> <td>last</td> <td>lastname@yahoo.com</td> <td><input type="checkbox" name="cb_3" value="lastname@yahoo.com" /></td> </tr> </table> <input type="submit" name="submit" value="submit" /> </form>

14 Debug POST form input 2 Using get_defined_vars() - showing the empty() vs. isset() function <?php echo "<pre>"; var_dump(get_defined_vars()); echo "</pre>"; for($i=1; $i <=3; $i++) { $var = $_POST["cb_{$i"]; //$var = FALSE; //$var = 0; # empty Determine whether a variable is empty # A variable is considered empty if it does # not exist or if its value equals FALSE // Evaluates to true if $var is empty if (empty($var)) { echo 'empty(): $var is either 0, empty, or not set at all <br>';?> // Evaluates as true if $var is set in any way if (isset($var)) { echo 'isset(): $var is set <br>';

15 HTML Forms Galore For reference to all forms inputs and attributes see slide in the SP- IA_03_html-basics2.pdf presentation Do we need to repeat something particular about the forms subject?

16 Example included in lab 4 HTML Forms and result

17 breakfast.php <?php echo "<link href='style2.css' rel='stylesheet'>"; # in <head> function checkbox_value($name) { return (isset($_post[$name])? 1 : 0); if(!empty($_post["tb_name"])) $name = $_POST["tb_name"]; # Diner's name else { echo "Must give Diner's name"; die(); $name_san = preg_replace("/[^a-za-z]/", "", $name); if(checkbox_value("cb_eggs")) $cb_eggs = $_POST["cb_eggs"]; else $cb_eggs = "N"; # Will be Y if user wants eggs # omitted for brevity $eggs_style = $_POST["rb_eggs"]; # Will be F, P or S echo "<p>" # omitted for brevity if ($cb_eggs == "Y") { if ($eggs_style == "F") { echo "Fried eggs<br><br>"; if ($eggs_style == "P") { echo "Poached eggs<br><br>"; if ($eggs_style == "S") { echo "Scrambled eggs<br><br>"; echo "</p>";?>

18 Forms checkbox Works as expected <html> <body> <form action="checkbox.py" method="post" target="_blank"> <input type="checkbox" name="maths" value="on" /> Maths <input type="checkbox" name="physics" value="on" /> Physics <input type="submit" value="select Subject" /> </form> </body> </html>> #!"\dev\python37\python.exe" # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.fieldstorage() # Get data from fields if form.getvalue('maths'): math_flag = "ON" else: math_flag = "OFF" if form.getvalue('physics'): physics_flag = "ON" else: physics_flag = "OFF" print("content-type: text/html;charset=utf-8;\n\n") print() print("<html><head>") print("<title>checkbox CGI Program</title>") print("</head><body>") print("<h2> CheckBox Maths is : %s</h2>" % math_flag) print("<h2> CheckBox Physics is : %s</h2>" % physics_flag) print("</body></html>")

19 Radio, dropdown, textarea <html><body> <p>select a Subject </p> <form action="radiobtn_dropdwn_textarea.py" method="post" target="_blank"> <input type="radio" name="subject" value="mechanics" /> Mechanics <input type="radio" name="subject" value="astronomy" /> Astronomy <p>select a Course</p> <select name="dropdown"> <option value="maths" selected>maths</option> <option value="physics">physics</option> </select> <p>text area</p> <textarea name="textcontent" cols ="40" rows="4"> Type your text here... </textarea> <input type="submit" value ="Submit" /> </form> </body></html> #!"\dev\python37\python.exe" import cgi, cgitb form = cgi.fieldstorage() if form.getvalue('subject'): subject = form.getvalue('subject') else: subject = "Not set" if form.getvalue('textcontent'): text_content = form.getvalue('textcontent') else: text_content = "Not entered" if form.getvalue('dropdown'): course = form.getvalue('dropdown') else: course = "Not entered" print("content-type: text/html;charset=utf-8;\n\n") print() print("<html><head>") print("<title>radio, Dropdown, Textarea CGI Program</title>") print("</head><body>") print("<h2> Selected Subject is: %s</h2>" % subject) print("<h2> Selected Course is: %s</h2>" % course) print("<h2> Entered Text Content is: %s" % text_content) print("</body></html>")

20 Populate a form from DB Here's the code we originally used in form.html to create the menu: Eggs <input type="checkbox" name="cb_eggs" value="y" /> Bacon <input type="checkbox" name="cb_bacon" value="y" /> Sausages <input type="checkbox" name="cb_sausages" value="y" /> Beans <input type="checkbox" name="cb_beans" value="y" /> And here's a PHP file version of it, based on an array of items that we have read from the database <?php for ($i = 0; $i < count($items); $i++) { echo $items[$i]; echo "<input type='checkbox' name='cb_"; echo $items[$i]. "' value='y' /> <br />"; # The ' is the same as \" and can be used inside strings for ($i = 0; $i < count($items); $i++) { echo $items[$i]; echo "<input type=\"checkbox\" name=\"cb_" ; echo $items[$i]. "\" value=\"y\" /> <br />"; # or a third option using string/variable interpolation which maybe is the best solution for ($i = 0; $i < count($items); $i++) { echo $items[$i]; echo "<input type='checkbox' name='cb_{$items[$i]' value='y' /> <br />";?> For an array called $items[] that contains values of "eggs", "bacon", "sausages" and "beans", the code above will produce: eggs<input type='checkbox' name='cb_eggs' value='y' /> bacon<input type='checkbox' name='cb_bacon' value='y' /> sausages<input type="checkbox" name="cb_sausages" value="y" /> beans<input type="checkbox" name="cb_beans" value="y" />

21 Retrieving Textarea and Dropdown Data A textarea's content is retrieved in the same way as a textbox the same goes for the dropdown box etc. Use $_POST["ab_xyz"], where ab_xyz is the name of the textarea, dropdown etc. as defined in the form CR (\r) and LF (\n) can be removed with preg_replace() Another option that you may find useful is a select with values $_POST[] will return 1, 2, 3 or 4 respectively instead of Spring, Summer,... which could be an advantage <form method="post" action="script.php"> <textarea name="ta_comments" rows="4" cols="20"></textarea> <select name="dd_season"> <option>spring</option> <option>summer</option> <option>autumn</option> <option>winter</option> </select> </form> <select name="dd_season"> <option value="1">spring</option> <option value="2">summer</option> <option value="3">autumn</option> <option value="4">winter</option> </select>

22 Checkbox arrays When you're creating HTML forms, you'll often find yourself creating a large set of checkboxes. We can use the auto increment feature for arrays in PHP The $rooms array will contain only those checkboxes that were ticked If the visitor ticks boxes 2 and 4, the $rooms array will contain 2 elements (numbered 0 and 1) with values 2 and 4 respectively Room 1 <input type="checkbox" name="rooms[]" value="1" /> <br> Room 2 <input type="checkbox" name="rooms[]" value="2" /> <br> Room 3 <input type="checkbox" name="rooms[]" value="3" /> <br> Room 4 <input type="checkbox" name="rooms[]" value="4" /> <br> $rooms = $_POST["rooms"]; $room_count = count($rooms); echo "There were ". $room_count. " rooms chosen.<br>"; echo "The rooms you ticked were:<br>"; echo "<br>"; for ($i=0; $i < $room_count; $i++) { echo $rooms[$i]. "<br>";

23 Feedback forms <form action="formto .php" method="post"> <table border="1" bgcolor="#ececec" cellspacing="5" width="550"> <tr><td>name:</td><td> <input type="text" size="40" name="name" style="width: 350px"></td></tr> <tr><td> address:</td><td> <input type="text" size="40" name=" " style="width: 350px"></td></tr> <tr><td valign="top">comments:</td><td> <textarea name="comments" rows="6" cols="50"></textarea></td></tr> <tr><td></td><td> <div align="right"> <input type="submit" value="send" /> </div> </td></tr> </table> </form>

24 Sending the <?php # formto .php, note that you must have a SMTP server on the web server! # $_REQUEST is a merging of $_GET and $_POST where $_POST overrides $_GET $name = $_REQUEST['name']; $to = "webadmin@example.net"; $subject = "FormTo Comments"; # we may need some filtering and validation, this is however not present here! $message = $_REQUEST['comments']; $headers = "From: ". $_REQUEST[' ']; $date = date("d"); $date.= " at "; $date.= date("h:i"); $message = "Comments from ". $name. ", ". $date. ", ". $message; # bool mail ( string $to, string $subject, string $message # [, string $additional_headers [, string $additional_parameters ]] ) $m = mail($to, $subject, $message, $headers); echo "Return code from mail was ". $m; exit();?> # Return code from mail was 1 # Comments from Hans Jones, Mon at 14:39, Hello Form!

25 Send from Python 1 Using Gmail with the Google Account > Sign-in & security > Allow less secure apps setting ON for the sending account #!"\dev\python37\python.exe" import cgi, cgitb import smtplib cgitb.enable() form = cgi.fieldstorage() # send_ .py # def send_ (sender, password, tolist, message): try: smtpobj = smtplib.smtp('smtp.gmail.com:587') smtpobj.ehlo() smtpobj.starttls() smtpobj.login(sender, password) smtpobj.sendmail(sender, tolist, message) smtpobj.close() print("successfully sent {".format(message)) except BaseException as e: print("unable to send error: {".format(e)) # continues on next slide

26 Send from Python 2 print("content-type: text/html;charset=utf-8;\n\n") print() print("<html><head>") print("<title>send CGI Program</title>") print("</head><body>") send_ .py # Get data from fields - if we have pressed the send button a value (Send) is defined if form.getvalue('send '): sender = 'username@gmail.com' password = 'secret_pass' tolist = ['another.user@example.com'] subject = 'SMTP Gmail test' body_text = 'This is a test Gmail message.' message = """From: %s\nto: %s\nsubject: %s\n\n%s""" % (sender, tolist, subject, body_text) send_ (sender, password, tolist, message) # Show the form using multi line text with \ else: print('<p>send Example</p> \ <form action="send_ .py" method="get"> \ <p><input type="submit" name="send " value="send" /></p> \ </form>') print("</body></html>")

27 Hidden form elements Can be used to remember values on the webpage if the page is reloaded remember HTTP is a stateless protocol! A better method is to use session variables Can also be used to hide values in the form which are sent in to adjust the running script in some way For example to know the time between the HTML form code was loaded and when it is received in the FormTo .php # creates something like: <input type="hidden" name="timecode" value="12345" /> <?php $tm = time(); # returns the number of seconds since echo "<input type='hidden' name='timecode' value='". $tm. "' />"; echo $tm. "<br />";?> # at response check to see if the form was answered to quickly spam-proofing <?php $timecode = $_POST["timecode"]; if($timecode + 5 > time()) # old time + 5 sec vs. current time exit(); else { response time was not to short...?>

28 Saving State Sessions are a combination of a server-side cookie and a client-side cookie The session cookie reference is passed back and forth between the server and the client Server loads the corresponding session data from an unique file on the server <?php # Initialize session data # creates a session or resumes the current one based on a session # identifier passed via a GET or POST request, or passed via a cookie. session_start(); # must ALWAYS be on the first line if using sessions if(!isset($_session["my_session_var_name1"])) { $_SESSION["my_session_var_name1"] = "I like session variables!"; else { $_SESSION["my_session_var_name1"].= "!"; # Get and/or set the current session name $sess_name = session_name(); echo "The session name was $sess_name","<br />"; echo $_SESSION["my_session_var_name1"];?> <?php # Ending a session must always be done like this! session_start(); $_SESSION = array(); session_destroy();?>

29 Shopping cart - db-shop-content Use an unique session variable name on utb-mysql.du.se to avoid collision Session behaviour is configured in the [session] part of the php.ini file session.xxx = value products.php An ordinary listing of all products SELECT id, name, price FROM products echo "<td><a href=cart.php? action=add&id=",$row["id"],"> Add To Cart</a></td>"; cart.php session_start() - first line! var_dump($_session['cart']); products table: CREATE TABLE `products` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR( 255 ) NOT NULL, `description` TEXT, `price` DOUBLE DEFAULT '0.00' NOT NULL, PRIMARY KEY ( `id` ) );

30 Shopping cart - db-shop-content <?php session_start(); # must ALWAYS be on the first line if using sessions ///... shortened for brevity... $product_id = empty($_get['id'])? "" : $_GET['id']; // the product id from the URL $action = empty($_get['action'])? "" : $_GET['action']; // the action from the URL if(!isset($_session['cart'])) $_SESSION['cart'] = array(); // if there is an product_id and that product_id doesn't exist display an error message if($product_id &&!productexists($product_id, $DBH, $products)) { die("error. Product Doesn't Exist");?> switch($action) { // decide what to do case "add": if (!isset($_session['cart'][$product_id])) $_SESSION['cart'][$product_id] = 0; $_SESSION['cart'][$product_id]++; // add one to the quantity of the product with id $product_id break; case "remove": // remove one from the quantity of the product with id $product_id $_SESSION['cart'][$product_id]--; // if the quantity is zero, remove it completely (using the 'unset' function) - // otherwise is will show zero, then -1, -2 etc when the user keeps removing items. if($_session['cart'][$product_id] == 0) unset($_session['cart'][$product_id]); break; case "empty": unset($_session['cart']); //unset the whole cart, i.e. empty the cart. break; ///... shortened for brevity... Example included in lab 5

NETB 329 Lecture 13 Python CGI Programming

NETB 329 Lecture 13 Python CGI Programming NETB 329 Lecture 13 Python CGI Programming 1 of 83 What is CGI? The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom

More information

PYTHON CGI PROGRAMMING

PYTHON CGI PROGRAMMING PYTHON CGI PROGRAMMING http://www.tutorialspoint.com/python/python_cgi_programming.htm Copyright tutorialspoint.com The Common Gateway Interface, or CGI, is a set of standards that define how information

More information

COM1004 Web and Internet Technology

COM1004 Web and Internet Technology COM1004 Web and Internet Technology When a user submits a web form, how do we save the information to a database? How do we retrieve that data later? ID NAME EMAIL MESSAGE TIMESTAMP 1 Mike mike@dcs Hi

More information

Spring 2014 Interim. HTML forms

Spring 2014 Interim. HTML forms HTML forms Forms are used very often when the user needs to provide information to the web server: Entering keywords in a search box Placing an order Subscribing to a mailing list Posting a comment Filling

More information

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University 1 Objectives You will learn about Server-side web programming in Python Common Gateway Interface

More information

B. V. Patel Institute of BMC & IT 2014

B. V. Patel Institute of BMC & IT 2014 Unit 1: Introduction Short Questions: 1. What are the rules for writing PHP code block? 2. Explain comments in your program. What is the purpose of comments in your program. 3. How to declare and use constants

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 7 Slide 1 of 25 Week 7 Unfinished

More information

PHP with data handling

PHP with data handling 171 Lesson 18 PHP with data handling Aim Objectives : To provide an introduction data handling with PHP : To give an idea about, What type of data you need to handle? How PHP handle the form data? 18.1

More information

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data CS 418/518 Web Programming Spring 2014 HTML Tables and Forms Dr. Michele Weigle http://www.cs.odu.edu/~mweigle/cs418-s14/ Outline! Assigned Reading! Chapter 4 "Using Tables to Display Data"! Chapter 5

More information

ITS331 IT Laboratory I: (Laboratory #11) Session Handling

ITS331 IT Laboratory I: (Laboratory #11) Session Handling School of Information and Computer Technology Sirindhorn International Institute of Technology Thammasat University ITS331 Information Technology Laboratory I Laboratory #11: Session Handling Creating

More information

How to Make a Contact Us PAGE in Dreamweaver

How to Make a Contact Us PAGE in Dreamweaver We found a great website on the net called http://dreamweaverspot.com and we have basically followed their tutorial for creating Contact Forms. We also checked out a few other tutorials we found by Googling,

More information

CSE 154 LECTURE 8: FORMS

CSE 154 LECTURE 8: FORMS CSE 154 LECTURE 8: FORMS Web data most interesting web pages revolve around data examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes can take many formats: text, HTML, XML, multimedia many

More information

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab. Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 5049 Advanced Internet Technology Lab Lab # 1 Eng. Haneen El-masry February, 2015 Objective To be familiar with

More information

Creating HTML files using Notepad

Creating HTML files using Notepad Reference Materials 3.1 Creating HTML files using Notepad Inside notepad, select the file menu, and then Save As. This will allow you to set the file name, as well as the type of file. Next, select the

More information

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS The Absolute Form Processor is very easy to use. In order to operate the system, you just need the menu at the top of the screen. There, you ll find all the

More information

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor:

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor: Introduction Server-side Techniques PHP Hypertext Processor A very popular server side language on web Code embedded directly into HTML documents http://hk2.php.net/downloads.php Features Free, open source

More information

MI1004 Script programming and internet applications

MI1004 Script programming and internet applications MI1004 Script programming and internet applications Course content and details Learn > Course information > Course plan Learning goals, grades and content on a brief level Learn > Course material Study

More information

Dynamic Form Processing Tool Version 5.0 November 2014

Dynamic Form Processing Tool Version 5.0 November 2014 Dynamic Form Processing Tool Version 5.0 November 2014 Need more help, watch the video! Interlogic Graphics & Marketing (719) 884-1137 This tool allows an ICWS administrator to create forms that will be

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 8 HTML Forms and Basic CGI Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you will

More information

CICS 515 b Internet Programming Week 2. Mike Feeley

CICS 515 b Internet Programming Week 2. Mike Feeley CICS 515 b Internet Programming Week 2 Mike Feeley 1 Software infrastructure stuff MySQL and PHP store files in public_html run on remote.mss.icics.ubc.ca access as http://ws.mss.icics.ubc.ca/~username/...

More information

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 03 Minor Subject

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 03 Minor Subject Multimedia im Netz Online Multimedia Winter semester 2015/16 Tutorial 03 Minor Subject Ludwig- Maximilians- Universität München Online Multimedia WS 2015/16 - Tutorial 03-1 Today s Agenda Quick test Server

More information

Hyperlinks, Tables, Forms and Frameworks

Hyperlinks, Tables, Forms and Frameworks Hyperlinks, Tables, Forms and Frameworks Web Authoring and Design Benjamin Kenwright Outline Review Previous Material HTML Tables, Forms and Frameworks Summary Review/Discussion Email? Did everyone get

More information

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12 PIC 40A Lecture 19: PHP Form handling, session variables and regular expressions 05/25/12 Copyright 2011 Jukka Virtanen UCLA 1 How does a browser communicate with a program on a server? By submitting an

More information

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 FORMS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: How to use forms and the related form types. Controls for interacting with forms. Menus and presenting users with

More information

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics Form Overview CMPT 165: Form Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 26, 2011 A form is an HTML element that contains and organizes objects called

More information

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. Web Programming Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. 1 World-Wide Wide Web (Tim Berners-Lee & Cailliau 92)

More information

Web Programming Paper Solution (Chapter wise)

Web Programming Paper Solution (Chapter wise) PHP Session tracking and explain ways of session tracking. Session Tracking HTTP is a "stateless" protocol which means each time a client retrieves a Web page, the client opens a separate connection to

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

More information

CSc 337 Final Examination December 13, 2013

CSc 337 Final Examination December 13, 2013 On my left is: (NetID) MY NetID On my right is: (NetID) CSc 337 Final Examination December 13, 2013 READ THIS FIRST Read this page now but do not turn this page until you are told to do so. Go ahead and

More information

CGI Programming. What is "CGI"?

CGI Programming. What is CGI? CGI Programming What is "CGI"? Common Gateway Interface A means of running an executable program via the Web. CGI is not a Perl-specific concept. Almost any language can produce CGI programs even C++ (gasp!!)

More information

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014 CS105 Perl: Perl CGI Nathan Clement 24 Feb 2014 Agenda We will cover some CGI basics, including Perl-specific CGI What is CGI? Server Architecture GET vs POST Preserving State in CGI URL Rewriting, Hidden

More information

Web Security IV: Cross-Site Attacks

Web Security IV: Cross-Site Attacks 1 Web Security IV: Cross-Site Attacks Chengyu Song Slides modified from Dawn Song 2 Administrivia Lab3 New terminator: http://www.cs.ucr.edu/~csong/sec/17/l/new_terminator Bonus for solving the old one

More information

1 Form Basics CSC309

1 Form Basics CSC309 1 Form Basics Web Data 2! Most interesting web pages revolve around data! examples: Google, IMDB, Digg, Facebook, YouTube! can take many formats: text, HTML, XML, multimedia! Many of them allow us to access

More information

You can also set the expiration time of the cookie in another way. It may be easier than using seconds.

You can also set the expiration time of the cookie in another way. It may be easier than using seconds. What is a Cookie? A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will

More information

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML)

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML) Web technologies browser sends requests to server, displays results DOM (document object model): structure of page contents forms / CGI (common gateway interface) client side uses HTML/CSS, Javascript,

More information

PHP & My SQL Duration-4-6 Months

PHP & My SQL Duration-4-6 Months PHP & My SQL Duration-4-6 Months Overview of the PHP & My SQL Introduction of different Web Technology Working with the web Client / Server Programs Server Communication Sessions Cookies Typed Languages

More information

Summary 4/5. (contains info about the html)

Summary 4/5. (contains info about the html) Summary Tag Info Version Attributes Comment 4/5

More information

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code.

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code. Practice problems. 1 Draw the output for the following code. form for Spring Retreat Jacket company Spring Retreat Jacket Order Form please fill in this form and click on

More information

USQ/CSC2406 Web Publishing

USQ/CSC2406 Web Publishing USQ/CSC2406 Web Publishing Lecture 4: HTML Forms, Server & CGI Scripts Tralvex (Rex) Yeap 19 December 2002 Outline Quick Review on Lecture 3 Topic 7: HTML Forms Topic 8: Server & CGI Scripts Class Activity

More information

Professional Course in Web Designing & Development 5-6 Months

Professional Course in Web Designing & Development 5-6 Months Professional Course in Web Designing & Development 5-6 Months BASIC HTML Basic HTML Tags Hyperlink Images Form Table CSS 2 Basic use of css Formatting the page with CSS Understanding DIV Make a simple

More information

Web technologies. Web. basic components. embellishments in browser. DOM (document object model)

Web technologies. Web. basic components. embellishments in browser. DOM (document object model) Web technologies DOM (document object model) what's on the page and how it can be manipulated forms / CGI (common gateway interface) extract info from a form, create a page, send it back server side code

More information

Manual Html A Href Onclick Submit Button

Manual Html A Href Onclick Submit Button Manual Html A Href Onclick Submit Button When you submit the form via clicking the radio button, it inserts properly into Doing a manual refresh (F5 or refresh button) will then display the new updated

More information

UNIT-VI CREATING AND USING FORMS

UNIT-VI CREATING AND USING FORMS UNIT-VI CREATING AND USING FORMS To create a fully functional web application, you need to be able to interact with your users. The common way to receive information from web users is through a form. Forms

More information

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013 The Hypertext Markup Language (HTML) Part II Hamid Zarrabi-Zadeh Web Programming Fall 2013 2 Outline HTML Structures Tables Forms New HTML5 Elements Summary HTML Tables 4 Tables Tables are created with

More information

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI INDEX No. Title Pag e No. 1 Implements Basic HTML Tags 3 2 Implementation Of Table Tag 4 3 Implementation Of FRAMES 5 4 Design A FORM

More information

HTML forms and the dynamic web

HTML forms and the dynamic web HTML forms and the dynamic web Antonio Lioy < lioy@polito.it > english version created by Marco D. Aime < m.aime@polito.it > Politecnico di Torino Dip. Automatica e Informatica timetable.html departure

More information

Database Systems Fundamentals

Database Systems Fundamentals Database Systems Fundamentals Using PHP Language Arman Malekzade Amirkabir University of Technology (Tehran Polytechnic) Notice: The class is held under the supervision of Dr.Shiri github.com/arman-malekzade

More information

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018 Lecture 6: More Arrays & HTML Forms CS 383 Web Development II Monday, February 12, 2018 Lambdas You may have encountered a lambda (sometimes called anonymous functions) in other programming languages The

More information

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms Web-Based Information Systems Fall 2004 CMPUT 410: CGI and HTML Forms Dr. Osmar R. Zaïane University of Alberta Outline of Lecture 5 Introduction Poor Man s Animation Animation with Java Animation with

More information

COMP519 Web Programming Lecture 28: PHP (Part 4) Handouts

COMP519 Web Programming Lecture 28: PHP (Part 4) Handouts COMP519 Web Programming Lecture 28: PHP (Part 4) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool Contents

More information

CPSC 481: CREATIVE INQUIRY TO WSBF

CPSC 481: CREATIVE INQUIRY TO WSBF CPSC 481: CREATIVE INQUIRY TO WSBF J. Yates Monteith, Fall 2013 Schedule HTML and CSS PHP HTML Hypertext Markup Language Markup Language. Does not execute any computation. Marks up text. Decorates it.

More information

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Chapter4: HTML Table and Script page, HTML5 new forms Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Objective To know HTML5 creating a new style form. To understand HTML table benefits

More information

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT. Chapter 7:- PHP Compiled By:- Assistant Professor, SVBIT. Outline Starting to script on server side, Arrays, Function and forms, Advance PHP Databases:-Basic command with PHP examples, Connection to server,

More information

Web Focused Programming With PHP

Web Focused Programming With PHP Web Focused Programming With PHP May 20 2014 Thomas Beebe Advanced DataTools Corp (tom@advancedatatools.com) Tom Beebe Tom is a Senior Database Consultant and has been with Advanced DataTools for over

More information

COMS 359: Interactive Media

COMS 359: Interactive Media COMS 359: Interactive Media Agenda Project #3 Review Forms (con t) CGI Validation Design Preview Project #3 report Who is your client? What is the project? Project Three action= http://...cgi method=

More information

DC71 INTERNET APPLICATIONS JUNE 2013

DC71 INTERNET APPLICATIONS JUNE 2013 Q 2 (a) With an example show text formatting in HTML. The bold text tag is : This will be in bold. If you want italics, use the tag, as follows: This will be in italics. Finally, for

More information

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. c360 Solutions

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc.   c360 Solutions c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. www.c360.com c360 Solutions Contents Overview... 3 Web Connect Configuration... 4 Implementing Web Connect...

More information

Using Dreamweaver. 5 More Page Editing. Bulleted and Numbered Lists

Using Dreamweaver. 5 More Page Editing. Bulleted and Numbered Lists Using Dreamweaver 5 By now, you should have a functional template, with one simple page based on that template. For the remaining pages, we ll create each page based on the template and then save each

More information

How to work with cookies and sessions

How to work with cookies and sessions Chapter 12 How to work with cookies and sessions How cookies work A cookie is a name/value pair that is stored in a browser. On the server, a web application creates a cookie and sends it to the browser.

More information

Chapter 9. Managing State Information. Understanding State Information (continued) Understanding State Information 10/29/2011.

Chapter 9. Managing State Information. Understanding State Information (continued) Understanding State Information 10/29/2011. Chapter 9 Managing State Information PHP Programming with MySQL 2 nd Edition Objectives In this chapter, you will: Learn about state information Use hidden form fields to save state information Use query

More information

Autopopulation; Session & Cookies

Autopopulation; Session & Cookies ; Session & Cookies CGT 356 Web Programming, Development, & Database Integration Lecture 5 Session array Use the Session array to store data that needs to be recalled on later pages $_SESSION[ foo ] Use

More information

Server side basics CS380

Server side basics CS380 1 Server side basics URLs and web servers 2 http://server/path/file Usually when you type a URL in your browser: Your computer looks up the server's IP address using DNS Your browser connects to that IP

More information

<form>. input elements. </form>

<form>. input elements. </form> CS 183 4/8/2010 A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, text area fields, drop-down menus, radio buttons,

More information

LAB Test 1. Rules and Regulations:-

LAB Test 1. Rules and Regulations:- LAB Test 1 Rules and Regulations:- 1. Individual Test 2. Start at 3.10 pm until 4.40 pm (1 Hour and 30 Minutes) 3. Open note test 4. Send the answer to h.a.sulaiman@ieee.org a. Subject: [LabTest] Your

More information

HTML Forms. By Jaroslav Mohapl

HTML Forms. By Jaroslav Mohapl HTML Forms By Jaroslav Mohapl Abstract How to write an HTML form, create control buttons, a text input and a text area. How to input data from a list of items, a drop down list, and a list box. Simply

More information

cwhois Manual Copyright Vibralogix. All rights reserved.

cwhois Manual Copyright Vibralogix. All rights reserved. cwhoistm V2.12 cwhois Manual Copyright 2003-2015 Vibralogix. All rights reserved. This document is provided by Vibralogix for informational purposes only to licensed users of the cwhois product and is

More information

Web Programming TL 9. Tutorial. Exercise 1: String Manipulation

Web Programming TL 9. Tutorial. Exercise 1: String Manipulation Exercise 1: String Manipulation Tutorial 1) Which statements print the same thing to the screen and why? echo "$var"; value of $var echo '$var'; the text '$var' echo $var ; value of $var 2) What is printed

More information

Q1. What is JavaScript?

Q1. What is JavaScript? Q1. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded

More information

CSE 154 LECTURE 13: SESSIONS

CSE 154 LECTURE 13: SESSIONS CSE 154 LECTURE 13: SESSIONS Expiration / persistent cookies setcookie("name", "value", expiration); $expiretime = time() + 60*60*24*7; # 1 week from now setcookie("couponnumber", "389752", $expiretime);

More information

Forms, CGI. Objectives

Forms, CGI. Objectives Forms, CGI Objectives The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface (CGI) Later: Servlets Generation

More information

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar HTML Tables and Forms Chapter 5 2017 Pearson http://www.funwebdev.com - 2 nd Ed. HTML Tables A grid of cells A table in HTML is created using the element Tables can be used to display: Many types

More information

Web Application Development (WAD) V th Sem BBAITM (Unit 4) By: Binit Patel

Web Application Development (WAD) V th Sem BBAITM (Unit 4) By: Binit Patel Web Application Development (WAD) V th Sem BBAITM (Unit 4) By: Binit Patel Working with Forms: A very popular way to make a web site interactive is using HTML based forms by the site. Using HTML forms,

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

GET /index.php HTTP/1.1 Host: User- agent: Mozilla/4.0

GET /index.php HTTP/1.1 Host:   User- agent: Mozilla/4.0 State management GET /index.php HTTP/1.1 Host: www.mtech.edu User- agent: Mozilla/4.0 HTTP/1.1 200 OK Date: Thu, 17 Nov 2011 15:54:10 GMT Server: Apache/2.2.16 (Debian) Content- Length: 285 Set- Cookie:

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use Figure

More information

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP Course Topics IT360: Applied Database Systems Introduction to PHP Database design Relational model SQL Normalization PHP MySQL Database administration Transaction Processing Data Storage and Indexing The

More information

Advanced CGI Scripts. personalized web browsing using cookies: count number of visits. secure hash algorithm using cookies for login data the scripts

Advanced CGI Scripts. personalized web browsing using cookies: count number of visits. secure hash algorithm using cookies for login data the scripts Advanced CGI Scripts 1 Cookies personalized web browsing using cookies: count number of visits 2 Password Encryption secure hash algorithm using cookies for login data the scripts 3 Authentication via

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Learn about the Document Object Model and the Document Object Model hierarchy Create and use the properties, methods and event

More information

Creating a Web Page with HTML

Creating a Web Page with HTML CT1501 DEVELOPMENT OF INTERNET APPLICATION Creating a Web Page with HTML Prepared By: Huda Alsuwailem Reviewed by: Rehab Alfallaj www.faculty.ksu.edu.sa/rehab-alfallaj ralfallaj@ksu.edu.sa Tables

More information

PHP 5 if...else...elseif Statements

PHP 5 if...else...elseif Statements PHP 5 if...else...elseif Statements Conditional statements are used to perform different actions based on different conditions. PHP Conditional Statements Very often when you write code, you want to perform

More information

Developing Ajax Applications using EWD and Python. Tutorial: Part 2

Developing Ajax Applications using EWD and Python. Tutorial: Part 2 Developing Ajax Applications using EWD and Python Tutorial: Part 2 Chapter 1: A Logon Form Introduction This second part of our tutorial on developing Ajax applications using EWD and Python will carry

More information

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity HTML Forms Overview of Forms Forms are used all over the Web to: Accept information Provide interactivity Types of forms: Search form, Order form, Newsletter sign-up form, Survey form, Add to Cart form,

More information

PHPRad. PHPRad At a Glance. This tutorial will show you basic functionalities in PHPRad and

PHPRad. PHPRad At a Glance. This tutorial will show you basic functionalities in PHPRad and PHPRad PHPRad At a Glance. This tutorial will show you basic functionalities in PHPRad and Getting Started Creating New Project To create new Project. Just click on the button. Fill In Project properties

More information

Networking and Internet

Networking and Internet Today s Topic Lecture 13 Web Fundamentals Networking and Internet LAN Web pages Web resources Web client Web Server HTTP Protocol HTML & HTML Forms 1 2 LAN (Local Area Network) Networking and Internet

More information

COMP519 Practical 14 Python (5)

COMP519 Practical 14 Python (5) COMP519 Practical 14 Python (5) Introduction This practical contains further exercises that are intended to familiarise you with Python Programming. While you work through the tasks below compare your

More information

PHP INTERVIEW QUESTION-ANSWERS

PHP INTERVIEW QUESTION-ANSWERS 1. What is PHP? PHP (recursive acronym for PHP: Hypertext Preprocessor) is the most widely used open source scripting language, majorly used for web-development and application development and can be embedded

More information

Building Web Based Application using HTML

Building Web Based Application using HTML Introduction to Hypertext Building Web Based Application using HTML HTML: Hypertext Markup Language Hypertext links within and among Web documents connect one document to another Origins of HTML HTML is

More information

This is CS50. Harvard College Fall Quiz 1 Answer Key

This is CS50. Harvard College Fall Quiz 1 Answer Key Quiz 1 Answer Key Answers other than the below may be possible. Know Your Meme. 0. True or False. 1. T 2. F 3. F 4. F 5. T Attack. 6. By never making assumptions as to the length of users input and always

More information

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL.

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL. Hello everyone! Welcome to our PHP + MySQL (Easy to learn) E.T.L. free online course Hope you have installed your XAMPP? And you have created your forms inside the studio file in the htdocs folder using

More information

SCRIPTING, DATABASES, SYSTEM ARCHITECTURE

SCRIPTING, DATABASES, SYSTEM ARCHITECTURE introduction to SCRIPTING, DATABASES, SYSTEM ARCHITECTURE PHP II: while loops, for loops, functions Claus Brabrand ((( brabrand@itu.dk ))) Associate Professor, Ph.D. ((( Software and Systems ))) IT University

More information

Jquery Ajax Json Php Mysql Data Entry Example

Jquery Ajax Json Php Mysql Data Entry Example Jquery Ajax Json Php Mysql Data Entry Example Then add required assets in head which are jquery library, datatable js library and css By ajax api we can fetch json the data from employee-grid-data.php.

More information

Form Processing in PHP

Form Processing in PHP Form Processing in PHP Forms Forms are special components which allow your site visitors to supply various information on the HTML page. We have previously talked about creating HTML forms. Forms typically

More information

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML Outline INTRODUCTION TO WEB DEVELOPMENT AND HTML Introducing Forms The element Focus Sending form data to the server Exercise Lecture 07: Forms - Spring 2013 Introducing Form Any form is declared

More information

Using Dreamweaver CC. 5 More Page Editing. Bulleted and Numbered Lists

Using Dreamweaver CC. 5 More Page Editing. Bulleted and Numbered Lists Using Dreamweaver CC 5 By now, you should have a functional template, with one simple page based on that template. For the remaining pages, we ll create each page based on the template and then save each

More information

Lab 7 Introduction to MySQL

Lab 7 Introduction to MySQL Lab 7 Introduction to MySQL Objectives: During this lab session, you will - Learn how to access the MySQL Server - Get hand-on experience on data manipulation and some PHP-to-MySQL technique that is often

More information

CST272 Getting Started Page 1

CST272 Getting Started Page 1 CST272 Getting Started Page 1 1 2 3 4 5 6 8 Introduction to ASP.NET, Visual Studio and C# CST272 ASP.NET Static and Dynamic Web Applications Static Web pages Created with HTML controls renders exactly

More information

4th year. more than 9 years. more than 6 years

4th year. more than 9 years. more than 6 years 4th year more than 9 years more than 6 years Apache (recommended) IIS MySQL (recommended) Oracle Client Webserver www.xyz.de Webpage (Output) Output Call MySQL-Database Dataexchange PHP Hello World

More information

WEBD 236 Web Information Systems Programming

WEBD 236 Web Information Systems Programming WEBD 236 Web Information Systems Programming Week 4 Copyright 2013-2017 Todd Whittaker and Scott Sharkey (sharkesc@franklin.edu) Agenda This week s expected outcomes This week s topics This week s homework

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

A340 Laboratory Session #5

A340 Laboratory Session #5 A340 Laboratory Session #5 LAB GOALS Creating multiplication table using JavaScript Creating Random numbers using the Math object Using your text editor (Notepad++ / TextWrangler) create a web page similar

More information