Presentation is loading. Please wait.

Presentation is loading. Please wait.

10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Easy PHP F Available from -

Similar presentations


Presentation on theme: "10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Easy PHP F Available from -"— Presentation transcript:

1 10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Easy PHP F Available from - http://www.easyphp.org/http://www.easyphp.org/ F Local service on your machine F Works from a data stick. F It provides –An apache web server (already functioning) –MYSQL server (already functioning) –PHP language development environment F Can be added to by ‘Modules’ eg –Content Management System – wordpress –Prestashop – e-commerce site –PHPMyAdmin – MySQl admin system

2 10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing EsyPHP Admin Menu

3 10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing MySQL Admin System

4 10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Code to Access MS ACCESS database <?php $adoCon = new COM("ADODB.Connection"); $sHere = dirname(__FILE__); Try { $adoCon->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$sHere/uidb2.mdb");} catch(Exception $e) { die('Sorry - Problem opening the database. ');} Code to do things goes in here $rsMain->Close(); $rsMain = null; $adoCon->Close(); $adoCon = null; ?>

5 10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Code to access MYSQL file <?PHP //try to connect to the database $con = mysql_connect("127.0.0.1", "test", "pass") or die("Failed to connect to DB, ". mysql_error() ); $tiggerDB = mysql_select_db('modulemanager', $con) or die('Could not find database -die.'); //Insert staff details into staff table try {$tiggerDB =mysql_query("INSERT INTO STAff (Username,Forename,Surname,Password,TelNo,Room) VALUES ('$Username','$Forename','$Surname','$Password','$Telno','$Room')"); } catch(Exception $e) {echo 'Sorry - details not enetered onto database ';} mysql_close($con); header("Location: StaffList.php"); ?>

6 10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Files in..\www\SES F Class lists used by lectures –ClassListForm.htm fires ClassList.php –StudentTimetable.htm fires StudentTimetable.php F Possible Improvements (if you are mad!) –Student online registration form? –Web based group list modification system.


Download ppt "10/09/2015 E.R.Edwards 10/09/2015 Staffordshire University School of Computing Easy PHP F Available from -"

Similar presentations


Ads by Google