BUILDING INTERACTIVE & DYNAMIC WEBSITES WEB-O-LUTION
INTRODUCTIO N Chris Ilagan
PROFILE/
Our Beginnings
Our Experience
Sample Work
GETTING STARTED/
The Opportunity Everyday more people are experiencing the web The web has been an indispensable medium for doing business, marketing, connecting, learning, gathering information, etc. Web or being online is the future
Tools and Prog.
ANATOMY OF AN INTERACTIVE & DYNAMIC WEBSITE ANATOMY OF AN INTERACTIVE & DYNAMIC WEBSITE DISCUSSION
Preview
DESIGNING IT FROM SCRATCH DESIGNING IT FROM SCRATCH
ADDING LIFE AND INTELLIGENCE
MAKING YOUR CONTENTS DYNAMIC MAKING YOUR CONTENTS DYNAMIC
WEBSITE {FLASH} HTMLHTML XMLXMLSERVERSERVER
CONTENT MANAGEMENT SYSTEM USING PHP & mySQL Ediboy Ilagan
CMS{FLASH}CMS{FLASH} PHPPHP DATABASE {mySQL} HTMLHTMLXMLXML SERVERSERVER
ACTIONSCRIPT function loginCheck() {myData = new LoadVars();myData.userFromFlash = status_mc.user_txt.text;myData.passFromFlash = status_mc.pass_txt.text;myData.statusToFlash = this.statusToFlash;myData.onLoad = function() { display_txt.htmlText = myData.statusToFlash; index = myData.statusToFlash.indexOf("Login successfully"); if (index == 0){ play(); status_mc._visible=false; }};myData.sendAndLoad("login.php", myData, "POST");}; login.php ACTIONSCRIPT function loginCheck() {myData = new LoadVars();myData.userFromFlash = status_mc.user_txt.text;myData.passFromFlash = status_mc.pass_txt.text;myData.statusToFlash = this.statusToFlash;myData.onLoad = function() { display_txt.htmlText = myData.statusToFlash; index = myData.statusToFlash.indexOf("Login successfully"); if (index == 0){ play(); status_mc._visible=false; }};myData.sendAndLoad("login.php", myData, "POST");}; login.php PHP CODE <?php $link = mysql_connect("cms.database.com", "username", "password"); mysql_select_db("database_name"); $query = "select username and password from users";$result = mysql_query( $query ) or die ("didn't query"); if ($user ==. $line["username"] && $pass ==. $line["password"]){ echo "&statusToFlash=".$successFlash;}else{ echo "&statusToFlash=".$failedFlash;}?> PHP CODE <?php $link = mysql_connect("cms.database.com", "username", "password"); mysql_select_db("database_name"); $query = "select username and password from users";$result = mysql_query( $query ) or die ("didn't query"); if ($user ==. $line["username"] && $pass ==. $line["password"]){ echo "&statusToFlash=".$successFlash;}else{ echo "&statusToFlash=".$failedFlash;}?>
CMSCMS PHPPHP DATABASEDATABASE
ACTIONSCRIPT function updateContent() {myData = new LoadVars();myData.idFromFlash = pageid;myData.contentFromFlash = holdContent;myData.titleFromFlash = title_txt.text;myData.statusToFlash = this.statusToFlash;myData.onLoad = function() { display_txt.htmlText = myData.statusToFlash;};myData.sendAndLoad("update.php", myData, "POST");}; ACTIONSCRIPT PHP CODE <?php $link = mysql_connect("cms.database.com", "username", "password"); mysql_select_db("database_name");$query = "UPDATE profiles SET content='$content',title='$title' where id='$id'";$result = mysql_query( $query );?> PHP CODE <?php $link = mysql_connect("cms.database.com", "username", "password"); mysql_select_db("database_name");$query = "UPDATE profiles SET content='$content',title='$title' where id='$id'";$result = mysql_query( $query );?>
CMSCMS PHPPHP DATABASEDATABASE HTMLHTML
ACTIONSCRIPT function uploadPhoto() {myData = new LoadVars();myData.idFromFlash = photos;myData.statusToFlash = this.statusToFlash;myData.onLoad = function() { display_txt.htmlText = myData.statusToFlash;};myData.sendAndLoad("upload.php", myData, "POST");}; ACTIONSCRIPT PHP CODE <?php $storage = 'images';$uploadfile = "$storage/". basename( $_FILES['Filedata']['name'] );if ( move_uploaded_file( $_FILES['Filedata']['tmp_name'], $uploadfile ) ) { echo( '1 '. $_FILES['Filedata']['name']);}else{ echo( '0');}?> PHP CODE <?php $storage = 'images';$uploadfile = "$storage/". basename( $_FILES['Filedata']['name'] );if ( move_uploaded_file( $_FILES['Filedata']['tmp_name'], $uploadfile ) ) { echo( '1 '. $_FILES['Filedata']['name']);}else{ echo( '0');}?> XML images/boat01.jpg images/bo at02.jpg images/boat03.jpg images/boat01.jpg images/bo at02.jpg images/boat03.jpg XML
CMSCMS PHPPHP DATABASEDATABASE XMLXML SERVERSERVER
ACTIONSCRIPT function addToCalendar() {myData = new LoadVars();myData.dateFromFlash = datePHP;myData.statusToFlash = this.statusToFlash;myData.onLoad = function() { _parent._parent.display_txt.htmlText = myData.statusToFlash; setColor(selDate.dateBG_mc,_color_for_event); selDate.total_events_mc._visible = true; selDate.total_events_mc.theLabel.text = "Booked"; }; myData.sendAndLoad("addtocalendar.php", myData, "POST");}; ACTIONSCRIPT PHP CODE <?php $query = "select * from calendar order by date";$result = mysql_query( $query ) or die ("didn't query");$xml = ' '."\n";$xml.= ' '."\n";while($line = mysql_fetch_assoc($result)) { $xml.= "\n".' '."\n"; $xml.= ' '. $line["date"]. ' '."\n"; $xml.= ' '."\n"; $xml.= ' images/event01.jpg '."\n"; $xml.= ' '."\n"; $xml.= ' '."\n"; $xml.= ' '."\n";}?> PHP CODE <?php $query = "select * from calendar order by date";$result = mysql_query( $query ) or die ("didn't query");$xml = ' '."\n";$xml.= ' '."\n";while($line = mysql_fetch_assoc($result)) { $xml.= "\n".' '."\n"; $xml.= ' '. $line["date"]. ' '."\n"; $xml.= ' '."\n"; $xml.= ' images/event01.jpg '."\n"; $xml.= ' '."\n"; $xml.= ' '."\n"; $xml.= ' '."\n";}?> XML images/event01.jpg images/event01.jpg images/event01.jpg images/event01.jpg images/event01.jpg images/event01.jpg XML
CMSCMS PHPPHP DATABASEDATABASE XMLXML
ACCESSIBILITY Chris Ilagan
WEBSITE {FLASH} HTMLHTML XMLXML SERVERSERVER
DEMO
SUMMARY
Summary The web or an online presence gives us great potentials and opportunities. There are available tool and programs that will help us get started and advance on web development. Creating a website goes beyond what the user sees and experience. There is an amount of logic and dynamic data communication going
Summary A CMS backed by PHP and mySQL makes our website more intelligent, dynamic and extensible. A functional website should also be optimized for search engines like Google and can be properly rendered on mobile devices. In everything you do, you should put your heart on it and enjoy it. Always ask God’s guidance and wisdom!
Q & A
Q and A Give advantages of having an online presence especially for your business.
Q and A Give at least 3 programs or tools used on creating interactive and dynamic websites
Q and A As discussed PHP acts as a __________ between user interface and the database
Q and A What are the sources of dynamic data? Give at least one.
Q and A What is the term used when making your website visible to search engines and mobile phones?
Q and A What does CMS stands for?
Q and A What database is usually used to work with PHP?