This is the SELECT & DELETE commands in postgresql. Show the list of tables and owner. \d See the data of table. SELECT * FROM (table name); Delete a row with condition. DELETE FROM (schema).(table name) WHERE (table name).(column) = '(value)';
Today, I learned about the URL Redirection in PHP. Manual redirect The simpest technique is to ask the visitor to follow a link to the new page, usually using an HTML anchor like: Please follow this link Using server-side scripting for redirection One can use the "header" function: header("HTTP/1.1 301 Moved Permanetly"); header("Location: https://www.example.com/"); exit(); Header() Example:
Today, I learned about the Session and header. Session A Session starts when you launch a website or web app and ends when you leave the website or close your browser window. Session allows you to maintain state information even when cllients disable cookies in their Web browsers. Session cookies contain information that is stored in a temporary memony location Session is known as transient cook..
I made login and sign up page using PHP and MySQL. I skip the entire html code this time. Here is the method to pass the data to php files. Let's take a look at Sign up system first. Sign up I checked the email and password confirm first. For connecting this php file to our database we use the code: require_once("config.php"); So, we call the config.php for connecting current php file to databas..
Check the ubuntu server address and should have "~.pem" file Move to the library have .pem file Using file to enter Ubuntu server hosting on AWS. ssh -i "~.pem" ubuntu@(IP address) Enter Postgresql sudo -u (user) psql See the table [(user)=# \d Also, if you need to revise specific folder and using git. You need to move to the library. cd /var/www/html/ sudo git pull
Today, I learned about the "Cookies." A web application consists of a series of disconnected HTTP requests to a web server. In HTTP, we can pass information using: Query Strings (URL, header) Hidden Form Fields Use Query Strings to Save State Information Seperate individual name = value pairs within the query string using Ap question mark (?) and a query string are automatically appended to the ..
Today, I learned that how to work PHP with SQL. This is the algorithms: Connect to the database. Handle connection errors. Execute the SQL query. Process the results. Free resources and close connection. PDO: PHP data Objects $connectionString = "mysql:host=localhost; dbname=bookcrm"; $user = "testuser"; $pass = "mypassword"; $pdo = new PDO($connectionString, $user, $pass); Normal MySQL: $host =..
Today, I learned SQL. SQL: A table is the principal unit of storage in database. It is a two-dimensional container for data that consists of records (rows); each record has the same number of columns. These columns are called fields, which contain the actual data. Each table will have a primary key -- a field (or sometimes combination of fields) that is used to uniquely identify each record in a..
I learned how to build the object in javascript. This is our constructor for the data input. From the HTML, I got the values from user, and store them in this object. So, I don't have to make other array for store these data. It is important to have this structure in project. Our team decided to put the values in local storage temporaily like this. stringfy function is what I made in the object...
This is the exercise to make a simple number guess game. So, I get the number from html. using $_GET["guess"]. Put the value in $guess. strlen() checks whether user put the number or not. is_numeric() checks whether it is number or not. I set the random number is 55 in this time.