Don't wanna be here? Send us removal request.
Text
PHP (Strings)
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
Strings & Data
A string is a quote of characters – letters, numbers, punctuation, spaces, etc.
“Cooper”
“Beverly Hills Cop”
“2014”
“The 5th of September, 2014”
String Evaluation
PHP Data Types: Strings
To define a string, we will surround our information in single quotes during the assignment.
If you want to use double-quotes within a double-quoted string you must escape them using a backslash.
“I said to her \“hello\” and she smiled”.
Or using single-quotes
You can use single-quotes inside double-quotes, without having to escape:
And vice versa:
We can print variable values inside another string if we use double-quotes:
We can change the value of a variable at any time by reassigning its value:
Concatenation
Concatenation allows you to add strings together. We use the concatenation operator (.) (The Period).
*/
.
.
.
<!–Keep Coding–>
#coding#php#php tutorial#webauthoring#ireland#dublin#griffithcollege#gcd#elearning#student#assignment
0 notes
Text
PHP (Basics)
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
Creating a CodeBlock
Our first PHP Code
Variables and Data Subject to Change
Variables must always begin with a $ followed by a letter.
Always
$name
$_age
$full_name
$war_1984
Never
$10_best_targets
$so-very-invalid
$stalemate
PHP Code Can Go Anywhere
*/
.
.
.
<!–Keep Coding–>
0 notes
Text
Why PHP, Why Now?
/*To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
PHP is a server-side scripting language that has been around since 1997 and has grown into a modern and performant tool for building websites and applications.
Allows execution of code in line with our HTML markup simple reading and processing of files and images Request and Response processing with forms. High performance scales easily.
Starting From Scratch
Example of a simple HTML file:
How it works?
Unlike HTML we cannot just open a PHP file in a browser to test it, PHP needs to be compiled via a PHP interpreter. These are run on a web server we must place our files on a web server, and then view the file via a web browser. PHP files are saved with the extension .php.
The web browser must point to the server, not to the physical location of the file.
We need to have access to a web server. Common web server types include Apache and Windows Servers. We can run a server locally on our own machine (recommended), popular servers include WAMP (Windows), MAMP (Mac OS X).
What is a Variable?
Variables are containers used to temporarily store values. These values can be numbers, text, or more complex data. Think of variables as little boxes in your computer’s memory. You can label these boxes, and then store different things in them, later on, you can retrieve this info, change it or store something else in it.
We can reference information without having to remember what that information is. All we need to know is the name of the variable / where it is stored.
Variables also make our programs infinitely more flexible. Think of your computer as a big calculator. We could write a program for a calculator that said: 4 + 2 =
Every time we ran the calculator we’d get the same result. There would be no way to change the values in the sum, meaning it would be a calculator that could only do one equation. Considering what 4 + 2 actually does… It adds two numbers. What we want in some way of writing that very same program but without knowing what numbers would be added. But what if we gave them Substitute names, such as x and y. We could then re-write our programme as x + y.
We can create as many variables as we like. To do this we declare a variable by naming it, assigning it a value.
*/
.
.
.
<!--Keep Coding-->
0 notes
Text
MySQL and Databases - Part 4
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
Describing Tables
Using DESCRIBE command will show your table looks:
- DESCRIBE students:
Altering Tables
Rename A Table:
ALTER TABLE table_name RENAME new_name;
2. Changing a column’s data type:
ALTER TABLE table_name MODIFY column_name DATATYPE (X);
(where DATATYPE is something like VARCHAR (150) etc).
Altering Columns
Adding a Column:
ALTER TABLE table_name ADD column_name COLUMNTYPE (X);
2. Renaming a Column:
ALTER TABLE table_name CHANGE column_name new_column_name COLUMNTYPE (X);
Deleting Tables
DROP tablename;
Inserting Data.
You can insert data into your table made. It is possible to do it using:
The first method defying the columns to insert the data into, then the values to be inserted. This method you can insert only the column that matter because the columns not mentioned will be given a NULL value:
INSERT INTO tablename (column1, column2, column3) VALUES (value1, value2, value3);
INSERT INTO students (first_name, last_name, email, registration_date) VALUES (“Bob”, “Manning”, “[email protected]”, NOW());
Second method:
INSERT INTO tablename SET
column1 = value1,
column2 = value2,
column3 = value3,
column4 = value4;
INSERT INTO students SET
First_name = “Mark”,
last_name = “Benson”,
email = “[email protected]”,
registration_date = NOW();
* NOW() - Populating the registration_date column with the NOW() function, means the current time and date will be inserted on the server.
* INSERT - Using this method you update all columns, where you must send a value for all columns. If a value is auto incremented you should send in a NULL value.
* SELECTION - The data was inserted and to view it the SELECT command will show it:
SELECT columns FROM table
SELECT first_name, last_name, email FROM students;
Or To select all columns:
SELECT * FROM students;
CONDITIONALS
To limit what rows are returned based on certain criteria, using conditionals such as WHERE.
SELECT columns FROM table WHERE condition(s)
SELECT first_name, last_name, email, FROM students WHERE last_name = “Jones”;
Using AND it is possible to select it with one more criteria:
SELECT * FROM students WHERE last_name = “Jones” AND course_id = 4;
SORTING
Using SELECT query’s results will be in a meaningless order. When the ORDER BY is used the query’s result will be given a meaningful order.
SELECT * FROM table ORDER BY column
SELECT * FROM students ORDER BY last_name;
However, ORDER BY is ascending (ASC), numbers go from small to large, dates go from oldest to latest, and text is alphabetical. It is possible to change it specifying a descending order:
SELECT * FROM table ORDER BY column DESC
Putting it all together
SELECT first_name, last_name, e-mail FROM students WHERE course_id = 2 ORDER BY last_name
Updating DATA
UPDATE table SET column = vaue
UPDATE table SET column = value WHERE column2 = value
UPDATE students SET emauil = “[email protected]” WHERE user_id= 4
Deleting Data
DELETE FROM table WHERE condition
DELETE FROM students WHERE student_id = 6
** This command is one that everyone needs to be more than careful to use it. When TRUNCATE command is used will delete ALL RECORDS:
TRUNCATE TABLE students;
*/
.
.
.
<!–Keep Coding–>
sources: Gemma Deery (Lecture at Griffith College Dublin);
PHP and MySQL for Dynamics Web Sites - fourth Edition, Larry Ullman
0 notes
Text
MySQL and Databases - Part 3
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
In MySQL to create the table we need those commands:
CREATE TABLE tablename (
column1 description,
column2 description,
column3 description,
…
);
Creating a table to hold information about “students”. So, we need to store: a) a unique identifying number; b) their first and last names; c) their email address; d) the date they registered.
First of all, choose suitable names and data types for the columns, and then the unique key will be called: “student_id”. As it will be a number, the correct data type is MEDIUMINT.
Declaring and creating a table (name it + open a block of parenthesis, because all column types will be created inside the brackets):
CREATE TABLE students (
Next declare the first column, starting with the name and then the data type + some extra information, finishing the statement with a comma:
NOT NULL = this indicates that the field cannot be left empty;
AUTO_INCREMENT = this indicates the value of that field will be one higher than the previous record.
After all, we can choose the appropriate column names and datatypes for the rest of the column:
first_name VARCHAR (20) NOT NULL,
To define our primary key we must select one column:
PRIMARY KEY (student_id)
- Putting it all together:
CREATE TABLE students (
student_id MEDIUMINT NOT NULL AUTO_INCREMENT,
first_name VARCHAR (20) NOT NULL,
last_name VARCHAR (50) NOT NULL,
email VARCHAR (60) NOT NULL,
registration_date DATETIME NOT NULL,
PRIMARY KEY (student_id)
);
When you run the codes on the app, you will either see an error or a success message
Query OK, 0 rows affected (0.05 sec) */
.
.
.
<!–Keep Coding–>
sources: Gemma Deery (Lecture at Griffith College Dublin);
PHP and MySQL for Dynamics Web Sites - fourth Edition, Larry Ullman
0 notes
Text
MySQL and Databases - Part 2
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
Tables in SQL have different functionalities between them. It allows an easy data management, where you do not need to create similar tables or tables with a lot of fields.
Tables in a database can be linked, hence Relational Databases:
It means the student Sandy Foster is registered in Web Authoring class. To understand better tables, we have the constraints Primary Key and the Foreign Key.
Primary Key
Each table should have one field that is a Primary Key, this is a unique identifier (typically we use an ID) for each record, and each record must have a unique value for this field. A primary key column cannot Null Values.
The “student_id” column in Students Table is the Primary Key in the Persons Table.
Foreign Key
A Foreign key constraint is used to prevent actions that would destroy links between tables. When one table points to a Primary Key table, we have a Foreign Key, also this constraint prevents invalid data from being inserted into the foreign key column because it has to be one of the values contained in the table it points to.
According to the previous table example, the “student_id” column in the Students Table points to the “student_id” column in the Courses Table.
The “student_id” column in the Courses Table is a Foreign Key in the Courses Table.
Column types
To create tables, we need to understand each type of data the columns will hold.
The primary data types are:
- Strings
If a column is going to hold a String information, we can use the VARCHAR data type. This allows for VARiable length CHARacter string – it can add a length limit.
- Integers
For holding numbers there are various different data types, indeed we can use MEDIUMINT (store numbers -8,388,608 – 8,388,608) – also you can limit the length.
- Dates/Times
To store date and time a record was entered we will use DATETIME.
*Click here to see the full description of column types list*
SQL
MySQL is a database management system that uses SQL (Structured Query Language). This language allows us to manipulate, create, populate, and query databases.
SQL has some definitions into itself:
- DDL – Data Definition Language
This language is used to create tables within a database and populate it with data.
- DML – Data Manipulation Language
This language which is used to query a database.
- DQL – Data Query Language
This language select, show and help statements.
- DCL – Data Control Language
This language grants and revoke statements.
- DTL – Data Transaction Language
This language is used to manage transactions (operations which include more instructions none of which can be executed if one of them fails). */
.
.
.
<!--Keep Coding-->
sources: Gemma Deery (Lecture at Griffith College Dublin);
PHP and MySQL for Dynamics Web Sites - fourth Edition, Larry Ullman
0 notes
Text
MySQL and Databases
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
When you have a dynamic webpage, you will need to have a Database. It works as a repository of information in a structured way, making the webpage useful to the users and to who is programming the webpage. Using Databases you can change, manage, adding information. When the user does the login, sign up, fill a form, those actions are going to be queried based on the information inserted in the database. As a matter of the fact to query information to the webpage, without a database to insert information on the webpage using PHP is not going to be dynamic and it will be static (HTML).
The range of dynamic web pages are bigger than the statics so far, nowadays, there are some software sources RDMS to help programmers such as Oracle, IBM – DB2, dBase, Microsoft SQL Server, MySQL, MariaDB, Firebird, PostgreSQL. However, the open-source MySQL is one of the most used and famous open-source Relational Database Management System (RDMS - is how we describe the software used to create a relational database) in the world. Oracle, DB2, Microsoft SQL Server, they are goods as MySQL and MariaDB, but you need to pay to use the sources. In a relational database, data is stored in the form of tables and the relationship among the data is also sorted in the form of tables.
To clarify what it is a database, it can be explained as a phonebook, where it contains: name, address, phone number. The phonebook is a Table, it contains a Record for each person, and each record contains a field (name, address, number).
Definition of an Entity or Table
Entity or table is a single person, place, or thing about which data can be stored. For instance, when you want to store information about Students, then it has details, like student numbers, names, address, emails, and etc. All these information are placed in the entity or table called Students.
Attributes
It can be explained as the information stored in the existing entity. The attribute has two parts in it namely as Attribute Instance and Attribute type. (Attribute type is the column name or field name that is above the student entity. The student name is the attribute type and the actual value stored in it is the attribute instance).
*PS:
MySQL was developed in the 1990s, owned by Oracle */
.
.
.
<!--Keep Coding-->
sources: Gemma Deery (Lecture at Griffith College Dublin);
PHP and MySQL for Dynamics Web Sites - fourth Edition, Larry Ullman
0 notes
Text
Installing a Local Server for PHP
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
Installing a server on a computer is quite easy to do and quick, and the best part, it's free. You do not worry about it harming your computer in any kind of way.
There are quite a few programs out there you can use to install the server, such as Xammp (it is available for Windows, Linux and MAC), however, another one famous, is the Wamp (Windows), Lamp (Linux) and Mamp (Mac).
To help with the download, check some links that may help you to download a server which suits you best:
Installing Wamp
https://youtu.be/x4HWOocjoz4
Installing Mamp
https://youtu.be/I6sTPp779mA
Installing Lamp
https://youtu.be/vazRx1Ei8VA
Installing Xampp
https://youtu.be/N6ENnaRotmo
https://youtu.be/mXdpCRgR-xE
How to use Wamp or Mamp
https://youtu.be/-U-o8p5PDrY
Installing MySQL (optional)
- Windows
https://youtu.be/WuBcTJnIuzo
- Mac
https://youtu.be/UcpHkYfWarM
- Linux
https://youtu.be/3vz4FltGo0A
When you download the server, you will have access to MySQL on your localhost (on the server: localhost/phpmyadmin), it’s not necessary to download MySQL program, but if you are interested in having the program you can download it use as the same way as the localhost tool. Both paths you can see all your databases and manipulate them.
To log in into MySQL you only need to insert:
- username: root;
- password: (no password).
Using this user you can practice and build your websites normally, however, a golden rule: Never trust users. In that way, you can change the username and the password.
For the next class, we will have some introduction to MySQL where it is essential to your dynamic website. */
<!--Keep Coding-->
0 notes
Text
The Story of PHP
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
In 1990 the World Wild Web was created by Tim Berners-Lee, he was the responsible for the HTTP protocol (has the function of transferring the hypertext, then it allowed us to see the website how it is) + HTML language (creates the website) creation, it. HTML and HTPP work together giving the information to the server and clients. During 4 years that was the only tool available to send the HTML content, to insert photos, images, sounds. There was any other additional interactivity.
The PHP language was created in 1994 when Rasmus Lerdorf - an experienced programmer in C language - created an interface to manage how many people were accessing his website. The first creation was a tool and not a language, where he named it as PHPT (Personal Home Page Tools). The PHPT had some commands inspired by PERL language.
Rasmus created the second version of his tool, where he could manipulate forms and visitors book. The project was renamed by Personal Home Page Forms Interpreter, or, PHP/FI, it becomes popular and spread fast in 1995. The programmer wanted to upgrade his tool, and then he spread his source code CGI (Common Gateway Interface) in 1996, getting new tools as “requiring and collecting information from the database”. In 1997 the METCRAFT (internet statistics company) published around 60.000 websites had some interactive PHP sources with their users. At this point, lots of programmers were interested in that project, among them two Israelis – Zeev Suraski and Andi Gutmans rewrote the PHP from the standard point, where the tool changed becoming a programming language. From 1998 the PHP was growing and then 3.0 version received a new name; PHP: Hypertext Preprocessor. In 1999 was reported that 10% of the websites on the world wild web had PHP on their sites.
In 2000 the 4.0 was created to eliminate all securities issues. While Zeev and Andi were rewriting the core language and changing the language from the zero, almost take the Rasmus project out. After 4 years the PHP 5.0 appeared and at this point, the system was world-wise known. This version had 32 subversions (until 5.6.9 – 14/05/2015), 1000 security updates.
On 03/12/2015 the 7.0 version was created and the last updated - the 7.2.3 - was on 01/03/2018 and remains until now.
*PS:
The mascot of PHP project is an Elephant created by Vincent Pointier in 2001 based on an idea that he had in 1999 for a word that combined elephant with PHP. Therefore he created the word elePHPant. That is the correct name for the PHP mascot that he created. */

.
.
.
<!--Keep Coding-->
sources: PHP classes; CodeNewbie; Curso em Video.
0 notes
Text
Learning PHP
/* To use the PHP you need to know some basic codes/usage from HTML and CSS, otherwise is going to be a little bit difficult to understand PHP***
What is PHP?
PHP stands for Hypertext Preprocessor and essentially what PHP is what we call a back-end programming language or you might call a server-side programming language.
We can do with PHP is make a website more dynamic, because creating a website using HTML and CSS, you will be able to click on links and read about something, where you can also load a video/images in there, but this website is going to be a static website.
Examples using PHP in a webpage:
A website where you can: log in, sign up, user account, forums, post, insert data into the Database, getting information from your Database, and create cookies and sessions…
To create a website using PHP you need a Database, where is used for posting or D storing all those posts and users that might be signing up on the website. It is import to remember if you do not have a database you cannot save any information on your website. To connect the website to the Database you need to use a server-side language.
*** Observation – you can create a website not using the Database.
PHP is the same thing as WordPress is written, also the same as Facebook. PHP for some people can be a little bit difficult to learn because if you know JavaScript, you will see both concepts behind them are very different from HTML/CSS because you need to think about coding in a different way that would with HTML/CSS.
The actual process creating A PHP document when you have to create a document, you need to use sth.php (dot PHP) and you write HTML code, Javascript, jQuery, XML, and a bunch different codes inside of your PHP document/file. */
<!--Keep Coding-->
0 notes
Photo

<!-- Everyone knows how fast and different the software development is from the past compared to now, especially related to the AI (artificial intelligence) and blockchain. The numbers of job opportunities are increasing though. Non-developers and developers know how important those people are for the world. For us, developers, following the new technology changes are essential to be a good developer or at least to be competitive to the business market. Hence, you have to be aware of the advancements in the technology industry and trends that can benefit your business in the future.
Have a look at the top trends will dominate 2019:
Artificial Intelligence (AI)
The AI is one of the tops required digital transformation, taking part in the one of the most successful “partner” in the market. Well-known being the key diver of digital transformation.
Currently, the artificial intelligence industry will reach $1.2 trillion by the end of 2018 (up 70% compared from last year) and until 2022 it will be expected $3.9 trillion.
The expected for artificial intelligence in 2019 is up to 40% of the organizations (especially for home assistance, big data, smartphones, etc) to automate their business.
Blockchain Technology
This technology becomes a trend because of Bitcoin. However, the blockchain is a peer-to-peer network who helps computers storing data or information with much more security and no one can modify or stolen that information stored. Even faster and secure, it can authentication of a large number of transactions, reducing costs to the companies.
Who is most interested in this kind of technology is the healthcare area, it helps them in the supply chain, medical data, organization/administration, and furthermore processes.
Progressive Web Apps
The developers who have skills to PWAs (provide benefits of mobile experience, less complex to develop, and maintain as compared to conventional mobile apps.) will have a vast set of opportunities.
Low-code Development
As faster the technology is going, new enterprise-grade applications are being developed. This trend in 2019 will allows developers to build software without much expertise in coding.
Cybersecurity
At least 18% of the organizations reported some kind of security incident, 67% protecting data loss and leakage, 61% threats to data privacy, and 53% breaches of confidentiality from last year according to Alert Logic research.
Because of the percentage of those accidents is opening new opportunities for a web development companies, where they are looking for who can most protect their data (developers). -->
<!–Keep Coding–>
.
.
.
source: Medium.com by Jessica Williams
(https://medium.com/@Jessicawlm/software-development-trends-in-2018-that-will-dominate-2019-db1a1681c84d)
0 notes
Video
tumblr
<!-- The use of artificial intelligence to generate a web design page new idea
Have a look at the new way of developing your code and create your web page quickly and dynamically
It is usual to see developers racking the computer inserting loads of codes, drinking a huge amount of coffee or tea, however, we (developers) love to see a bunch of codes transforming a blank canvas into a beautiful (not always) webpage.
Sometimes we think how interactive it could be, so if you check the video, it brings how faster a developer could develop a new webpage. The new technique of an artificial intelligence, promotes agility and precision on the codes, avoiding the break codes.
Thinking about the new artificial intelligence, make us think about the directions of a developer can go, or how precise we can afford. Although, the way of coding probably will be not necessary as much from these days, because the code is recorded in some database, and in a case of broken codes, the developer will be able to fix the problems? The other question comes to our minds, could anyone be a developer without any HMTL or PHP knowledge?
Those questions we need to wait to see how far this new technology can go so far, in a meanwhile let’s enjoy this new technologic tool, and see what happens.
As a developer or a passionate about techs, what do think about this new artificial intelligence? Are you ready for it? Are we ready for it? -->
<!--Keep Coding-->
.
.
.
source: IT-Talent Consulting Group
(https://www.facebook.com/ITCGoup)
1 note
·
View note