This document provides an introduction and overview of PHP:
- PHP is a server-side scripting language that is embedded into HTML code and allows for dynamic web page generation. Unlike JavaScript, PHP runs on the server-side.
- To write PHP code, the <?php ?> tags are used to declare PHP sections within HTML documents. PHP code can be placed anywhere in an HTML document.
- PHP supports various data types like integers, strings, arrays and can connect to databases like Oracle to dynamically retrieve and display data on web pages. Form data submitted by users can also be accessed and processed using PHP.
Practical PHP by example Jan Leth-KjaerCOMMON Europe
Â
- This document provides an overview of various practical PHP examples that will be demonstrated, including data management with MySQL, file management, PDF creation, PayPal integration, and using SMS APIs.
- Examples will show retrieving and displaying data from a database, allowing users to enter/update data, validating and updating the database. File management on the server and creating PDFs with embedded data will also be demonstrated.
- Integrating PayPal payments standards and building PayPal forms to select invoices for payment processing is covered. Finally, using external SMS APIs to send text messages by making API calls with parameters is reviewed.
PHP tutorial for beginners with examples. In this session you will be learning lot of things. Know about the PHP introduction. Begin from basics and find the required details about it. PHP tutorial for beginners is available for you, watch till the end.
Take the help of this PHP admin tutorial for beginners and check the required information. Complete details required to get by you from this session. First know PHP basics and then proceed for other concepts. Greetings from Websoles Strategic Digital Solutions.
The document provides instructions on installing PHP, MySQL, and related tools. It then demonstrates connecting to a MySQL database from PHP, performing basic CRUD (create, read, update, delete) operations, and using sessions to share data across multiple pages. Key steps include installing PHP and MySQL, connecting to the database, executing queries, and retrieving and displaying results in HTML. Sessions are demonstrated to share a user's name across three different pages.
The document provides an overview of PHP security topics like input validation, SQL injection, cross-site scripting, code injection, and session security. It discusses the importance of validating all user inputs, escaping data when querying databases, using prepared statements to prevent SQL injection, and regenerating session IDs and validating browser signatures to secure sessions. Specific functions and techniques are presented for preventing vulnerabilities in each area.
The document discusses SQL, MySQL, and PHP for building web applications. It covers topics like database management with MySQL, the SQL language for querying and manipulating data, using PHP to connect to MySQL databases and perform operations, and best practices for designing web applications that utilize a database backend.
This document provides an overview of key features in Sightly, an HTML templating language used in Adobe Experience Manager (AEM):
- It describes Sightly statements like data-sly-use, data-sly-attribute, data-sly-element, and data-sly-resource that allow manipulating elements, attributes, and including resources.
- Expression options like @context, @format, @join, and @i18n that control output are also covered.
- URI manipulation using options like @scheme, @domain, @path, @query, and @fragment is explained.
- Other topics include template and call statements, external templates, and the
This document describes a user authentication module created using PHP. It includes pages for sign up, login, password reset, and a user inbox. The sign up page collects user details and validates the information before inserting a new user record into a MySQL database. The login page authenticates users by matching their user ID and password. Password and security answers are encrypted before storage. The module provides functionality for common authentication tasks.
Practical PHP by example Jan Leth-KjaerCOMMON Europe
Â
- This document provides an overview of various practical PHP examples that will be demonstrated, including data management with MySQL, file management, PDF creation, PayPal integration, and using SMS APIs.
- Examples will show retrieving and displaying data from a database, allowing users to enter/update data, validating and updating the database. File management on the server and creating PDFs with embedded data will also be demonstrated.
- Integrating PayPal payments standards and building PayPal forms to select invoices for payment processing is covered. Finally, using external SMS APIs to send text messages by making API calls with parameters is reviewed.
PHP tutorial for beginners with examples. In this session you will be learning lot of things. Know about the PHP introduction. Begin from basics and find the required details about it. PHP tutorial for beginners is available for you, watch till the end.
Take the help of this PHP admin tutorial for beginners and check the required information. Complete details required to get by you from this session. First know PHP basics and then proceed for other concepts. Greetings from Websoles Strategic Digital Solutions.
The document provides instructions on installing PHP, MySQL, and related tools. It then demonstrates connecting to a MySQL database from PHP, performing basic CRUD (create, read, update, delete) operations, and using sessions to share data across multiple pages. Key steps include installing PHP and MySQL, connecting to the database, executing queries, and retrieving and displaying results in HTML. Sessions are demonstrated to share a user's name across three different pages.
The document provides an overview of PHP security topics like input validation, SQL injection, cross-site scripting, code injection, and session security. It discusses the importance of validating all user inputs, escaping data when querying databases, using prepared statements to prevent SQL injection, and regenerating session IDs and validating browser signatures to secure sessions. Specific functions and techniques are presented for preventing vulnerabilities in each area.
The document discusses SQL, MySQL, and PHP for building web applications. It covers topics like database management with MySQL, the SQL language for querying and manipulating data, using PHP to connect to MySQL databases and perform operations, and best practices for designing web applications that utilize a database backend.
This document provides an overview of key features in Sightly, an HTML templating language used in Adobe Experience Manager (AEM):
- It describes Sightly statements like data-sly-use, data-sly-attribute, data-sly-element, and data-sly-resource that allow manipulating elements, attributes, and including resources.
- Expression options like @context, @format, @join, and @i18n that control output are also covered.
- URI manipulation using options like @scheme, @domain, @path, @query, and @fragment is explained.
- Other topics include template and call statements, external templates, and the
This document describes a user authentication module created using PHP. It includes pages for sign up, login, password reset, and a user inbox. The sign up page collects user details and validates the information before inserting a new user record into a MySQL database. The login page authenticates users by matching their user ID and password. Password and security answers are encrypted before storage. The module provides functionality for common authentication tasks.
This document provides an overview and examples of using PHP for various purposes including as a templating system, scripting language, and for generating dynamic images and PDFs. It discusses PHP's widespread use based on statistics and provides code examples for creating graphs, charts and invoices using PHP's gdchart and PDF extensions.
The document provides an overview of various PHP security topics including input validation, cross-site scripting, SQL injection, code injection, session security, and concerns regarding shared hosting environments. It discusses best practices for securing PHP applications such as validating all user inputs, using prepared statements, secure session handling, and restricting file system access.
Forms in Django allow encapsulating form data and validation logic. This document discusses advanced form techniques in Django, including:
- Dynamically generating forms based on models to handle multiple forms of different types.
- Altering form fields dynamically based on request data, such as restricting a dropdown to related objects owned by the user.
- Fully dynamic form building by defining form fields from database models, such as a survey application where questions are defined in models.
- Common techniques like subclassing form methods, type() function to dynamically generate form classes, and leveraging standard Python to extend Django's capabilities.
The document provides examples of validating user input in PHP to prevent security issues. It demonstrates validating that fields are not empty, data is the correct type/format, and user selections are made from dropdowns or radio buttons. Code samples show checking string length, data types, dates, and that options are selected from multiple choice fields. Validating user input helps prevent errors and security vulnerabilities when data is submitted.
This document provides an introduction to PHP and MySQL for beginners. It explains that PHP is an open-source, server-side scripting language used to generate dynamic web pages. It also discusses PHP variables, data types, operators, conditional statements, functions, includes files, forms, sessions, and an overview of key PHP features. The goal is to provide readers with basic PHP knowledge and code examples to get started with PHP and MySQL.
This document summarizes Cena-DTA, a framework for synchronizing relational database data between a master database and local databases. Cena-DTA uses a custom protocol and envelope to synchronize data at the field level while maintaining relationships between tables using auto-incrementing IDs. It includes PHP server-side code that utilizes ORM and client-side jQuery plugins to interface with HTML5 local databases on browsers. The goal of Cena-DTA is to simplify synchronized app development across multiple devices and browsers using local storage and databases.
This document provides an overview of managed metadata in SharePoint 2010. It discusses the key components of the term store including terms, term sets, and groups. It demonstrates how to provision and manage the managed metadata service including using tools like the term store management tool. It also covers real world scenarios for using managed metadata for navigation, search, and tagging and provides tips on governance, planning, and development.
The document provides an overview of a web apps 101 course, introducing the client-server model, key technologies like HTML, CSS, JavaScript, Python and Ruby, and how front-end development works using these languages. It discusses the anatomy of web applications, front-end development with HTML, CSS, and JavaScript, and the command line interface. The goals of the course are to take students from having an idea to building a prototype and full web application through hands-on learning and equipping them with resources to become successful developers.
The document provides an overview of a web apps 101 course, introducing the client-server model, key technologies like HTML, CSS, JavaScript, Python and Ruby, and the basics of front-end development including using tags in HTML and applying styles in CSS. It also briefly discusses the command line and operating systems. The goals of the course are to take students from having an idea to building a prototype and then a full application, focusing more on processes and problem solving than specific content.
This document provides an overview of a web development course. It introduces key concepts like the client-server model, HTML, CSS, JavaScript, and tools like Git, GitHub, and Heroku. The goals of the course are to take students from having an idea to building a prototype to developing a full application, with a focus on practical skills over theory. Important technologies covered include HTML for content, CSS for styling, JavaScript for interactivity, and languages like Python and Ruby for backend development. Deployment options like GitHub for hosting code and Heroku for deploying applications are also discussed.
Stop the noise! - Introduction to the JSON:API specification in DrupalBjĂśrn Brala
Â
If youâve ever argued about the way your JSON responses should be formatted, JSON:API can be your anti-bikeshedding tool. JSON:API is a great way to expose a consistent API in your application.
In this session, we will talk about how JSON:API got to where it is today and how it can help you make Drupal the core of all your online transactions. We will check out the specifications and look at the main benefits of JSON:API and see how Drupal implemented the spec.
Expect to learn the structure and features of the JSON:API specifications and why it should be your smart default. You should be able to get started right away with some examples we will provide in this session.
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5Salvatore Iaconesi
Â
This document provides an introduction to using PHP for dynamic web development. It explains how PHP code can be embedded in HTML pages and executed on the server to dynamically output content. It covers PHP templates, variables, instructions, loops, conditions, and how to pass data between pages using forms and GET/POST requests. Exercises are provided to help learn PHP fundamentals like printing user input, conditional logic, and basic form handling. Resources for learning more about PHP, forms, and setting up a local development environment are also included.
The document outlines guidelines for the Sport Countries Network, an international group of public sport administrations that cooperate on sport policies and international cooperation. Key points include:
1) The network aims to maintain the concept of "sport countries" and promote information exchange, common objectives, and international sport events and competitions.
2) It has proposed structures including a steering committee, technical secretariat, and conference organizing committee.
3) Countries can join by fulfilling a sport country questionnaire and nominating a contact, with the goal of further enhancing cooperation between member administrations.
The document provides instructions for scanning photos into Adobe Photoshop CS3 and editing them. It describes how to scan photos using an HP scanner, then edit photos by rotating, cropping, resizing, removing red eye, converting to black and white, adjusting contrast and color, removing blemishes. It also explains how to save the edited photos.
The Autobots encounter a giant robot named Omega Supreme who they sense has a high power level. While one Autobot doubts Omega Supreme could be that big, Omega Supreme introduces himself and tells the Autobots to head back while he stays behind to greet an old friend.
This document provides an introduction and overview of LaTeX. It discusses what LaTeX is, why it is better than Word for academic documents, the LaTeX workflow and file types, how to get started, document structure, references, figures, and a brief history. The key points are: LaTeX is a typesetting system that separates structure and formatting, allowing focus on content; it provides professional typesetting and automatic numbering and references; and is good for scientific documents that will be revised and read long-term.
Este documento describe un proyecto de investigaciĂłn realizado por estudiantes de ingenierĂa de sistemas sobre la implementaciĂłn de una red en una empresa de construcciĂłn. La empresa CJ Promotores actualmente usa un sistema manual de tarjetas para llevar el control de materiales, lo que dificulta el manejo oportuno de la informaciĂłn. El objetivo general del proyecto es agilizar y optimizar la gestiĂłn de datos a travĂŠs de una red que permita el intercambio de informaciĂłn entre sucursales. Los objetivos especĂficos incluyen reemplazar el sistema obsole
This was during our annual meeting with head teachers of the schools we have Our World International School Clubs doing waste management activities with their learners.
This document introduces the Image Adjustment Lab in Corel PHOTO-PAINT, which allows adjusting colors, contrast, and creating effects in photographs. It provides a tutorial where a flower photo is adjusted to make colors more vibrant and detail clearer. First, temperature and tint are adjusted, then saturation, midtones, and highlights. This enhances the photo's quality. Effects like hand-tinting and posterizing are also demonstrated. The Image Adjustment Lab gives precise control over photo adjustments and effects.
This document provides an overview and examples of using PHP for various purposes including as a templating system, scripting language, and for generating dynamic images and PDFs. It discusses PHP's widespread use based on statistics and provides code examples for creating graphs, charts and invoices using PHP's gdchart and PDF extensions.
The document provides an overview of various PHP security topics including input validation, cross-site scripting, SQL injection, code injection, session security, and concerns regarding shared hosting environments. It discusses best practices for securing PHP applications such as validating all user inputs, using prepared statements, secure session handling, and restricting file system access.
Forms in Django allow encapsulating form data and validation logic. This document discusses advanced form techniques in Django, including:
- Dynamically generating forms based on models to handle multiple forms of different types.
- Altering form fields dynamically based on request data, such as restricting a dropdown to related objects owned by the user.
- Fully dynamic form building by defining form fields from database models, such as a survey application where questions are defined in models.
- Common techniques like subclassing form methods, type() function to dynamically generate form classes, and leveraging standard Python to extend Django's capabilities.
The document provides examples of validating user input in PHP to prevent security issues. It demonstrates validating that fields are not empty, data is the correct type/format, and user selections are made from dropdowns or radio buttons. Code samples show checking string length, data types, dates, and that options are selected from multiple choice fields. Validating user input helps prevent errors and security vulnerabilities when data is submitted.
This document provides an introduction to PHP and MySQL for beginners. It explains that PHP is an open-source, server-side scripting language used to generate dynamic web pages. It also discusses PHP variables, data types, operators, conditional statements, functions, includes files, forms, sessions, and an overview of key PHP features. The goal is to provide readers with basic PHP knowledge and code examples to get started with PHP and MySQL.
This document summarizes Cena-DTA, a framework for synchronizing relational database data between a master database and local databases. Cena-DTA uses a custom protocol and envelope to synchronize data at the field level while maintaining relationships between tables using auto-incrementing IDs. It includes PHP server-side code that utilizes ORM and client-side jQuery plugins to interface with HTML5 local databases on browsers. The goal of Cena-DTA is to simplify synchronized app development across multiple devices and browsers using local storage and databases.
This document provides an overview of managed metadata in SharePoint 2010. It discusses the key components of the term store including terms, term sets, and groups. It demonstrates how to provision and manage the managed metadata service including using tools like the term store management tool. It also covers real world scenarios for using managed metadata for navigation, search, and tagging and provides tips on governance, planning, and development.
The document provides an overview of a web apps 101 course, introducing the client-server model, key technologies like HTML, CSS, JavaScript, Python and Ruby, and how front-end development works using these languages. It discusses the anatomy of web applications, front-end development with HTML, CSS, and JavaScript, and the command line interface. The goals of the course are to take students from having an idea to building a prototype and full web application through hands-on learning and equipping them with resources to become successful developers.
The document provides an overview of a web apps 101 course, introducing the client-server model, key technologies like HTML, CSS, JavaScript, Python and Ruby, and the basics of front-end development including using tags in HTML and applying styles in CSS. It also briefly discusses the command line and operating systems. The goals of the course are to take students from having an idea to building a prototype and then a full application, focusing more on processes and problem solving than specific content.
This document provides an overview of a web development course. It introduces key concepts like the client-server model, HTML, CSS, JavaScript, and tools like Git, GitHub, and Heroku. The goals of the course are to take students from having an idea to building a prototype to developing a full application, with a focus on practical skills over theory. Important technologies covered include HTML for content, CSS for styling, JavaScript for interactivity, and languages like Python and Ruby for backend development. Deployment options like GitHub for hosting code and Heroku for deploying applications are also discussed.
Stop the noise! - Introduction to the JSON:API specification in DrupalBjĂśrn Brala
Â
If youâve ever argued about the way your JSON responses should be formatted, JSON:API can be your anti-bikeshedding tool. JSON:API is a great way to expose a consistent API in your application.
In this session, we will talk about how JSON:API got to where it is today and how it can help you make Drupal the core of all your online transactions. We will check out the specifications and look at the main benefits of JSON:API and see how Drupal implemented the spec.
Expect to learn the structure and features of the JSON:API specifications and why it should be your smart default. You should be able to get started right away with some examples we will provide in this session.
Sperimentazioni di Tecnologie e Comunicazioni Multimediali: Lezione 5Salvatore Iaconesi
Â
This document provides an introduction to using PHP for dynamic web development. It explains how PHP code can be embedded in HTML pages and executed on the server to dynamically output content. It covers PHP templates, variables, instructions, loops, conditions, and how to pass data between pages using forms and GET/POST requests. Exercises are provided to help learn PHP fundamentals like printing user input, conditional logic, and basic form handling. Resources for learning more about PHP, forms, and setting up a local development environment are also included.
The document outlines guidelines for the Sport Countries Network, an international group of public sport administrations that cooperate on sport policies and international cooperation. Key points include:
1) The network aims to maintain the concept of "sport countries" and promote information exchange, common objectives, and international sport events and competitions.
2) It has proposed structures including a steering committee, technical secretariat, and conference organizing committee.
3) Countries can join by fulfilling a sport country questionnaire and nominating a contact, with the goal of further enhancing cooperation between member administrations.
The document provides instructions for scanning photos into Adobe Photoshop CS3 and editing them. It describes how to scan photos using an HP scanner, then edit photos by rotating, cropping, resizing, removing red eye, converting to black and white, adjusting contrast and color, removing blemishes. It also explains how to save the edited photos.
The Autobots encounter a giant robot named Omega Supreme who they sense has a high power level. While one Autobot doubts Omega Supreme could be that big, Omega Supreme introduces himself and tells the Autobots to head back while he stays behind to greet an old friend.
This document provides an introduction and overview of LaTeX. It discusses what LaTeX is, why it is better than Word for academic documents, the LaTeX workflow and file types, how to get started, document structure, references, figures, and a brief history. The key points are: LaTeX is a typesetting system that separates structure and formatting, allowing focus on content; it provides professional typesetting and automatic numbering and references; and is good for scientific documents that will be revised and read long-term.
Este documento describe un proyecto de investigaciĂłn realizado por estudiantes de ingenierĂa de sistemas sobre la implementaciĂłn de una red en una empresa de construcciĂłn. La empresa CJ Promotores actualmente usa un sistema manual de tarjetas para llevar el control de materiales, lo que dificulta el manejo oportuno de la informaciĂłn. El objetivo general del proyecto es agilizar y optimizar la gestiĂłn de datos a travĂŠs de una red que permita el intercambio de informaciĂłn entre sucursales. Los objetivos especĂficos incluyen reemplazar el sistema obsole
This was during our annual meeting with head teachers of the schools we have Our World International School Clubs doing waste management activities with their learners.
This document introduces the Image Adjustment Lab in Corel PHOTO-PAINT, which allows adjusting colors, contrast, and creating effects in photographs. It provides a tutorial where a flower photo is adjusted to make colors more vibrant and detail clearer. First, temperature and tint are adjusted, then saturation, midtones, and highlights. This enhances the photo's quality. Effects like hand-tinting and posterizing are also demonstrated. The Image Adjustment Lab gives precise control over photo adjustments and effects.
This document provides an overview of a full-day tutorial on HDF5 and netCDF-4. The tutorial will cover the HDF5 and netCDF-4 data models, programming interfaces, and optimization features. It will demonstrate how to use HDF5 for efficient data storage and I/O, including techniques like chunking, compression and parallel I/O. It will also show how netCDF-4 implements the netCDF data model using the HDF5 file format to provide scalable I/O. The tutorial is intended to help scientists and developers effectively use and optimize HDF5 and netCDF-4 for data management on high-performance computing systems.
This document provides an overview of Firefox extension development using JavaScript. It discusses JavaScript basics like variables, functions, and debugging with alerts. It also covers how to access and manipulate the DOM to work with XUL elements in a GUI. Developers are instructed to place JavaScript code files in the extension's content directory and link them to XUL files using the chrome URI. Further reading links are included to learn more about XUL elements, JavaScript, and tutorials for non-programmers.
This magazine follows conventions of magazine design like placing the masthead at the top in a large font on a white background. It also follows the "rule of thirds" by placing the main image and text in the left two-thirds while reserving the right third for purchase details. The cover uses persuasive language and images of artists to attract readers and promote featured content inside the issue.
The document provides instructions for administering a PHP-Nuke website. It explains how to log into the administration area and describes the various administration sections like Modules, Blocks, Pages, and Images. The Modules section allows customizing and activating modules. The Blocks section allows rearranging and editing blocks on the site. Pages can be added, edited, and deleted. Images can be uploaded for use on pages.
Bunding Or Binding Dr. Shriniwas Kashalikardrsolapurkar
Â
The document discusses how various laws, constitutions, religious texts, traditions, and customs aim to structure individuals' vital force to meet its origin of Truth or God. This process is essentially yoga, with hatha yoga and devotional practices also aiming for the same life goal. Understanding this can help people behave accordingly and benefit together.
This document outlines two assignments for a course on the science of the web.
The first assignment asks students to replicate Stanley Milgram's "Small World Experiment" on Facebook by attempting to connect to two target profiles via indirect friends.
The second assignment involves writing a Facebook application in PHP that analyzes a user's friend network by displaying metrics like the number of friends in relationships and measures of centrality.
- Color saturation refers to the purity or intensity of a color, with more saturated colors appearing bolder.
- Photoshop's color picker tool allows users to visually see and adjust the saturation level of any color from 0-100%.
- While saturation can enhance images by making colors appear more intense and beautiful, Photoshop's standard saturation tools are limited. This document will explain how to create and use saturation masks to target saturation adjustments precisely.
This document provides instructions for a 4-step programming lab in Perl. Step 1 involves creating a basic script to greet a user and print their initials and name backwards. Step 2 modifies this script to play a guessing game that times the player. Step 3 reads a file and analyzes word counts and frequencies. Step 4 takes username, password, and filename to append an MD5 hashed password to a specified file for a login system. The document provides detailed guidance and hints for completing each step.
This document provides an overview of the objectives, topics, and schedule for a course on Web Technologies and Languages (CS601). The course focuses on learning XHTML, CSS, JavaScript, PHP, and MySQL to create fully functional websites. Over 15 classes, students will learn about XHTML elements, CSS properties, JavaScript and PHP functions, arrays and objects, connecting to databases with PHP and MySQL, and building dynamic websites. Students are required to have introductory programming experience and bring a laptop to each class for in-class assignments. The course grade is based on homework, quizzes, a midterm, and final exam.
This curriculum vitae is for Anandkumar Sahdevbhai Patel from Naranpor, Navsari, Gujarat, India. He obtained a 53.08% score on his SSC exam and is currently pursuing a diploma in Information Technology from GTU. His computer skills include basic internet usage and MS Office programs. He is interested in playing games, reading novels, and traveling.
20 Factsand34 Examples About Social Media Oct09 Christian Palaufotocasa
Â
Conferencia presentada por Christian Palau Sanz, director de Anuntis Inmobiliaria -Fotocasa, Inmogeo, Rexia- en la Online Marketing Expo Barcelona, 29 de octubre de 2009.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on topics like TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using bulletin boards, and includes images related to these topics.
This document discusses modifying sites created by PHP Site Assistant to optimize them for mobile devices. Key points include:
1. Create an alternate mobile.css stylesheet with reduced padding, margins, and font sizes.
2. Add <link> tags to .php pages to reference the mobile stylesheet for handheld browsers and an iPhone-specific stylesheet.
3. Set the iPhone viewport to 320px width.
4. Hide non-essential elements like headers from the mobile versions.
Making these changes allows a single site generated by PHP Site Assistant to effectively support both desktop and mobile browsers.
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
This document outlines steps to create a login and registration form in PHP using OOP. It involves creating a database and table, forms for login and registration, config and database connection files, functions for registration, login, and checking if a user exists. The functions are used in the index.php file. A home.php file is also created that displays username and email after successful login and includes a logout button. Screenshots of the login, registration, and home screens are provided.
This document provides an introduction to PHP sessions. It explains that sessions allow storing and retrieving information about users on the server-side via a session ID cookie, without storing data directly on the user's computer. Every page that uses sessions must call the session_start() function, and session variables are accessed via the global $_SESSION array. Sessions provide a more reliable alternative to cookies for maintaining state across web requests. The document also notes some important best practices for using sessions, such as calling session_start() before any output, and using session_destroy() when logging users out.
This document provides an introduction and overview of PHP. It discusses that PHP is a server-side scripting language used for web development that allows code to be embedded within HTML pages. It can be used to connect to databases, generate dynamic web pages, and interact with forms. The document provides examples of basic PHP syntax like variables, echo, includes, control structures, and functions. It also covers sessions, forms, and using PHP to connect to and query a MySQL database.
This document provides an introduction to getting started with PHP by discussing how to install a web server, writing basic PHP scripts to output text, using PHP variables and arrays, creating PHP functions, and utilizing standard PHP functions. Key topics covered include installing XAMPP on Linux, writing a basic "Hello World" PHP script embedded in HTML, declaring and referencing variables, iterating through arrays with for loops and foreach loops, creating functions that can modify global variables using the global statement, getting user input with fgets from standard input, and examples of common PHP functions like array_push and trim.
PHP and MySQL : Server Side Scripting For Web DevelopmentEdureka!
Â
PHP scripting and MySQL database are one of the worlds most popular open source techniques used to develop websites. Add an advantage of a MVC framework to it and you can develop powerful, dynamic and easy to maintain database driven websites. PHP, MySQL and CakePHP are also platform independent i.e. You can easily port a website developed on a windows machine to a Linux based apache web server with minimal to no changes. The CakePHP MVC architect also adds some additional security against threats like SQL injections, hacking etc.
You can also type a keyword to search online for the video that best fits your document. To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other.
The document provides an overview of Smarty, a widely used PHP templating system. It discusses that Smarty was created by Andrei Zmievski and separates display logic from controller logic for improved security and ease of use. Key features covered include literal tags, modifiers, and capture/cycle functions that allow for powerful templating capabilities. Examples demonstrate how to output variables, format dates, and alternate content display. Resources listed provide more documentation on Smarty syntax and usage.
The document provides an overview of the MVC pattern and how it is implemented in Symfony. It discusses how Symfony separates code into models, views, and controllers and layers these components. It also describes common Symfony structures like modules, actions, and templates as well as tools like parameter holders, constants, and autoloading that are frequently used.
PHP is a server-side scripting language used to create dynamic web pages. It allows embedding PHP code within HTML pages and interacting with databases. Key elements of PHP include variables, control structures, functions, and sessions. Sessions store user data on the server instead of the client to avoid cookies and allow tracking users across multiple pages.
This document discusses PHP global variables and form handling. It explains that $GLOBALS and superglobals like $_GET and $_POST can be accessed from anywhere without special declarations. $_GET collects URL parameters while $_POST collects form data submitted via HTTP POST. GET is generally used for non-sensitive data as its values are visible in the URL, while POST has no data limits and values are embedded in the request body. $_SERVER contains information about server headers, paths, and script locations.
The document discusses form processing in PHP. It describes how PHP processes incoming HTTP requests and places data into global variables like $_GET and $_POST. It covers creating basic forms in HTML and how form data is submitted via GET or POST. It also discusses validating form data on the server side to ensure security and integrity. The document provides examples of using different form field types like text, radio buttons, checkboxes, selects and textareas. It introduces patterns for handling form submissions, like model-view-controller (MVC).
This document provides an overview of PHP arrays, including indexed arrays, associative arrays, and multidimensional arrays. It discusses how to create, access, loop through, and sort arrays in PHP. It also covers PHP global variables like $_SERVER, $_REQUEST, $_POST, $_GET, and $_FILES. The document concludes with an example of exception handling in PHP.
PHP is a server-side scripting language designed for web development, but also used as a general-purpose programming language. Most of the websites are using PHP in their dynamic content
Quick beginner to Lower-Advanced guide/tutorial in PHPSanju Sony Kurian
Â
A Quick beginner to Lower-Advanced tutorial in PHP. Prepared for a session at MEA Perinthalmanna. Covers basic tutorials and concepts and covers some advanced topics.
The document provides an overview of useful PHP functions for including files, validating user input, and creating custom functions. It discusses the include() and require() functions for including external files. It also demonstrates how to validate user input using functions like strlen(), ereg(), and regular expressions. Finally, it shows how to create custom functions to encapsulate repeated blocks of code and handle errors gracefully.
This document summarizes blog hacking techniques from 2004 to 2011. It provides 5 hacks including using a CSS framework for layout and styling, media queries for responsive design, embedding YouTube videos, syntax highlighting for code snippets, and using pubsubhubbub for real-time updates. The document encourages continuing to blog and have fun exploring new methods.
This document provides an introduction to PHP, including:
- PHP is an open source scripting language suited for web development that can be embedded into HTML. Code is placed between <?php ?> tags.
- PHP files are processed by the web server, which returns plain HTML with no PHP code visible. Variables can store and pass different types of data between PHP sections.
- Functions allow common or repetitive tasks to be reused. Popular PHP functions and a large library are available online.
- Form data can be captured with PHP variables like $_POST then inserted into a MySQL database using SQL queries. The data is later retrieved and output dynamically.
- Data validation is important for security. Functions like htmlentities() and mysql
The document provides an overview of using include files and functions in PHP scripts. It discusses:
1) How include files allow common code to be reused across scripts by importing the contents of one file into another.
2) Useful PHP functions like include() and require() for importing files, as well as examples of validating user input with functions like strlen() and regular expressions.
3) How functions allow code to be reused by defining blocks of code that accept parameters and return values, and examples of creating simple functions.
This document provides a help and tutorial for TopStyle Pro version 3.11. It covers getting started with TopStyle, editing style sheets and HTML/XHTML, working with colors, previews, validation, site management, reports, mappings, customization, and third-party integration. It also includes appendices on CSS basics and tips, TopStyle tips and tricks, style sheet resources, keyboard shortcuts, and regular expressions.
TopStyle Help & <b>Tutorial</b>tutorialsruby
Â
This document provides a table of contents for the TopStyle Pro Help & Tutorial, which teaches how to use the TopStyle software for editing style sheets and HTML/XHTML documents. It lists over 50 sections that provide explanations and instructions for features like creating and opening files, editing styles, working with colors, previews, validation, site management, reports and customizing the software. The document was created by Giampaolo Bellavite from the online help provided with TopStyle version 3.11.
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>tutorialsruby
Â
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers for applications and researchers. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
Standardization and Knowledge Transfer â INS0tutorialsruby
Â
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers and a flexible model. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation by defining rules for tags. CSS rules are defined in external style sheets to keep presentation separate from structure and content.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation through rules that target specific XHTML elements.
This document discusses how to create and use external cascading style sheets (CSS) in Dreamweaver. It provides steps to:
1. Open the CSS Styles tab in Dreamweaver and create a new external CSS stylesheet using a sample text style.
2. Save the stylesheet and link it to a new HTML page to style elements like headings, text sizes, and boxes.
3. Edit existing styles by selecting a tag in the CSS Styles panel and modifying properties directly, or by clicking the tag and using the pencil icon to edit in a window. This allows customizing styles globally across all linked pages.
This document provides an overview of how to create and use cascading style sheets (CSS) in Dreamweaver. It describes the different types of style sheets, including external and internal style sheets. It outlines the steps to create an external style sheet in Dreamweaver using the CSS Styles panel and provides instructions for linking the external style sheet to an HTML page. The document demonstrates how to experiment with predefined styles and how to edit, add, and delete styles in the CSS stylesheet.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using the bulletin board for questions.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables adapting appearance for different devices. The document provides examples of using CSS classes to style template elements and explains how to set up a demo system using the included CSS and templates.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables customization of appearance for different devices. The document provides examples of how to apply CSS classes and rules to Corvid template elements to control fonts, colors, positioning and more.
The document provides an introduction to CSS and how it works with HTML to control the presentation and styling of web page content. It explains basic CSS concepts like selectors, properties and values, and how CSS rules are used to target specific HTML elements and style them. Examples are given of common CSS properties and selectors and how they can be used to style elements and format the layout of web pages.
The document introduces CSS and how it works with HTML to separate content from presentation, allowing the styling of web pages through rules that target HTML elements. It explains CSS syntax and various selectors like type, class, ID, and descendant selectors. Examples are provided of how CSS can be used to style properties like color, font, padding, and layout of elements on a page.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
This document provides instructions on using JavaScript to allow website visitors to select different cascading style sheets (CSS) and have their preference remembered via cookies. It discusses linking different types of style sheets, detecting browsers and objects, creating and reading cookies, and programming functions to get the current active style sheet and toggle between them when pages load and unload. Code snippets are provided to implement these functions to enable style sheet selection and remember the user's preference on future page visits.
How information systems are built or acquired puts information, which is what they should be about, in a secondary place. Our language adapted accordingly, and we no longer talk about information systems but applications. Applications evolved in a way to break data into diverse fragments, tightly coupled with applications and expensive to integrate. The result is technical debt, which is re-paid by taking even bigger "loans", resulting in an ever-increasing technical debt. Software engineering and procurement practices work in sync with market forces to maintain this trend. This talk demonstrates how natural this situation is. The question is: can something be done to reverse the trend?
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Â
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Â
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor IvaniukFwdays
Â
At this talk we will discuss DDoS protection tools and best practices, discuss network architectures and what AWS has to offer. Also, we will look into one of the largest DDoS attacks on Ukrainian infrastructure that happened in February 2022. We'll see, what techniques helped to keep the web resources available for Ukrainians and how AWS improved DDoS protection for all customers based on Ukraine experience
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
Â
An English đŹđ§ translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech đ¨đż version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Essentials of Automations: Exploring Attributes & Automation ParametersSafe Software
Â
Building automations in FME Flow can save time, money, and help businesses scale by eliminating data silos and providing data to stakeholders in real-time. One essential component to orchestrating complex automations is the use of attributes & automation parameters (both formerly known as âkeysâ). In fact, itâs unlikely youâll ever build an Automation without using these components, but what exactly are they?
Attributes & automation parameters enable the automation author to pass data values from one automation component to the next. During this webinar, our FME Flow Specialists will cover leveraging the three types of these output attributes & parameters in FME Flow: Event, Custom, and Automation. As a bonus, theyâll also be making use of the Split-Merge Block functionality.
Youâll leave this webinar with a better understanding of how to maximize the potential of automations by making use of attributes & automation parameters, with the ultimate goal of setting your enterprise integration workflows up on autopilot.
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...Jason Yip
Â
The typical problem in product engineering is not bad strategy, so much as âno strategyâ. This leads to confusion, lack of motivation, and incoherent action. The next time you look for a strategy and find an empty space, instead of waiting for it to be filled, I will show you how to fill it in yourself. If youâre wrong, it forces a correction. If youâre right, it helps create focus. Iâll share how Iâve approached this in the past, both what works and lessons for what didnât work so well.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Â
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Â
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
AppSec PNW: Android and iOS Application Security with MobSFAjin Abraham
Â
Mobile Security Framework - MobSF is a free and open source automated mobile application security testing environment designed to help security engineers, researchers, developers, and penetration testers to identify security vulnerabilities, malicious behaviours and privacy concerns in mobile applications using static and dynamic analysis. It supports all the popular mobile application binaries and source code formats built for Android and iOS devices. In addition to automated security assessment, it also offers an interactive testing environment to build and execute scenario based test/fuzz cases against the application.
This talk covers:
Using MobSF for static analysis of mobile applications.
Interactive dynamic security assessment of Android and iOS applications.
Solving Mobile app CTF challenges.
Reverse engineering and runtime analysis of Mobile malware.
How to shift left and integrate MobSF/mobsfscan SAST and DAST in your build pipeline.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Â
Are you ready to revolutionize how you handle data? Join us for a webinar where weâll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, weâll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sourcesâfrom PDF floorplans to web pagesâusing FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether itâs populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
Weâll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
âTemporal Event Neural Networks: A More Efficient Alternative to the Transfor...Edge AI and Vision Alliance
Â
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the âTemporal Event Neural Networks: A More Efficient Alternative to the Transformerâ tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChipâs Akida neuromorphic hardware IP further enhances TENNsâ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
âTemporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Â
Tutorial_4_PHP
1. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
SEG 3560 Introduction to E-Commerce
Tutorial 4 â PHP
PHP Introduction
PHP (Hypertext Preprocessor), unlike Java Script which is a client-side HTML-embedded
script language, is a server-side HTML-embedded script language.
The functions of PHP are exactly the same as CGI. However, CGI is a stand-alone
component, while PHP is embedded inside HTML. More about PHP could be referred to the
official web site: http://www.php.net
PHP Basic
To declare a PHP section within an HTML document, just use the tag â<?â and â?>â and
change the file extension from â.htmlâ (or â.htmâ) to â.phpâ.
Example:
http://www.se.cuhk.edu.hk/~s3560_30/1.php
<html>
<head>
<title>PHP Introduction</title>
</head>
<body>
<?
print("SEG 3560 Introduction to E-Commerce<br>");
print("Tutorial 2<br>");
print("A simple PHP demonstration<br>");
echo "Hello World<br><br>";
?>
</body>
</html>
Page 1
2. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
You could declare the PHP section in anywhere within the whole html document.
Example:
http://www.se.cuhk.edu.hk/~s3560_30/2.php
<html>
<head><title>PHP Introduction</title></head>
<?
print("<body link="#0000FF" vlink="#800080" alink="#FF0000">");
?>
<?
mail('xxx@xx.cuhk.edu.hk', 'Email Heading', 'Dear all, Testing only. By abc');
?>
<p align="center"><img border="0" src="name_1.gif"
width="478" height="86"></p>
<?
print("<p align="center"><font face="Arial">Click
<a href="http://www.se.cuhk.edu.hk/~seg3560">here</a>
to link to the ");
?>
<b><font size="5" color="#FF0000">course web site</font></b>.</font> </p>
</body>
</html>
Page 2
3. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
PHP and Email
To send email using PHP automatically, use the mail function within PHP:
mail(âemail_addressâ, âheadingâ, âbodyâ)
Example:
<?
mail(âabc@se.cuhk.edu.hkâ, âEmail Headingâ, âDear all, Testing only. By abcâ)
?>
Page 3
4. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
Data Types and Variables
Every variable must begin with the symbol â$â. PHP support integer, double, string, and
array.
Example:
http://www.se.cuhk.edu.hk/~s3560_30/3.php
<html>
<head><title>PHP Introduction</title></head>
<?
$course="SEG".'3560'; // string
$code=3450+110; // integer operation
$num[0]=1; // array
$num[1]=2; // array
print("This course is $course $code<br>");
print("This is tutorial $num[1]");
?>
</body>
</html>
Page 4
5. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
Note that in PHP, you do not need to declare the data type. The data type of the variable will
be changed according to what you have stored in it.
Example:
http://www.se.cuhk.edu.hk/~s3560_30/4.php
<html>
<head>
<title>PHP Introduction</title>
</head>
<?
$variable = "SEG 3560"; // initialize $variable to string
print("The value is '$variable' (String)<br>");
$variable = 10; // change it to integer
print("The value is '$variable' (Integer)<br>");
$variable = $variable + 10.1; // change it to double
print("The value is '$variable' (Double)<br>");
$variable = "10.1 php" + $variable; // perform an operation
print("The value is '$variable' (Double)<br>");
?>
</body>
</html>
However, it is a good practice that you do not change the data type of the variable frequently.
Page 5
6. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
PHP and Form
Consider the following form:
http://www.se.cuhk.edu.hk/~s3560_30/form.php
<html>
<head><title>Form</title></head>
<body>
<form method="POST"
action="http://www.se.cuhk.edu.hk/~s3560_30/receive.php">
<p>Username: <input type="text" name="USER" size="20"><br>
Password: <input type="password" name="PSWD" size="20"></p>
<p>I would like to learn:<br>
<input type="checkbox" name="C1" value="Y">PHP
<input type="checkbox" name="C2" value="Y">CGI
<input type="checkbox" name="C3" value="Y">ASP
<input type="checkbox" name="C4" value="Y">JAVA SCRIPT</p>
<p>Sex: <input type="radio" value="B" name="SEX">M
<input type="radio" value="G" name='SEX' checked >F
Year of Study:
<select size='1' name='YR'>
<option>Year 1</option><option>Year 2</option><option>Year 3</option>
</select></p>
Page 6
7. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
<p>Comment about this course:<br>
<textarea rows="3" name="COMMENT" cols="28"></textarea></p>
<p><input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
We could write the following PHP document to perform checking and displaying the result:
Page 7
8. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
<html>
<head><title>Receive The Form</title><head>
<body>
<p><b><u><font face="Arial" color="#FF0000">
You have enter the following information:
</font></u></b></p>
<p><font face="Arial">
<font color="#0000FF"><b>Username: </b></font>
<? print($_REQUEST['USER']); ?>
<br>
<font color="#0000FF"><b>Password: </b></font>
<? print($_REQUEST['PSWD']); ?>
</font></p>
<p><font face="Arial">
You are a
<?
if ($_REQUEST['SEX']=="B")
print("boy");
else
print("girl");
?>
studying in
<? print($_REQUEST['YR']); ?>
</font></p>
<p><font face="Arial">
<b>You want to learn: </b><br>
<?
if ($_REQUEST['C1']=="Y")
print("PHP ");
if ($_REQUEST['C2']=="Y")
print("CGI ");
if ($_REQUEST['C3']=="Y")
print("ASP ");
if ($_REQUEST['C4']=="Y")
print("JAVA SCRIPT");
?>
</font></p>
<p><font face="Arial">
<b>Your comment about the course is: </b><br>
<?
print($_REQUEST['COMMENT']);
?>
</font></p>
</body>
</html>
Page 8
9. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
PHP and Database Connection
In this tutorial, only the connection between PHP and oracle would be discussed. A revision
of SQL language could be found in the supplementary notes1 â SQL in this tutorial.
https://www-ssl.se.cuhk.edu.hk/intranet/tech/web_tech.html#PHP3
1. To initialize the connection:
ora_logon (user_name, password) or die(âConnection Errorâ);
Example:
Suppose we want to connect to the server SE with the username USER and password
PSWD:
<?
/*Set Environment */
putenv("ORACLE_SID=seora.se.cuhk.edu.hk");
putenv("ORACLE_HOME=/usr/local/oracle");
/*Opent the connection*/
$handle = ora_logon('s3560_xx@seora','xxxxxxx') or die ("Connection error");
$cursor = ora_open($handle);
?>
2. To send a query from Sybase through PHP:
ora_parse (link , query);
Example:
Suppose we want to create the following table and input the data:
first_db
course (char) student (int)
'SEG3560' 150
If we want to store information into oracle:
<?
ora_parse($cursor, "create table first_db (course char(10), student int)") ;
ora_parse($cursor, "insert into first_db values('SEG3560', 150)");
?>
Page 9
10. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
3. To view the information retrieved from Sybase through PHP:
ora_fetch (query_information)
Example:
<?
ora_parse($cursor, "select * from first_db");
ora_exec($cursor);
ora_commit($handle);
$numcols = 0;
while(ora_fetch($cursor)){
$numcols = ora_numcols($cursor);
for($column=0; $column < $numcols; $column++){
$data = trim(ora_getcolumn($cursor, $column));
if($data =="") $data = "NULL";
echo"$datat";
}
}
?>
Result:
SEG3560 150
Page 10
11. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
Example:
<html>
<head>
<title>PHP Introduction 123</title>
</head>
<?
/*Set Environment */
putenv("ORACLE_SID=seora.se.cuhk.edu.hk");
putenv("ORACLE_HOME=/usr/local/oracle");
/*Opent the connection*/
$handle = ora_logon('s3560_30@seora','eFuoTyAp') or die ("Connection error");
$cursor = ora_open($handle);
ora_parse($cursor, "create table first_db (course char(10), student int)") or die("Sql 1
error");
ora_parse($cursor, "insert into first_db values('SEG3560', 150)") or die("Sql 2 error");
/* Execute the sql*/
ora_exec($cursor);
ora_commit($handle);
/*Close the connection*/
ora_close($cursor);
echo "Finished all the commands";
?>
</body>
</html>
Create the table âfirst_dbâ and put an instance into the table.
http://www.se.cuhk.edu.hk/~s3560_30/write_db.php
Read the content in the table.
http://www.se.cuhk.edu.hk/~s3560_30/read_db.php
Be careful, the first link will work with sql error,
,
Think why?
Page 11
12. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
Tutorial 4 Supplementary Notes 1 â SQL
Example
Consider the following two tables, student_info and course_info:
student_info
Name (char 20) ID (int) Department (char 3) Supervisor (char 20)
Agnes 00123456 SEM Prof. Cai
Bonnie 00234567 PSY Prof. Chan
Clara 00345678 ECO -
Doris 01234567 SEM Prof. Madan
course_info
Course (char7) Instructor (char 20) Size (int)
SEG3560 Prof. Madan 98
SEG3450 Prof. Madan 84
PSY3230 Prof. Chan 25
Database Manipulation:
1. Create a table:
create table table_name (attribute1 data_type, attribute2 data_type, âŚ)
Example:
create the table course_info:
create table course_info (course char(7), instructor char(20), size int)
2. Remove a table:
drop table table_name
Example:
remove the table course_info:
drop table course_info
Basic Database Access
1. Select Operation:
select attibute1, attribute2, ⌠from table1, table2, ⌠where condition
Example:
Select all courses from the table course_info:
select course from course_info
Select all courses from the table course_info where the class size is greater then 50:
select course from course_info where size>50
Select all courses taught by Professor Madan:
select course from course_info where instructor=âProf. Madanâ
Select all courses offered by SEG:
select course from course_info where course like âSEG%â
Page 12
13. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
Select all students whose supervisor has taught at least one course:
select student_info.name from student_info, course_info
where student_info.supervisor=course_info.supervisor.
Select all records from the table student_info
select * from student_info
2. Insert Operation
insert into table_name values (value1, value2, âŚ)
OR
insert into table_name values (attribute1=value1, attribute2=value2, âŚ)
Example:
Insert the course SEG5010 taught by Professor Yu with class size 25 in the table:
insert into course_info values (âSEG5010â, âProf. Yuâ, 25)
Insert the student Eddie (01345678) studying in ECO:
insert into student_info values (name=âEddieâ, id=01345678, department=âECOâ)
3. Delete Operation
delete from table_name where condition
Example:
Delete all records from the table course_info:
delete from course_info
Delete all students who are studying in ECO:
delete from student_info where department=âECOâ
4. Update Operation:
update table_name set attribute1=value1, attrubute2=value2⌠where condition
Example:
Change the class size of all classes to 40:
update course_info set size=40
Change the class size of the course PSY3230 to 40:
update course_info set size=40 where course=âPSY3230â
Note:
Different databases support different data types. However, some data types are supported by
all databases, such as: integer (int), real number (real) and character (char (n)).
Page 13
14. SEG3560 Introduction to E-Commerce (Fall 2005) Tutorial â Php
Tutorial 4 Supplementary Note 2 â Web Page and Sybase
Creating web pages within SE department
1. Create a directory named /public_html under the root directory of your Unix account.
2. Upload or create all of the necessary files and directories to the directory /public_html
3. Change the access mode to all of the files and directories (as well as the /public_html) to
755 (ownerâfull control of all the file/directory; group and publicâonly could read or
execute the file/directory).
If you are under Unix environment, simply type:
Chmod âR 755 /public_html*
in your root directory
4. You could view your web pages using the following URL:
www.se.cuhk.edu.hk/~XXX
where XXX is your account name.
Page 14