Section 1

Preview this deck

What is a Cookie

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (5)

Section 1

(5 cards)

What is a Cookie

Front

A file saved on your the user device that tracks Web site preferences.

Back

how to Create Cookies With PHP

Front

setcookie(name, value, expire, path, domain, secure, httponly);

Back

How can we get the IP address of the client

Front

$_SERVER["REMOTE_ADDR"];

Back

how to connect to database in php

Front

1. // Create connection $conn = new mysqli($servername, $username, $password, $dbname); 2. // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } 3. //start connection $query = "SELECT id, firstname, lastname FROM MyGuests"; $result = $conn->query($query); 4. //Close the Connection $conn->close();

Back

What's the difference between the include() and require() functions?

Front

They both include a specific file but on require the process exits with a fatal error if the file can't be included, while include statement may still pass and jump to the next step in the execution.

Back