Using Flash with php Very quick introduction to Flash Homework: work on projects.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizards Guide to PHP by David Lash.
Advertisements

Keys, Referential Integrity and PHP One to Many on the Web.
The Web Warrior Guide to Web Design Technologies
1 Chapter 5 – Handling HTML Controls in Web Pages spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science.
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
1 Flash Actionscript Event Handling. 2 Event Handling Right now we know all about variables lets go back to our text input/output example: Suppose we.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
USER INTERACTIONS: FORMS
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
CST JavaScript Validating Form Data with JavaScript.
1 Insert, Update and Delete Queries. 2 Return to you Address Book database. Insert a record.
Slide 8-1 CHAPTER 8 Using Databases with PHP Scripts: Using MySQL Database with PHP.
INTERNET APPLICATION DEVELOPMENT For More visit:
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
Nic Shulver, Retrieving Stored Data Introduction This set of slides shows: The information source database structure The data.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
PHP meets MySQL.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
MySQL. MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multiuser access to a number of databases. A third party.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
Creating Databases for Web Applications Reprise: Systems design (diagrams) Flash to php Homework: Prepare for quiz.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
PHP MySQL Introduction. MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database.
School of Computing and Information Systems CS 371 Web Application Programming PHP – Forms, Cookies, Sessions and Database.
Creating databases for web applications Database datatypes. Creating database Homework: Create tables in database. Add records to database.
1. Connecting database from PHP 2. Sending query 3. Fetching data 4. Persistent connections 5. Best practices.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Website Development with PHP and MySQL Saving Data.
PHP+MySQL Integration. Connecting to databases One of the most common tasks when working with dynamic webpages is connecting to a database which holds.
GEMVC. The Setup Folders Views Value Objects (VOs) Custom Events Service CFCs Controller Model Application Main MXML.
Creating PHPs to Insert, Update, and Delete Data CS 320.
Creating Databases Local storage. join & split Classwork: show 1 table application. Share designs for oscars application. Adaptive select. Homework: [Catch.
Creating Databases applications for the Web Basic HTML review, forms Preview: Server side vs client side Flash HW: Review HTML forms and FLASH examples.
Creating databases for web applications Library. New example: student database. Homework: Complete class example. Catch up on source postings. Do creation.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Enterprise PHP – Reading Data from a DB Reading Data from a relational database in PHP Nic Shulver, FCES, Staffordshire University Using the SQLi interface.
Producing a high-impact web experience by integrate Macromedia Flash and ASP By Katie Tuttle CS 330: Internet Architecture and Programming Project.
Dynamic Flash Images: Increased Functionality and Copy Protection for Online Images Jason W. Nadal.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
PHP and SQL Server: Connection IST2101. Typical web application interaction (php, jsp…) database drivers 2IST210.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
Week 10: HTML Forms HNDIT11062 – Web Development.
Programming Games Reprise: radio buttons. Creating instances at runtime. Buttons. Present your sound or video. Final project assignment. Homework: [Catch.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
Introduction to MySQL Ullman Chapter 4. Introduction MySQL most popular open-source database application Is commonly used with PHP We will learn basics.
Polling Tool Part 2 Action Script and Flash CIS 254.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
PHP and SQL Server: Connection IST 210: Organization of Data IST2101.
Section 10.1 Define scripting
Introduction to Dynamic Web Programming
Session 4 PHP & MySQL.
Section 17.1 Section 17.2 Add an audio file using HTML
ISC440: Web Programming 2 Server-side Scripting PHP 3
Chapter 4 Introduction to MySQL.
HTML Forms What are clients? What are servers?
Presentation transcript:

Using Flash with php Very quick introduction to Flash Homework: work on projects

Challenge want Flash for 'flashy' front end Need server to hold permanent (persistent) information –database! –Flash to/from php

Set up database (table) modification of createfavorites table Also need to put initialize –insert 4 records, with 0 for votescast Write stand-alone php scripts –display results –re-set votescast fields to zero

$fields = "can_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, candidate char(50) NOT NULL, votescast INT NOT NULL"; createtable($tname, $fields); $query = "INSERT INTO votes VALUES (0,'Bush',0)"; $result = mysql_db_query($DBname,$query,$link); $query = "INSERT INTO votes VALUES (0,'Kerry',0)"; $result = mysql_db_query($DBname,$query,$link); $query = "INSERT INTO votes VALUES (0,'Nadar',0)"; $result = mysql_db_query($DBname,$query,$link); $query = "INSERT INTO votes VALUES (0,'Other',0)"; $result = mysql_db_query($DBname,$query,$link); mysql_close($link);

Flash graphics, text fields, components on Stage –Dynamic text fields –Input text fields –radio buttons (grouped) –push button with event handler specified ActionScript –function to respond to push button –function invoked upon return from server script

Flash as front end LoadVars() sets up object to be used for variables to and from server script sendAndLoad is a method of a LoadVars object

Frame Action var connect = new LoadVars(); function gotoserver() { // This Tells the Flash movie What function to invoke when the Load Vars Is complete. connect.onLoad = getback; connect.data = president.getvalue(); connect.sendAndLoad("addtoresults2.php", connect, "POST"); }

Upon return from script function getback() { display.htmlText = connect.display; } where display is the text field. Limited number of HTML tags

Flash to php The variable (data) is passed to the script. Data is passed back by setting &display –considered a property of the connect object

<?php $data= $HTTP_POST_VARS['data']; $host="localhost"; $user="curley"; $password="12345"; $DBname="firstdb"; $link=mysql_connect($host,$user,$password); print "&display="; $query = "UPDATE votes SET votescast = votescast+1 WHERE candidate = '".$data. "'"; $result = mysql_db_query($DBname,$query,$link); $query = "SELECT * FROM votes"; $result = mysql_db_query($DBname,$query,$link); while ($row=mysql_fetch_array($result)) { print " "; print $row["candidate"]; print ": "; print $row["votescast"]; print " "; } ?>

Visit site sharon.ns.purchase.edu/jeanine/flashtest/flashtophp2.html ALSO sharon.ns.purchase.edu/jeanine/flashtest/showvotes.php

Homework PROJECTS! Will post guide to final quiz