WEB (Notes)
WEB (Notes)
HTML tables can have borders of different styles and shapes. How To Add a
Below is a visualization of an HTML page structure: Border
To add a border, use the CSS border property on table, th, and td elements:
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
Example
Tag Description
<input type="file">
HTML Form
<input type="hidden">
An HTML form is used to collect user input. The user input is most often sent to
a server for processing. <input type="image">
The <form> Element <input type="month">
The HTML <form> element is used to create an HTML form for user input: <input type="number">
<form>
. <input type="password">
form elements <input type="radio">
.
</form> <input type="range">
The <form> element is a container for different types of input elements, such
<input type="reset">
as: text fields, checkboxes, radio buttons, submit buttons, etc.
<input type="search">
<input type="submit"> What is CSS?
<input type="text"> CSS describes how HTML elements are to be displayed on screen,
paper, or in other media CSS saves a lot of work. It can control the
<input type="time"> layout of multiple web pages all at once External stylesheets are
<input type="url"> stored in CSS files
Why Use CSS?
<input type="week">
CSS is used to define styles for your web pages, including the design,
Input Type Text layout and variations in display for different devices and screen sizes.
Input Type Button The selector points to the HTML element you want to style.
<input type="button"> defines a button. The declaration block contains one or more declarations separated by
Input Type Color semicolons. Each declaration includes a CSS property name and a value,
The <input type="color"> is used for input fields that should contain a color. separated by a colon.
Depending on browser support, a color picker can show up in the input field. Multiple CSS declarations are separated with semicolons, and
Input Type Date declaration blocks are surrounded by curly braces.
The <input type="date"> is used for input fields that should contain a date.
Depending on browser support, a date picker can show up in the input field. Example
You can also use the min and max attributes to add restrictions to dates Input In this example, all <p> elements will be center-aligned, with a red text color:
Type Email
p {color: red; text-align: center;}
The <input type="email"> is used for input fields that should contain an e-mail
address. Example Explained
p is a selector in CSS (it points to the HTML element you want to style: <p>).
color is a property, and red is the property value
text-align is a property, and center is the property value
What is PHP? Variable names are case-sensitive ($age and $AGE are two different variables)
A variable starts with the $ sign, followed by the name of the variable A A float (floating point number) is a number with a decimal point or a number in
variable name must start with a letter or the underscore character A variable exponential form.
name cannot start with a number
PHP Boolean
A variable name can only contain alpha-numeric characters and underscores
(A-z, 0-9, and _ ) A Boolean represents two possible states: TRUE or FALSE.
PHP Array
error_get_last() Returns the last error that occurred
An array stores multiple values in one single variable.
error_log() Sends an error message to a log, to a file, or to a mail
What is an Array? account
error_reporting() Specifies which errors are reported
An array is a special variable that can hold many values under a single name,
and you can access the values by referring to an index number or name. restore_error_handle Restores the previous error handler
r()
restore_exception_ha Restores the previous exception handler
ndler()
Classes and objects are the two main aspects of object-oriented programming. set_exception_handle Sets a user-defined exception handler function
r()
A class is a template for objects, and an object is an instance of a class.
When the individual objects are created, they inherit all the properties trigger_error() Creates a user-level error message
and behaviors from the class, but each object will have different values
for the properties. user_error() Alias of trigger_error()
A variable of data type NULL is a variable that has no value assigned to it. Value Constant Description
Tip: If a variable is created without a value, it is automatically assigned a value 1 E_ERROR Fatal run-time errors. Errors that cannot be
of NULL. Variables can also be emptied by setting the value to NULL: recovered from. Execution of the script is halted
2 E_WARNING Run-time warnings (non-fatal errors). Execution of
the script is not
halted
PHP Error and Logging Functions 4 E_PARSE Compile-time parse errors. Parse errors should
only be generated by the parser
8 E_NOTICE Run-time notices. The script found something that
might be an
Function Description error, but could also happen when running a script
normally
debug_backtrace() Generates a backtrace 16 E_CORE_ERROR Fatal errors at PHP startup. This is like E_ERROR,
except it is generated by the core of PHP
debug_print_backtrac Prints a backtrace 32 E_CORE_WARNI Non-fatal errors at PHP startup. This is like
e()
NG E_WARNING, except it is generated by the core of
error_clear_last() Clears the last error PHP
64 E_COMPILE_ERR Fatal compile-time errors. This is like E_ERROR, 32767 E_ALL Enable all PHP errors and warnings
OR except it is (except E_STRICT in versions < 5.4)
generated by the Zend Scripting Engine
128 E_COMPILE_WA Non-fatal compile-time errors. This is like
RNING E_WARNING, except it is generated by the Zend
Scripting Engine
What is SQL?
SQL is the standard query language for dealing with Relational Databases. SQL
256 E_USER_ERROR Fatal user-generated error. This is like
is used to insert, search, update, and delete database records.
E_ERROR, except it is generated in PHP
code by using the PHP function The MySQL SELECT Statement
trigger_error()
The SELECT statement is used to select data from a database. The data returned
512 E_USER_WARNING Non-fatal user-generated warning.
is stored in a result table, called the result-set. SELECT * FROM table_name;
This is like E_WARNING, except it is
generated in PHP code by using the The MySQL WHERE Clause
PHP function
The WHERE clause is used to filter records.
trigger_error()
1024 E_USER_NOTICE User-generated notice. This is like It is used to extract only those records that fulfill a specified condition.
E_NOTICE, except it is generated in
SELECT * FROM Customers WHERE Country = 'Mexico';
PHP code by using the PHP function
The MySQL AND, OR and NOT Operators
trigger_error()
2048 E_STRICT Enable to have PHP suggest changes to The WHERE clause can be combined with AND, OR, and NOT operators.
your code which will ensure
the best interoperability and forward The AND and OR operators are used to filter records based on more than one
compatibility of your code (Since PHP 5 condition: The AND operator displays a record if all the conditions separated
but not included in E_ALL until PHP 5.4)
by AND are TRUE. The OR operator displays a record if any of the conditions
4096 E_RECOVERABLE_ERROR Catchable fatal error. Indicates that a
separated by OR is TRUE. The NOT operator displays a record if the
probably dangerous error occurred,
condition(s) is NOT TRUE.
but did not leave the Engine in an
unstable state. If the error is not The MySQL INSERT INTO Statement
caught by a user defined handle, the
The INSERT INTO statement is used to insert new records in a table.
application aborts
as it was an E_ERROR (Since PHP 5.2)
INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1,
8192 E_DEPRECATED Run-time notices. Enable this to
value2, value3, ...);
receive warnings about code that will
not work in future versions (Since
PHP 5.3) What is a NULL Value?
16384 E_USER_DEPRECATED User-generated warning message. This
is like E_DEPRECATED, A field with a NULL value is a field with no value.
except it is generated in PHP code by
using the PHP function trigger_error() If a field in a table is optional, it is possible to insert a new record or
(Since PHP 5.3) update a record without adding a value to this field. Then, the field will
be saved with a NULL value.
Note: A NULL value is different from a zero value or a field that contains
spaces. A field with a NULL value is one that has been left blank during
record creation! Return Value: Returns a stack trace in the form of an array
IS NULL Syntax
Note: Be careful when updating records in a table! Notice the WHERE clause
in the UPDATE statement. The WHERE clause specifies which record(s) that
should be updated. If you omit the WHERE clause, all records in the table will
be updated!
Stack traces contain information about all of the functions that are running at a
given moment. The stack trace provided by this method has information about
the stack at the time that the exception was thrown.
Syntax
$exception->getTrace()
Technical Details