Download presentation
Presentation is loading. Please wait.
Published byDelilah Franklin Modified over 9 years ago
1
Technology & Management Club Development Software Overview
2
Summary PHP Server-side scripting language for websites MySQL SQL Database CVS Version and collaboration management
3
Summary - Client Server Model Server Client Request Response
4
Summary - Client Server Model URL Query String (GET Method) http://www.domain.com/somepage.php?name1=val1 &name2=val2&name3=val3… Form Data (POST Method) Consists of all data from form elements on a page, including textboxes, checkboxes, menus, etc. and hidden fields Request
5
Summary - Client Server Model Server has three tasks 1) Accept incoming request 2) Process PHP script 3) Output response (which is just text, usually in the form of HTML)
6
PHP - Examples <?php echo “hello world!”; ?> hello world!
7
PHP - Examples This is an example of PHP <?php echo “embedded”; ?> Inside of HTML. This is an example of PHP embedded in HTML
8
PHP - Examples <?php $sum = 0; for($i = 0; $i <= 5; $i++) { $sum = $sum + $i; } echo “Sum: ”.$sum; ?> Sum: 15
9
PHP - Examples Request: “http://www.foo.com/bar.php ?favorite_color=blue” <?php echo “My favorite color is: ”; echo $_GET[“favorite_color”]; echo “.”; ?> My favorite color is: blue.
10
PHP - Examples <?php function factorial($n) { if($n > 1) return $n * factorial($n - 1); } ?> The factorial of 5 is: <?php echo factorial(5); ?> The factorial of 5 is: 120
11
MySQL - Introduction Structured Query Language MySQL is a free, open-source implementation of a SQL database A database is a collection of tables A table is a collection of rows and columns (also called records and fields) Think of a table as an Excel spreadsheet SQL is a language for manipulating and searching tables in databases
12
MySQL - An Example Data Base UserID_PKUserNamePassword 1jsulkinaaa 2jkinzerbbb BookID_PKTitleDeptID_FK 1Book12 2Book22 DeptID_PKName 1ECE 2Finance
13
MySQL - Examples <?php $conn = mysql_connect($server, $username, $password); mysql_select_db($dbname, $conn); $query = “SELECT * FROM table_name”; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { echo $row[“colname”].” ”; } ?> book1 book2
14
MySQL - Basic Queries SELECT cols FROM table_name WHERE query INSERT INTO table_name (col1, col2, …) VALUES (val1, val2…) UPDATE table_name SET col1=val1, col2=val2, … DELETE FROM table_name WHERE query
15
CVS - Introduction Concurrent Versioning System Two purposes: Allow different people to collaborate on a common set of documents Allow each version of the documents to be saved and recalled
16
CVS - Basics > cd htdocs/ ---before you start coding--- > cvs update -Pd ---after you have verified working code > cvs update -Pd > cvs commit
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.