Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,810 members, 7,802,598 topics. Date: Friday, 19 April 2024 at 05:02 PM

Skptricks's Posts

Nairaland Forum / Skptricks's Profile / Skptricks's Posts

(1) (2) (3) (4) (5) (of 5 pages)

Programming / Submit Checkbox Values In Form With Jquery by skptricks: 6:26am On Oct 25, 2017
Complete Details available in link : http://www.skptricks.com/2017/10/submit-checkbox-values-in-form-with-jquery.html

This post explains how to submit checkbox values in Form using JQuery. Also in this tutorial we have provided complete explanation how to get selected checkbox Values/Unique IDs. Based on this values you can perform delete or other operations as per the need.

We have retrieved these Values/Unique IDs using below two methods:
Fetching the Unique values/ID's using JQuery script after that, you can use these ID's in AJAX Code to perform delete operation.
Fetching the Unique values using PHP script, when we submit the FORM by clicking on delete button and afterwards page redirected to "submit.php" page. This page will show selected checkbox Unique values/ID's.

Programming / PHP Session Management With Some Tips by skptricks: 4:39am On Oct 23, 2017
Link : http://www.skptricks.com/2017/10/php-session-management-with-some-tips.html

Now I will share some new concepts about session that you might not heard about it. Check out our blog archive on the topic if you’re looking to learn about PHP Session For State Management.

Why do we need session ?
Sessions are a simple way to store data for individual users against a unique session ID. This can be used to persist state information between page requests.

Programming / Login And Regisatration In Php Using PDO by skptricks: 8:20pm On Oct 20, 2017
Webmasters / PHP Mysql Connection Using PDO by skptricks: 4:22pm On Oct 19, 2017
Today, In this post we will learn how to connect to MySQL using PDO in PHP and just for the information PDO stands for "PHP Data Objects".
Here we will see the some useful examples to perform CURD operations in MySQL database using PDO and also it provides you some information about MySQL Prepared Statement.

Connections to MySQL database can be established by creating instances of the PDO base class and specify the driver, database name, username, and password.
SYNTAX:
$dbConnection = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);

Connection to MySQL Databse Using PDO

Lets see the simple example to establish the database connection to MySQL using PDO.
<?php
$dbhost ="localhost"; // set the hostname
$dbname ="skptricksdemo" ; // set the database name
$dbuser ="root" ; // set the mysql username
$dbpass =""; // set the mysql password


try {
$dbConnection = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);
$dbConnection->exec("set names utf8"wink;
$dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "Connected successfully";
}
catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}

?>

OUTPUT:
----------------------
Connected successfully

Learn more by following below link :
http://www.skptricks.com/2017/10/connections-and-connection-management-using-pdo-mysql.html

Programming / PHP Mysql Connection Using PDO by skptricks: 2:05pm On Oct 19, 2017
Today, In this post we will learn how to connect to MySQL using PDO in PHP and just for the information PDO stands for "PHP Data Objects".
Here we will see the some useful examples to perform CURD operations in MySQL database using PDO and also it provides you some information about MySQL Prepared Statement.

Connections to MySQL database can be established by creating instances of the PDO base class and specify the driver, database name, username, and password.
SYNTAX:
$dbConnection = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);

Connection to MySQL Databse Using PDO

Lets see the simple example to establish the database connection to MySQL using PDO.
<?php
$dbhost ="localhost"; // set the hostname
$dbname ="skptricksdemo" ; // set the database name
$dbuser ="root" ; // set the mysql username
$dbpass =""; // set the mysql password


try {
$dbConnection = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);
$dbConnection->exec("set names utf8"wink;
$dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "Connected successfully";
}
catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}

?>

OUTPUT:
----------------------
Connected successfully

Learn more by following below link :
http://www.skptricks.com/2017/10/connections-and-connection-management-using-pdo-mysql.html

Programming / PHP Cookies For State Management by skptricks: 8:03am On Oct 19, 2017
Link : http://www.skptricks.com/2017/10/php-cookies-for-state-management.html

What is a Cookie?

A cookie is a small file that the server embeds on the client browser. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values.
Note : Cookie is created at server side and saved to client browser.

How to Create Cookies With PHP

We are using setcookie() function to create cookies in client browser machine.
setcookie(name, value, expire, path, domain, secure, httponly);

PHP Create/Retrieve a Cookie
Lets see the below simple example to create the cookie and retrieve the value from cookie.
Note : The setcookie() function must appear BEFORE the <html> tag.
<?php
$cookie_name = "user"; // set the cookie name
$cookie_value = "sumit"; // set the cookie value
// set the expire time for cookie.
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"wink; // 86400 = 1 day
?>
<html>
<body>

<?php
// checking cookie is created or not
if(!isset($_COOKIE[$cookie_name])) {
// display message when cookie is not exist
echo "Cookie named '" . $cookie_name . "' is not set!";
} else {
// it will print value for cookie
echo "Cookie '" . $cookie_name . "' is set!<br>";
echo "Value is: " . $_COOKIE[$cookie_name];
}
?>

</body>
</html>
Programming / PHP Session For State Management by skptricks: 3:38am On Oct 18, 2017
What is a session in PHP?

PHP session is used to store and pass information across multiple page.
PHP session technique is widely used in shopping websites and other secure pages where we need to store and pass important information e.g. username, secure token ,product code, product name, product price etc from one page to another.
PHP session creates unique ID for each browser session to recognize the user and avoid conflict between multiple browsers.
Mostly PHP Session is used in User Login Page.

Where the session is stored in PHP?

A session variable's content is stored on the server, however the session is identified by a session ID which is stored at the client and sent with each request.

For more details :
https:///q3FZ7F
Programming / Simple Tips For PHP File Upload by skptricks: 6:44am On Oct 16, 2017
With the help of php, it is very easy to upload files to the server. PHP file upload features allows you to upload binary and text files both. Depending upon the requirement one can upload single and multiple files through PHP script by modifying the few line of codes.
PHP $_FILES

The PHP global $_FILES contains all the information of file. By the help of $_FILES global, we can get file name, file type, file size, temp file name and errors associated with file.

Lets see the more examples, through which you will learn how to access the $_FILES global.

$_FILES['filename']['name']

It will return the file name

$_FILES['filename']['type']

It will return MIME type of the file.

$_FILES['filename']['size']
It will return size of the file in bytes.

for more description : http://www.skptricks.com/2017/10/php-file-upload-using-post-method.html

Programming / PHP Free Course For Beginners.. by skptricks: 4:12am On Oct 16, 2017
PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. Here you will get basic and advance level concept about php.
www.skptricks.com
www.skptricks.com/p/php.html

If anyone has any queries/questions, I am ready to help you... just do comments your question...

Also you can request a tutorials to me...
Education / Re: PHP Free Course For Beginners. by skptricks: 4:05am On Oct 16, 2017
No. It is not that borning... try to learn android it may refresh your mind toward new concepts...
Education / PHP Free Course For Beginners. by skptricks: 5:28pm On Oct 15, 2017
PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. Here you will get basic and advance level concept about php.
www.skptricks.com
www.skptricks.com/p/php.html
Programming / Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by skptricks: 12:59am On Oct 11, 2017
Jokes Etc / Re: Nigeria Jokes Update With Ofego by skptricks: 6:36pm On Oct 07, 2017
http://www.skptricks.com/p/php.html really it is a cool stuff.
Politics / Re: The Deteriorating Nature Of Mile 2 – Apapa Road by skptricks: 4:00pm On Oct 07, 2017
Road is not good enough. www.skptricks.com
Politics / Re: More Trouble For Nnamdi Kanu As President Buhari Moves To Enforce Forfeiture Of by skptricks: 1:24pm On Oct 07, 2017
www.skptricks.com: Odiegwe undecided undecided undecided
Phones / Re: Whatsapp Finally Creates It's Own Unique Set Of Emojis by skptricks: 1:21pm On Oct 07, 2017
www.skptricks.com: This is a old emoji. please share updated one.

(1) (2) (3) (4) (5) (of 5 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 33
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.