tag:blogger.com,1999:blog-31396325969851664292024-03-05T00:23:45.628-08:00WORLD TRENDS CENTERWORLD TRENDS CENTERJARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.comBlogger106125tag:blogger.com,1999:blog-3139632596985166429.post-18606743669518388152020-01-19T18:09:00.001-08:002020-01-19T18:09:34.841-08:00ANDROID STUDIO APP-DEV | COMPUTE TWO CHECKBOX<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s1600/andr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><span style="background-color: #999999; color: white; font-family: "courier new" , "courier" , monospace;"><img border="0" data-original-height="428" data-original-width="760" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s640/andr.jpg" width="640" /></span></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;">public class MainActivity extends AppCompatActivity {</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> CheckBox menu1,menu2;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> Button order;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> TextView result;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> int Burger,Fries,total;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> @Override</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> protected void onCreate(Bundle savedInstanceState) {</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> super.onCreate(savedInstanceState);</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> setContentView(R.layout.activity_main);</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> menu1 = (findViewById(R.id.apple_id));</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> menu2 = (findViewById(R.id.orange_id));</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> total = (findViewById(R.id.order_id));</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> result = (findViewById(R.id.result_id));</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> order.setOnClickListener(new View.OnClickListener() {</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> @Override</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> public void onClick(View v) {</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> if (menu1.isChecked()) {</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> Burger = 75;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> total();</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> else{</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> Burger = 0;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> total();</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> if (Menu2.isChecked()) {</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> Fries = 45;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> total();</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> else{</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> Fries = 0;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> total();</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> });</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> public void total(){</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> total = Burger + Fries;</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> result.setText(String.valueOf(total));</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;"> }</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: white; font-family: courier new, courier, monospace;"><span style="background-color: #999999;">}</span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-75802208371814715112020-01-19T17:59:00.003-08:002020-01-19T17:59:56.404-08:00ANDROID STUDIO APP-DEV | LOGIN USERNAME & PASSWORD<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s1600/andr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><span style="background-color: #999999; color: white; font-family: Courier New, Courier, monospace;"><img border="0" data-original-height="428" data-original-width="760" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s640/andr.jpg" width="640" /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s1600/andr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><u style="background-color: #999999; color: white; font-family: "Courier New", Courier, monospace;">public class MainActivity extends AppCompatActivity {</u></a></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> </u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> EditText user, pass;</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> Button login;</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> int attempt = 3;</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> @Override</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> protected void onCreate(Bundle savedInstanceState) {</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> super.onCreate(savedInstanceState);</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> setContentView(R.layout.activity_main);</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> pass = (findViewById(R.id.password));</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> user = (findViewById(R.id.username));</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> login = (findViewById(R.id.login));</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> login.setOnClickListener(new View.OnClickListener() {</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> @Override</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> public void onClick(View v) {</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> </u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> if (user.getText().toString().equals("jarm") && pass.getText().toString().equals("121916")){</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> openHome();</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> }</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> else {</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> Toast.makeText(MainActivity.this, "Invalid Account! " + attempt + " attempt left.", Toast.LENGTH_SHORT).show();</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> <span style="white-space: pre;"> </span>attempt--;</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> if (attempt==0){</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> login.setEnabled(false);</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> <span style="white-space: pre;"> </span> Toast.makeText(MainActivity.this, "No more Attempt left. Please try again later.", Toast.LENGTH_SHORT).show();</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> }</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> }</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> }</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> });</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> }</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"><br /></u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> public void openHome(){</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> Intent wtc = new Intent(this, Home.class);</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> startActivity(wtc);</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> }</u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> </u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;"> </u></span></div>
<div style="text-align: left;">
<span style="color: white; font-family: Courier New, Courier, monospace;"><u style="background-color: #999999;">}</u></span></div>
<div style="text-align: left;">
<br /></div>
Gin Floritahttp://www.blogger.com/profile/02200546934055910274noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-4132810701382925772020-01-05T18:52:00.002-08:002020-01-19T18:01:19.505-08:00ANDROID STUDIO APP-DEV | SIMPLE COMPUTATION OF TWO NUMBERS<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s1600/andr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: #666666; color: white;"><img border="0" data-original-height="428" data-original-width="760" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s640/andr.jpg" width="640" /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRCiSAVOdGSCGVfptEt4hYK6VHGTWeBDuHeP1wS3-8QDAHoc06j9hm5AlcW9uKL0e4yfJhlIfxmhJHLYV3RhPOdpBGq2I9CeUOD-g1fTVlF61GOdaQ_qVKGWjt7z4z_ofI5chwyKSu73P/s1600/andr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: #666666; color: white;"><br /></span></a></div>
<pre style="font-family: "courier new"; font-size: 9pt;"><span style="background-color: #666666; color: white;"><span style="font-weight: bold;">public class </span>MainActivity <span style="font-weight: bold;">extends </span>AppCompatActivity {
EditText <span style="font-weight: bold;">num1</span>,<span style="font-weight: bold;">num2</span>;
TextView <span style="font-weight: bold;">result</span>;
Button <span style="font-weight: bold;">add</span>,<span style="font-weight: bold;">sub</span>,<span style="font-weight: bold;">mul</span>,<span style="font-weight: bold;">div</span>;
@Override <span style="font-weight: bold;">protected void </span>onCreate(Bundle savedInstanceState) {
<span style="font-weight: bold;">super</span>.onCreate(savedInstanceState);
setContentView(R.layout.<span style="font-style: italic; font-weight: bold;">activity_main</span>);
<span style="font-weight: bold;">num1 </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">number1</span>);
<span style="font-weight: bold;">num2 </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">number2</span>);
<span style="font-weight: bold;">result </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">myresult</span>);
<span style="font-weight: bold;">add </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">addBtn</span>);
<span style="font-weight: bold;">sub </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">subBtn</span>);
<span style="font-weight: bold;">mul </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">mulBtn</span>);
<span style="font-weight: bold;">div </span>= findViewById(R.id.<span style="font-style: italic; font-weight: bold;">divBtn</span>);
<span style="font-weight: bold;">add</span>.setOnClickListener(<span style="font-weight: bold;">new </span>View.OnClickListener() {
@Override <span style="font-weight: bold;">public void </span>onClick(View v) {
<span style="font-weight: bold;">int </span>a = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num1</span>.getText().toString());
<span style="font-weight: bold;">int </span>b = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num2</span>.getText().toString());
<span style="font-weight: bold;">int </span>sum = a + b;
<span style="font-weight: bold;">result</span>.setText(String.<span style="font-style: italic;">valueOf</span>(sum));
}
});
<span style="font-weight: bold;">sub</span>.setOnClickListener(<span style="font-weight: bold;">new </span>View.OnClickListener() {
@Override <span style="font-weight: bold;">public void </span>onClick(View v) {
<span style="font-weight: bold;">int </span>a = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num1</span>.getText().toString());
<span style="font-weight: bold;">int </span>b = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num2</span>.getText().toString());
<span style="font-weight: bold;">int </span>sub = a - b;
<span style="font-weight: bold;">result</span>.setText(String.<span style="font-style: italic;">valueOf</span>(sub));
}
});
<span style="font-weight: bold;">div</span>.setOnClickListener(<span style="font-weight: bold;">new </span>View.OnClickListener() {
@Override <span style="font-weight: bold;">public void </span>onClick(View v) {
<span style="font-weight: bold;">int </span>a = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num1</span>.getText().toString());
<span style="font-weight: bold;">int </span>b = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num2</span>.getText().toString());
<span style="font-weight: bold;">int </span>quo = a / b;
<span style="font-weight: bold;">result</span>.setText(String.<span style="font-style: italic;">valueOf</span>(quo));
}
});
<span style="font-weight: bold;">mul</span>.setOnClickListener(<span style="font-weight: bold;">new </span>View.OnClickListener() {
@Override <span style="font-weight: bold;">public void </span>onClick(View v) {
<span style="font-weight: bold;">int </span>a = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num1</span>.getText().toString());
<span style="font-weight: bold;">int </span>b = Integer.<span style="font-style: italic;">parseInt</span>(<span style="font-weight: bold;">num2</span>.getText().toString());
<span style="font-weight: bold;">int </span>pro = a * b;
<span style="font-weight: bold;">result</span>.setText(String.<span style="font-style: italic;">valueOf</span>(pro));
}
});
}
}</span></pre>
Gin Floritahttp://www.blogger.com/profile/02200546934055910274noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-42315437070275742692019-11-11T20:47:00.000-08:002019-11-11T20:47:16.644-08:00Download Fanatical Basketball (MOD, unlimited money) free on android<div class="post-body entry-content" style="font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; margin: 0px; padding: 0px 10px 0px 0px;">
<div class="separator" style="clear: both; color: #c5c5c5; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb6AYYqOFuwXWqycPVhY7GtLYz-dWxUegQZq9iBS-nkYwOeRP5yOB3cFwhVhk4q5f-ECKJDg9v_nv6AT6zIlZjjDQ4z58nyF3VO0D9NKeXJcSyJOuDeXPIa3GXK4u9dozLbwZ-aL0Gkhk/s1600/b3.jpg" imageanchor="1" style="clear: left; color: #f5be17; float: left; margin-bottom: 1em; margin-right: 1em; outline: none; text-decoration-line: none;"><img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb6AYYqOFuwXWqycPVhY7GtLYz-dWxUegQZq9iBS-nkYwOeRP5yOB3cFwhVhk4q5f-ECKJDg9v_nv6AT6zIlZjjDQ4z58nyF3VO0D9NKeXJcSyJOuDeXPIa3GXK4u9dozLbwZ-aL0Gkhk/s640/b3.jpg" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; max-width: 100%; padding: 0px;" width="640" /></a></div>
<div class="separator" style="clear: both; color: #c5c5c5; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; color: #c5c5c5; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijnENAWZJd1enE20MtkGfkxm4B4C31vJ3fp1YZdDynccDQMBkC_EA5TqVRvQ9lD1L5pLfuQuLrtBhmM7mIrTWUv0PTn2TWxlGCxpNJtXdG4HoQd7lOM3ZsH-ldvKXt8bTmMJeA27JVimY/s1600/b1.jpg" imageanchor="1" style="clear: left; color: #f5be17; float: left; margin-bottom: 1em; margin-right: 1em; outline: none; text-decoration-line: none;"><img border="0" data-original-height="355" data-original-width="631" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijnENAWZJd1enE20MtkGfkxm4B4C31vJ3fp1YZdDynccDQMBkC_EA5TqVRvQ9lD1L5pLfuQuLrtBhmM7mIrTWUv0PTn2TWxlGCxpNJtXdG4HoQd7lOM3ZsH-ldvKXt8bTmMJeA27JVimY/s640/b1.jpg" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; max-width: 100%; padding: 0px;" width="640" /></a></div>
<br />
<span style="color: red; font-family: "verdana" , sans-serif; font-size: medium;">Fanatical Basketball (MOD, unlimited money)</span><br />
<span style="color: red; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span><span style="font-family: "verdana" , sans-serif;">with this game you can even more learn how to play basketball and learn how to throw in a different ring. Also you can buy different basketball players or the whole team. Participate in the simplest matches to promote the team to the finals.</span><br />
<span style="color: #999999; font-family: "verdana" , sans-serif;"><br /></span>
<div class="separator" style="clear: both; color: #c5c5c5; text-align: center;">
<a href="https://drive.google.com/open?id=1YHo75jNQe-HtLZlyKrbTPjrD6FpYkCag" style="color: #f5be17; outline: none; text-decoration-line: none;" target="_blank"><img border="0" data-original-height="49" data-original-width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNPUChNW9tPmRZjXULA8qIC5ZLwzhZX9zaAZZScSVtVg-nEf-_ANQPYUbQe2WiGRijJ_avhdEZPejIku7FysDn2Vo097ff9aRvdnSxoffu_TjwioBsDfCXhp_sOi_8L_8xZGMHsHhyPyQ/s1600/dw.png" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; max-width: 100%; padding: 0px;" /></a></div>
</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-4027670227251121992019-11-11T20:46:00.000-08:002019-11-11T20:46:05.749-08:00NBA 2K19 [ APK + OBB + Patch ] FREE DOWNLOAD.<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKRB9POkeApU9RMZOr2dERXi09xtKqg18ReONnp9t0TjABj_fVVPtVpQql4rCUjc9rhWKZbgEOnXh7dhDse1rWMoITfdrueeUOP4oOm8kQlcAxq7ZrPQSjsS4B0b_1vdnnPzo2rMWnqA0/s1600/nba2K19_fob_M_xbox_20th.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif;"><img border="0" data-original-height="710" data-original-width="552" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKRB9POkeApU9RMZOr2dERXi09xtKqg18ReONnp9t0TjABj_fVVPtVpQql4rCUjc9rhWKZbgEOnXh7dhDse1rWMoITfdrueeUOP4oOm8kQlcAxq7ZrPQSjsS4B0b_1vdnnPzo2rMWnqA0/s400/nba2K19_fob_M_xbox_20th.jpg" width="310" /></span></a><span style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif;">System Requiments</span></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="background-color: white; color: #444444;">-Minimum of 2GB RA</span><span style="background-color: white; color: #444444;">M.</span></span></div>
<div class="separator" style="clear: both;">
<span style="background-color: white; font-size: 16px;"><span style="color: #444444; font-family: "trebuchet ms" , sans-serif;">-3GB of Free disk space is recommended.</span></span></div>
<div class="separator" style="clear: both;">
<span style="background-color: white; font-size: 16px;"><span style="color: #444444; font-family: "trebuchet ms" , sans-serif;">-GPU - Qualcomm’s Adreno and ARM’s Mali series are the most used GPUs in Android devices, whereas PowerVR Series GPUs are used in almost all the iPhones. Qualcomm Adreno 540 is used in the latest Samsung S8 which is a high end and powerful GPU whereas Qualcomm Adreno 505 is used in Xiaomi Redmi 4 which is a low-end GPU. Most of the high-end Android devices which were released in 2016 and 2017 are powered with Adreno 540 or 530. If you want to know your Android device’s GPU model/details, you can check that by installing an app called CPU Identifier, which will display every detail about your Smartphone.</span></span></div>
<div class="separator" style="clear: both;">
<span style="background-color: white; font-size: 16px;"><span style="color: #444444; font-family: "trebuchet ms" , sans-serif;"><br /></span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br />
<div style="font-size: 16px;">
<span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">-APK - 31MB</span></div>
<div style="font-size: 16px;">
<span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">-Patch - 852MB</span></div>
<div style="font-size: 16px;">
<span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">-OBB - 1.78 GB</span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="background-color: white; color: #444444;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; clear: left; color: #444444; float: left; font-family: "trebuchet ms" , sans-serif; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="675" data-original-width="1200" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBaZM5pDrry2ukSRAlzwfCjSEkPp0pJ-tREuu8xVlwVevKiiQi1PfbjazNPkoIpqZzziT3g09aiAeVbv6Z9IqEHfMs3yVZvgKu0E2tH-bG71pZHaSampAVONhs5YgnexLr-CIeZrdzSPKd/s640/nba.png" width="640" /></span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="background-color: white; color: #444444;"><br /></span></span>
<br />
<div style="box-sizing: border-box; font-size: 1.2em; line-height: 1.5em;">
<span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">The NBA 2K19 20th Anniversary Edition includes the following digital items:</span></div>
<ul style="box-sizing: border-box; font-size: 15.2px; padding-left: 25px;">
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">100,000 Virtual Currency</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">50,000 MyTEAM points</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">20 MyTEAM League Packs (delivered one a week)</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">10 MyTEAM Heat Check Packs (delivered one a week beginning at the start of the NBA season)</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">Sapphire LeBron James and Sapphire Giannis Antetokounmpo MyTEAM cards</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">5 LeBron-themed murals for MyCOURT</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">LeBron MyCOURT design</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">King's Collection - Nike LeBron apparel & footwear (25 pairs!)</span></li>
</ul>
<div style="box-sizing: border-box; font-size: 1.2em; line-height: 1.5em;">
<span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">Physical items include:</span></div>
<ul style="box-sizing: border-box; font-size: 15.2px; padding-left: 25px;">
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">Poster</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">Sticker sheet</span></li>
<li style="box-sizing: border-box; margin-bottom: 0px;"><span style="background-color: white; color: #444444; font-family: "trebuchet ms" , sans-serif;">Wristband</span></li>
</ul>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="background-color: white; color: #444444;"><br /></span><span style="background-color: white;"><br /></span></span><br />
<div class="separator" style="clear: both; font-size: 16px; text-align: center;">
<span style="background-color: white;"><b><span style="color: #444444; font-family: "trebuchet ms" , sans-serif;">Download APK + OBB + Patch</span></b></span></div>
<div class="separator" style="clear: both; color: white; font-size: 16px; text-align: center;">
<a href="https://drive.google.com/open?id=1nQKgrM0tox5ymvClAgQ9LlKLfyfyZM5F" style="background-color: white; color: #0d4857;"><span style="font-family: "trebuchet ms" , sans-serif;"><img border="0" data-original-height="266" data-original-width="679" height="78" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYw-KqI8-36VLaluNkN4dYqt6YM_Et9hLc0_dbcQP_3Nc7LNwAYFif9emXVAVKuaXEtiZKjC-rcY1mrjZvydSl30F66vfmoOOEYGCKi-SqT23yYHuKDHVC6AKa26HDkRAa5jvwKULplork/s200/giphy.gif" style="border: 0px; height: inherit; max-width: 100%;" width="200" /></span></a></div>
<div>
<br /></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-81164989131518337422019-08-21T17:11:00.001-07:002019-08-21T17:11:38.570-07:00How to Convert Website into Android App using Android Studio<div class="wpview wpview-wrap" data-wpview-text="https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAnHWVbK323A" data-wpview-type="embedURL" style="background-color: white; border: 1px solid transparent; box-sizing: border-box; clear: both; color: #222222; cursor: default; font-family: Verdana, Geneva, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 26px; margin: 0px 0px 16px; padding: 0px; position: relative; vertical-align: baseline; width: 695.922px;">
<span class="embed-youtube" style="border: 0px; box-sizing: border-box; display: block; font: inherit; margin: 0px; padding: 0px; text-align: center; vertical-align: baseline;"><iframe allowfullscreen="true" class="youtube-player" height="390" src="https://www.youtube.com/embed/AnHWVbK323A?version=3&rel=1&fs=1&autohide=2&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent" style="border-style: initial; border-width: 0px; box-sizing: border-box; font: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline;" type="text/html" width="100%"></iframe></span><span class="mce-shim" style="border: 0px; bottom: 0px; box-sizing: border-box; font: inherit; left: 0px; margin: 0px; padding: 0px; position: absolute; right: 0px; top: 0px; vertical-align: baseline;"><br /></span><span class="wpview-end" style="border: 0px; box-sizing: border-box; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"></span></div>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 26px; margin: 0px 0px 26px; padding: 0px; vertical-align: baseline;">
<h2 style="border: 0px; box-sizing: border-box; color: #111111; font-family: roboto, sans-serif; font-size: 27px; font-stretch: inherit; font-weight: 400; line-height: 38px; margin: 30px 0px 20px; padding: 0px; position: relative; vertical-align: baseline;">
How to Convert Website into Android Application</h2>
MainActivity.java</div>
<pre class="lang:default decode:true" style="background: rgb(244, 244, 244) !important; border-radius: 0px; border: 1px solid rgb(204, 204, 204) !important; box-sizing: border-box; color: #222222; font-family: "Courier 10 Pitch", Courier, monospace !important; font-size: 12px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 26px; margin-bottom: 1.5em !important; margin-top: 24px; min-height: 1.5em; overflow-wrap: break-word; overflow: auto; padding: 0.3em 0.5em !important; user-select: text; vertical-align: baseline;" title="MainActivity.java">import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
private WebView myWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myWebView = (WebView)findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.loadUrl("http://www.toptipstricks.com");
myWebView.setWebViewClient(new WebViewClient());
}
@Override
public void onBackPressed() {
if(myWebView.canGoBack()){
myWebView.goBack();
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
</pre>
<div style="background-color: white; border: 0px; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 26px; margin: 0px 0px 26px; padding: 0px; vertical-align: baseline;">
AndroidManifest.xml</div>
<pre class="lang:default decode:true" style="background: rgb(244, 244, 244) !important; border-radius: 0px; border: 1px solid rgb(204, 204, 204) !important; box-sizing: border-box; color: #222222; font-family: "Courier 10 Pitch", Courier, monospace !important; font-size: 12px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 26px; margin-bottom: 1.5em !important; margin-top: 24px; min-height: 1.5em; overflow-wrap: break-word; overflow: auto; padding: 0.3em 0.5em !important; user-select: text; vertical-align: baseline;" title="AndroidManifest.xml"><uses-permission android:name="android.permission.INTERNET"></uses-permission></pre>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-59778166407645051912019-08-03T09:16:00.001-07:002019-08-03T09:16:55.867-07:00How to Clean Registry<div class="img_preview" style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYFZFf1KXxaGAgUDerdJ1_4qc_m_F0REPXpuqUn5cuH3CaSCQ322LOnLOpQRsdDCygpzkk8zSx5BFevGpPrM66HTQxezo3O0RwcffP54UKXbVKD8hUPimjOG5Cb4ZvcT_1w23NK52yT__C/s1600/WinReg1-665x.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="411" data-original-width="665" height="394" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYFZFf1KXxaGAgUDerdJ1_4qc_m_F0REPXpuqUn5cuH3CaSCQ322LOnLOpQRsdDCygpzkk8zSx5BFevGpPrM66HTQxezo3O0RwcffP54UKXbVKD8hUPimjOG5Cb4ZvcT_1w23NK52yT__C/s640/WinReg1-665x.png" width="640" /></a></div>
<span style="color: #999999; display: block; font-family: Arial, sans-serif; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; padding: 5px 0px 0px;">How to clean registry</span><br />
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
A while back we've showed you <a href="https://en.freedownloadmanager.org/tutorials/how-to-fix-dll-not-found-errors.html" rel="nofollow noopener" style="color: #0d80bc; outline: 0px; text-decoration-line: none;" target="_blank">how to fix DLL Not Found errors</a>, but that's not the only problem you'll encounter while using Windows. In fact, most of the problems and errors that you have to deal with when using Microsoft's operating system stem from the system registry files. Unfortunately, even experienced users have a hard time dealing with these issues manually, so if you want to learn how to clean the registry, you will need a whole lot of patience or a specialized tool.</div>
<h2 style="background-color: white; clear: both; color: #13324b; font-family: "Open Sans Condensed", sans-serif; font-size: 22px; line-height: 25px; margin: 0px 20px 20px; padding: 0px;">
Using CCleaner</h2>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
The quickest and usually safest way to clean the registry is to use a specialized tool. Of course, like any program, it can have flaws from time to time, but humans make just as many errors and it will save you a lot of time. As far as choosing the right registry cleaning application goes, there are plenty that can do the job, but in my experience I found CCleaner to be one of the best solutions available. The tool does its job very well and it's free, which is equally important. Here's how to use it:</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 1</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Download <a href="https://en.freedownloadmanager.org/Windows-PC/CCleaner-FREE.html" rel="nofollow noopener" style="color: #0d80bc; outline: 0px; text-decoration-line: none;" target="_blank">CCleaner</a>, double-click on the setup file and follow the instructions to install the application on your PC. (Make sure to remove the check mark from the <em>Install Avast antivirus</em> box during the process.)</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 2</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Run the application and click on the <em>Registry</em> button from the left-side pane.</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 3</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Select the registry sections that you want to be verified or leave all the boxes checked and press the <em>Scan for Issues</em> button.</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 4</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Wait for the scan to complete, then select the problems you want to fix or leave them all checked and click on <em>Fix selected Issues</em>.</div>
<div class="img_preview" style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
<strong></strong></div>
<div class="separator" style="clear: both; text-align: center;">
<strong><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlmm4aHf1o5k75Z1vVUWyOzlELCmouPzdXhbhsF203b-MbVGN9kvIky_yFCeIIwiVr7S2oLPo-JUSqgpsEEKkuyK_T8mEvI3ua98o-6CHgZizl0au6FTdXDrAQIHc8C0SDf29w0UVHpbL4/s1600/CCleanerImage.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="619" data-original-width="1000" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlmm4aHf1o5k75Z1vVUWyOzlELCmouPzdXhbhsF203b-MbVGN9kvIky_yFCeIIwiVr7S2oLPo-JUSqgpsEEKkuyK_T8mEvI3ua98o-6CHgZizl0au6FTdXDrAQIHc8C0SDf29w0UVHpbL4/s640/CCleanerImage.png" width="640" /></a></strong></div>
<strong><span style="color: #999999; display: block; font-family: Arial, sans-serif; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal; margin: 0px; padding: 5px 0px 0px;">Using CCleaner</span></strong><br />
<br style="background-color: white; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px;" />
<h2 style="background-color: white; clear: both; color: #13324b; font-family: "Open Sans Condensed", sans-serif; font-size: 22px; line-height: 25px; margin: 0px 20px 20px; padding: 0px;">
Manual cleaning</h2>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
As I said in the beginning, you can also clean the registry by yourself; however, the process isn't only complicated even for advanced users, but also very time-consuming. In case you're interested here's how you can do this:</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 1</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Pres Win + R, on your keyboard type <em>regedit</em> in the box that opens up and hit Enter or the <em>OK</em> button.</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 2</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
This is <strong>very important</strong>: create a backup by going to <em>File</em>--><em>Export</em>, giving a name to your backup file, checking <em>All</em> in the Export range section and clicking on <em>Save</em>.</div>
<div class="img_preview" style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
<strong></strong></div>
<div class="separator" style="clear: both; text-align: center;">
<strong><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJxDFns_k0x1RPXvfYhKX9sOodAOxM-HTZmkyyUfoZAAC_bGIrhsIZTeVIQZ0rHFx9J1HSGOIIbziozMh2i08sy5Pd-05Qo7WGdtAjVGIMRL6zXxCAdSkf9ICNjZZjoFHu4IvlMtAQ0WFa/s1600/RegistryExport.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="619" data-original-width="1000" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJxDFns_k0x1RPXvfYhKX9sOodAOxM-HTZmkyyUfoZAAC_bGIrhsIZTeVIQZ0rHFx9J1HSGOIIbziozMh2i08sy5Pd-05Qo7WGdtAjVGIMRL6zXxCAdSkf9ICNjZZjoFHu4IvlMtAQ0WFa/s640/RegistryExport.png" width="640" /></a></strong></div>
<strong><span style="color: #999999; display: block; font-family: Arial, sans-serif; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal; margin: 0px; padding: 5px 0px 0px;">Backing up your Registry</span></strong><br />
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 3</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Use the left-side pane to navigate to the entries that you want to clean. Leftovers from removed applications are generally located in <em>HKEY_CURRENT_USER</em> --> <em>Software</em>.</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 4</h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
Select the entry you no longer want and press the Delete button on your keyboard.</div>
<h3 style="background-color: white; clear: both; font-family: "Open Sans Condensed", sans-serif; font-size: 24px; font-weight: 100; line-height: 1.2; margin: 0px 20px 20px; padding: 0px;">
Step 5 </h3>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
As an alternative, you can press Ctrl + F and type the name of the item that you're looking for instead of manually scrolling through the registry entries.</div>
<br style="background-color: white; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px;" />
<h2 style="background-color: white; clear: both; color: #13324b; font-family: "Open Sans Condensed", sans-serif; font-size: 22px; line-height: 25px; margin: 0px 20px 20px; padding: 0px;">
Conclusion</h2>
<div style="background-color: white; clear: both; font-family: "Open Sans", "Avenir next condensed", sans-serif; font-size: 15px; margin-bottom: 20px; padding: 0px 20px;">
There you have it, friends, this is how to clean your registry, both manually as well as by using a specialized tool. Now that all is said and done, the question remains: do you prefer using an application like CCleaner or going through the registry entries by hand? Let us know in the comments below.</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-11505448640040761252019-08-02T22:15:00.000-07:002019-08-02T22:15:06.221-07:00BECOME RICH! - How to earn money while studying<h1 class="post-title entry-title" itemprop="headline" style="font-size: 27px; line-height: 36px; margin-top: 0px; text-align: justify;">
<span style="color: red; font-family: "trebuchet ms" , sans-serif;">
How Can Students Make Money Online In 2019?</span></h1>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjewBJOqSnTdHiWDS5q8rnznSeMaDpdVKl_vFSADTA2AlBYB5ts1BiNiUA7agPZB-vIUDJ1tGnT8JWYencLhoIxzzEjDy-8eSo9GJF-vINNgTDyF5oL1MsdpHrHnKWAcr9ddKqMVULhciOD/s1600/a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="796" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjewBJOqSnTdHiWDS5q8rnznSeMaDpdVKl_vFSADTA2AlBYB5ts1BiNiUA7agPZB-vIUDJ1tGnT8JWYencLhoIxzzEjDy-8eSo9GJF-vINNgTDyF5oL1MsdpHrHnKWAcr9ddKqMVULhciOD/s640/a.jpg" width="640" /></a></div>
<div>
<span style="color: #555555; font-family: "helvetica" , "arial"; font-size: 16px; line-height: 1.6em; text-align: justify;"><strong><br /></strong></span></div>
<div>
<span style="color: #555555; font-family: "helvetica" , "arial"; font-size: 16px; line-height: 1.6em; text-align: justify;"><strong><br /></strong></span></div>
<div>
<span style="color: #555555; font-family: "helvetica" , "arial"; font-size: 16px; line-height: 1.6em; text-align: justify;"><strong>I am still a student, I built this site just to finish my professor's activity at school before. Later on, I noticed that I've got a lot of visitors which made me able to earn money with less effort by using only my computer. It made me more interested to pursue on developing this site. I hope you will try too.</strong></span><br />
<a name='more'></a></div>
<div>
</div>
<div class="post-body entry-content" itemprop="description" style="font-family: helvetica, arial; font-size: 16px; line-height: 1.6em; margin: 0px 0px 0.75em;">
<div class="post-soul" id="post-toc">
<div style="text-align: justify;">
<strong><span style="color: orange; font-size: small;">LET'S START WORKING....</span></strong></div>
<div style="color: #555555; text-align: justify;">
<br /></div>
<div style="color: #555555; text-align: justify;">
So you have probably started looking into this part of the internet which holds a treasure trove of never-ending wealth. Well, maybe not never-ending, but some tools that can be used in any way you want and anywhere you want to generate money.</div>
<div style="color: #555555; text-align: justify;">
With the advent of the internet and the subsequent emergence of the digital era, earning online is not as hard as it may seem. Rather, it has become quite mainstream today.</div>
<div class="bluebox" style="background-attachment: initial; background-clip: initial; background-color: #e2f0fc; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(144, 184, 224); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
Furthermore, with large corporations realizing the potential of going digital, it is only natural that today one can find a digital resource for almost anything!</div>
</div>
<div style="color: #555555; text-align: justify;">
Those who are really keen on earning online, can find a plethora of useful resources and mentors who can guide them in the right track. So let us see how you can earn while you study and not worry about going broke!</div>
<div style="color: #555555; text-align: justify;">
<span style="background-color: yellow;"><strong><span style="font-size: medium;">We wont talk nonsense</span></strong>!</span> Before we may start please note that we wont be sharing <strong><span style="background-color: white; color: #666666;">useless ways</span></strong> of making money online. Methods such as <em><strong><span style="font-size: x-small;">filling online surveys, writing reviews, and clicking ads or watching videos</span></strong></em>, only wastes your time and makes no serious income online. Therefore we will talk only the sensible methods that are proven and recommended by professionals online.</div>
<div style="color: #555555; text-align: justify;">
Whether you are a student living in Pakistan, India, Afghanistan, Nepal, Bangladesh or Nigeria. These tips apply to all. Many Pakistani, Indians and Nigerians visit this blog on daily basis and I have crafted the points carfeully so that the payment options could apply to all.</div>
<div class="mbtTOC2" style="background-color: #f9f9f9; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(230, 230, 230); color: #333333; font-family: oswald, arial; line-height: 1.4em; margin: 30px auto; padding: 20px 10px; text-align: justify; width: 483.188px;">
<strong style="background-color: transparent; color: #555555; font-family: helvetica, arial;"><span style="color: #333333; font-size: medium;">Note:</span></strong><span style="background-color: transparent; color: #555555; font-family: "helvetica" , "arial";"> You won't be able to make a sustainable income online without following point </span><a href="http://www.mybloggertricks.com/2017/05/students-make-money-online.html#imptpoint" style="background-color: transparent; color: #289728; font-family: helvetica, arial; outline: none;">number#5</a><span style="background-color: transparent; color: #555555; font-family: "helvetica" , "arial";">.</span></div>
<div style="color: #555555; text-align: justify;">
Following are <strong>Five Popular Ways</strong> Students Can Make Money Online in 2019 and ahead.</div>
<h2 id="point1" style="border-bottom-color: rgb(78, 85, 90); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: rgb(78, 85, 90); border-top-style: dotted; border-top-width: 1px; color: #4e555a; font-size: 22.4px; line-height: 1.3em; margin-bottom: 10px; padding: 3px; text-align: justify;">
1. Creating Your Own Blog</h2>
<div style="color: #555555;">
<img alt="students can make money by creating a Blog" border="0" height="299" src="https://lh3.googleusercontent.com/-LgWHV78FI40/WQnacF38EFI/AAAAAAAARtg/iohDBCywp_s2C-QrFbhYVLDmwzj-XWo0QCHM/image%255B84%255D?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="598" /></div>
<div style="color: #555555; text-align: justify;">
Most of you might already be familiar with <a href="http://www.mybloggertricks.com/2009/12/what-is-blog-and-have-to-create-blog.html" style="color: #289728; outline: none; text-decoration-line: none;">what a blog is</a>. In any case, a blog is simply a dynamic website that contains content related to a certain topic. Such content can include anything from how-to articles to the latest news on tech.</div>
<div class="yellowbox" style="background-attachment: initial; background-clip: initial; background-color: #faffce; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(226, 188, 0); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
<strong><span style="font-size: medium;"></span></strong><strong><span style="font-size: medium;">Read: <a href="http://www.mybloggertricks.com/2011/11/5-major-differences-between-blog-and.html" style="color: #289728; outline: none; text-decoration-line: none;">Difference between a Blog and Website</a></span></strong></div>
</div>
<div style="color: #555555; text-align: justify;">
A simple search on any topic will probably show you dozens of blogs that talk about what you are looking for. In fact, large corporations have their own blogs to engage with their customers and get valuable insights regarding the likes and dislikes of their target market.</div>
<div style="color: #555555; text-align: justify;">
Further research into <a href="http://www.mybloggertricks.com/2012/04/should-you-make-blogging-your-career.html" style="color: #289728; outline: none; text-decoration-line: none;">blogging</a> will reveal how rewarding running a blog can be. A number of examples exist where simple websites turned into multi-million blogs earning their creators fortunes that are beyond our wildest dreams.</div>
<div style="color: #555555; text-align: justify;">
Such blogs include <strong>CNET</strong>, <strong>Techradar</strong>, <strong>Entrepreneur</strong>, <strong>BuzzFeed</strong> and many more. We may have come across them a number of times but we may have never realized how much these are worth. Just to give you a teaser, <strong>BuzzFeed’s </strong>revenue in 2015 was around <span style="color: black;"><strong><span style="background-color: yellow;">USD 167 million</span></strong>.</span></div>
<div style="color: #555555; text-align: justify;">
So coming down to the point. <a href="http://www.mybloggertricks.com/2013/05/make-money-with-blog.html" style="color: #289728; outline: none; text-decoration-line: none;">How can you earn with a blog</a>? Well, there are plenty of ways in which you can do so.</div>
<div class="redbox" style="background-attachment: initial; background-clip: initial; background-color: #fbecec; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(255, 199, 199); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
However, one thing that is worth mentioning here is that there is no such thing as a get rich quick scheme. <a href="http://www.mybloggertricks.com/2013/05/underestimated-ways-money-online.html" style="color: #289728; outline: none; text-decoration-line: none;">Making money online</a> requires a great deal of patience and determination to provide the highest amount of value to your target audience.</div>
</div>
<h3 id="point2" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
CPC ads</h3>
<div style="color: #555555; text-align: justify;">
Back to what we were discussing, a blog earns you money according to the amount of traffic that you get. That is, the more the people read your blog, the more you get paid.</div>
<div style="color: #555555; text-align: justify;">
In order to understand this, you will need to get a grasp of something called <a href="https://support.google.com/adsense/answer/32725?hl=en" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">CPC</a> or <a href="https://en.wikipedia.org/wiki/Pay-per-click" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">PPC</a> ads. CPC and PPC stand for cost per click and pay per click respectively. In order to earn from a blog, you may place CPC ads on your website.</div>
<div class="greenbox" style="background-attachment: initial; background-clip: initial; background-color: #e3fdd7; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(131, 204, 122); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
<strong>These ads are such that each time a reader comes to your blog and clicks on the ad, you get paid.</strong></div>
</div>
<div style="color: #555555; text-align: justify;">
You may use <a href="https://www.google.com/adsense/start/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">Google Adsense</a> which provides you the necessary tools and information on creating such ads. Google automatically chooses the ads that are related to your content and as such, you are saved from going through the trouble of contacting advertisers directly.</div>
<h3 id="point3" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Making advertisers come to you</h3>
<div style="color: #555555; text-align: justify;">
As mentioned earlier, almost every organization today knows the significance of <a href="https://en.wikipedia.org/wiki/Digital_marketing" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">digital marketing</a>. Blogs are one of the most important tools that can allow organizations to reach a vast amount of target audience at the lowest of cost.</div>
<div style="color: #555555; text-align: justify;">
It therefore goes without saying that with time, you are most likely to get requests from advertisers who would want to place their ad on your blog. This can be in the form of a link to their website or simply a <a href="https://en.wikipedia.org/wiki/Web_banner" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">banner ad</a>.</div>
<div style="color: #555555; text-align: justify;">
You may charge them a one-time fee or take monthly payments if running a banner ad. You may also charge for sponsoring an ad.</div>
<h3 id="point4" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Using the blog for your own business</h3>
<div style="color: #555555; text-align: justify;">
A blog does not necessarily have to be only a content delivering medium. Rather, it can serve as a great tool for promoting your own business if you already have one.</div>
<div style="color: #555555; text-align: justify;">
Furthermore, if you are selling physical products, a blog can go a long way in marketing your product effectively to a large audience.</div>
<h3 id="point5" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Example</h3>
<div style="color: #555555; text-align: justify;">
In order to get a better grasp of how blogs make money, here is a pretty good example of a blog targeted toward the photography niche.</div>
<div style="color: #555555;">
<img alt="digital photography school" height="249" src="https://lh4.googleusercontent.com/S-YmHPYZwu8cKluDmmdMC5Ig9v1oHs0qwOHRT9e5CWE68gkp1FrTUYZxlunxY2Tw3AB6Lcm6fwz5Uz9WPc3U1AMB8vWcKGycUU6CwoZvJ6NWWIWetoOFFAaKiWedNGdHdl3H2MG3k4hH9RFF-Q" style="display: block; float: none; margin-left: auto; margin-right: auto; padding: 3px; text-align: justify; transition: all 0.7s ease;" title="" width="500" /></div>
<div style="color: #555555; text-align: justify;">
<a href="https://digital-photography-school.com/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">Digital Photography School</a> is a successful blog created by Darren Rowse, widely known as <strong>Problogger</strong>. The blog has more than 800,000 subscribers and its main sources of income include banner ads, <a href="http://www.mybloggertricks.com/2011/11/why-affiliate-marketing-is-better-than.html" style="color: #289728; outline: none; text-decoration-line: none;">affiliate programs</a>, and e-books.</div>
<div style="color: #555555; text-align: justify;">
As an example, you can see the banner ad promoting Segment. Clicking on the ad will earn the creator a certain amount of money accordingly.</div>
<div style="color: #555555; text-align: justify;">
The important thing to be noted here is that the blog is operating in a very profitable niche which is photography. As a student, if you have an interest in photography, this blog is a perfect example of how you can also create something as big as this.</div>
<h3 id="point6" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Important Tips:</h3>
<div style="color: #555555; text-align: justify;">
So here are some tips that you need to consider before starting your own blog.</div>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Firstly, do as much research as you can. Make yourself aware of the different types of blogs that can be created. Make sure that you know the ins and outs of creating google ads and understand other technical jargon. The best way to learn is nothing but experience.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Therefore, if you are serious about earning online through a blog, now is the time to start experimenting and getting as much information as you can.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Secondly, like any other product or service, a blog is something that provides value to a certain target audience. The value can be in terms of entertainment, news, politics and much more. In our example above, digital photography provides useful tips and resources to interested photographers.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">It is always best to start a blog on something that you are most interested in. This makes sure that you are motivated and that you keep improving your blog.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Thirdly and most importantly, identify your target audience. Based on your interest, do a bit of research on what do people with similar tastes like to read about. The more you understand your target audience, the better the content you can offer.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Lastly, it is crucial that you build your network. Starting a blog is not an easy task. As such, it is never a bad idea to get valuable advice from the experts. There are a number of events and online communities that you can join and get some vital pieces of information and support.</li>
</ul>
<div style="color: #555555; text-align: justify;">
Most importantly, while I was browsing my Facebook timeline, I found a great resource for you if you want to <a href="https://www.bloggingceo.com/how-to-start-a-blog/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">start a blog step by step</a> at wordpress. Although I have always given examples of Bloggers to start with, but I found something great and step by step information to quickly let you understand the process to begin with Wordpress.</div>
<h2 id="point7" style="border-bottom-color: rgb(78, 85, 90); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: rgb(78, 85, 90); border-top-style: dotted; border-top-width: 1px; color: #4e555a; font-size: 22.4px; line-height: 1.3em; margin-bottom: 10px; padding: 3px; text-align: justify;">
2. Freelancing</h2>
<div style="color: #555555;">
<span style="color: #289728; margin-left: auto; margin-right: auto; padding-bottom: 3px; transition-property: all;"><a href="https://en.wikipedia.org/wiki/Freelancer" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank"><img alt="students can make money doing freelancing" border="0" height="324" src="https://lh3.googleusercontent.com/-wmB4s0cU91k/WQnadQm1A1I/AAAAAAAARtk/3mRgkVlzK-UAqQIm6__fOtwl104qeAN1gCHM/image%255B88%255D?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto 8px; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="601" /></a></span></div>
<div style="color: #289728; outline: none; text-align: justify;">
<a href="https://en.wikipedia.org/wiki/Freelancer" style="color: #289728; outline: none;" target="_blank">Freelancing</a><span style="color: #555555;"> as you know is the biggest buzzword for all things online. It is one of the most promising industries of the future. Rather, freelancing is what is shaping the workplace of today.</span></div>
<div style="color: #555555;">
<br /></div>
<div style="color: #555555; text-align: justify;">
As you may already know, freelancing involves working for on-demand projects online anywhere at any time. There is simply no limit to the amount of work you can take and earn.</div>
<div class="bluebox" style="background-attachment: initial; background-clip: initial; background-color: #e2f0fc; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(144, 184, 224); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
Essentially, freelancing is a vast term that involves any sort of work that can be done online or offline without being associated with any sort of official organization.<strong> In simple terms, when you are a freelancer, you are your own boss!</strong></div>
</div>
<h3 id="point8" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
How does freelancing work?</h3>
<div style="color: #555555; text-align: justify;">
Understanding how to freelance is not something difficult. All you need to do is to choose what kind of work you want to do and then sign up on a <a href="http://www.mybloggertricks.com/2012/06/10-best-websites-you-must-join-to-work.html" style="color: #289728; outline: none; text-decoration-line: none;">freelancing platform</a>to get various types of projects related to your profession.</div>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">So for instance, you can be a freelance writer, writing for web content, scripts, articles, stories etc. There is simply an innumerable amount of niches that you can target for delivering your writing services.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">You may choose to become a freelance designer in which case you would be selling your services in terms of designing logos, banners and user interfaces for various clients. This can be quite rewarding as good designers are always in high demand.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Another way to earn is to become a freelance web developer. This is perhaps the most lucrative way of earning online as the market for web developers seems to be growing exponentially. There are simply millions of people who want compelling websites to be built for their businesses.</li>
</ul>
<div style="color: #555555; text-align: justify;">
In fact, there are entire organizations that offer web development services to clients through the web by working online.</div>
<h3 id="point9" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
How to get started?</h3>
<div style="color: #555555; text-align: justify;">
In order to get started, you will firstly need to set up an account on any number of freelancing platforms that you would like to work on. Such platforms allow you to connect to the relevant clients who may be looking for your services.</div>
<div class="bluebox" style="background-attachment: initial; background-clip: initial; background-color: #e2f0fc; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(144, 184, 224); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
<strong>Some of the platforms include, freelance.com, fiverr, upwork, ODesk, and many more.</strong> Freelance.com is quite a popular website where you can get a number of clients for various types of projects.</div>
</div>
<div style="color: #555555; text-align: justify;">
Nevertheless, being popular, it should not come as a surprise that freelance.com will give you a tough competition as there are millions of other freelancers who are competing for jobs.</div>
<div style="color: #555555; text-align: justify;">
The problem is, that many platforms work by you setting up an account and putting in your details such as your skills, your payment methods etc. Once that is done, you will then have to bid for projects that you want.</div>
<div style="color: #555555; text-align: justify;">
For instance, if you want projects related to writing, you will need to post bids for the various projects that are listed. As such, the best bids are the ones that get selected.</div>
<div class="redbox" style="background-attachment: initial; background-clip: initial; background-color: #fbecec; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(255, 199, 199); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
In order to stand out, you will need to start off by charging only a little. This may be quite demotivating; however, with time, as your ratings grow and reviews are built, your profile will become more visible to the clients on whose projects you have placed a bid for.</div>
</div>
<h3 id="point10" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Example</h3>
<div style="color: #555555; text-align: justify;">
According to a survey done by The Freelancer, the median amount of income earned by freelancers was between $10,000 - $20,000 annually. The chart below shows the results for all the freelancers surveyed.</div>
<div style="color: #555555; text-align: justify;">
<img alt="Freelance Income" height="288" src="https://lh4.googleusercontent.com/UHU2T6Ce_UF9iJQSMAZjvtuN7ZHZzsCXoFUqwPUqe-ESVkEK8GCPxN3w1VyeqWZldkOHO-Vjc0u74KKtnGVNWrwCGtWgxdzWnlaaXOnuobRA_AmqdV1wVUBUnLypghB62SXxkZkvyyPWtkJRyw" style="padding: 3px; transition: all 0.7s ease;" title="" width="583" /></div>
<div style="color: #555555; text-align: justify;">
As mentioned earlier, freelancing is not a get-rich-quick scheme. Rather, it takes a considerable amount of time to reach to a level where one can do freelancing as a career.</div>
<div style="color: #555555; text-align: justify;">
Nevertheless, for a student, freelancing is a great way to earn some extra cash. As an example, one may earn through Fiverr – a well-known freelancing platform where you can offer your services, called gigs, starting from $5.</div>
<div style="color: #555555; text-align: justify;">
<img alt="Freelancing revenue scope" height="342" src="https://lh4.googleusercontent.com/lnRuNyH5oLbOhG9tX9a4IMJltc8lcbtOTStG7xsoU_m0504sQWMRRIOsgNTTWnYhGV9jT0zpQJEkNFMBaYrMYCthNzx9d5agSJExAHNQOVT5foo6bcF0tRWqwg_KBOKhgvJWawgLCiuEa_Q5uA" style="padding: 3px; transition: all 0.7s ease;" title="" width="624" /></div>
<div style="color: #555555; text-align: justify;">
This is a Fiverr Revenues dashboard showing earnings in terms of revenues. As you can see, earnings are quite impressive with $10,340 earned in revenues. This is definitely not a bad gig for a student.</div>
<div style="color: #555555; text-align: justify;">
You can check out<strong> </strong><a href="http://www.smartearningmethods.com/fiverr-gigs-ideas/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank"><strong>20 Fiverr gigs ideas to sell in 2018</strong></a> and can select the best possible gigs for yourself to get started with Fiverr.</div>
<h3 id="point11" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Important tips:</h3>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Earning from freelance work takes time. There area great deal of freelancers on various platforms who are competing ever more vigorously for projects. However, this does not mean that you cannot make it to the top.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;"><strong>Freelancing is the same as running a business.</strong> The only difference is that you yourself are the entire company. As such, like any other business, you will need to build your credibility among the freelance community.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">One thing that needs to be noted here is that most of the work given on freelance is based on a high amount of trust. This is quite obvious since clients from all over the world are hiring freelancers who are in completely different locations.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">As such, building trust should be your main priority when choosing to freelance. In order to do so, you will need to make sure that you deliver the work on time and with the highest quality. Good quality work never goes underappreciated.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Furthermore,<strong> no business can survive without a reasonable amount of investment</strong>. Therefore, if you choose to freelance, be prepared to make some amount of investment in order to build your repute.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Such investments can be in the form of paying for certain aptitude tests available for a certain price. For instance, if you are a freelance web developer, having passed a series of tests related to HTML, CSS and other programming languages will add greatly to your profile.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Clients are more willing to give projects to freelancers who have such certifications as it shows that you are credible and can be relied upon.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">In addition, you need to make sure that you have set up a proper online payment system. Freelance platforms require you to choose a payment method through which you can send and receive payments.</li>
</ul>
<h3 id="point12" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Payment Solutions</h3>
<div class="bluebox" style="background-attachment: initial; background-clip: initial; background-color: #e2f0fc; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(144, 184, 224); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
Payment methods may include PayPal, Payoneer, Skrill etc. Setting up a verified payment method is the most essential factor in winning the trust of the clients.</div>
</div>
<div style="color: #555555; text-align: justify;">
Lastly, keep yourself connected with other fellow freelancers. Just like blogging communities, freelance communities can give you some much needed advice and support in your freelancing endeavors.</div>
<div style="color: #555555; text-align: justify;">
You may join communities that are related to your own profession. For instance, a number of online forums exist which are solely dedicated to freelance writers. This way you can keep yourself updated with the latest trends going on the industry as well.</div>
<div style="color: #555555; text-align: justify;">
Freelancing can be a great career choice. It all depends on how much willing you are to keep on working as a freelancer and continue developing your profile.</div>
<div style="color: #555555; text-align: justify;">
Just like a blog, earning from freelance work is time-consuming and can be quite frustrating; however, it is all worth it in the end.</div>
<h2 id="point13" style="border-bottom-color: rgb(78, 85, 90); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: rgb(78, 85, 90); border-top-style: dotted; border-top-width: 1px; color: #4e555a; font-size: 22.4px; line-height: 1.3em; margin-bottom: 10px; padding: 3px; text-align: justify;">
3. Writing EBooks</h2>
<div style="color: #555555;">
<img alt="students can make money by writing ebooks" border="0" height="299" src="https://lh3.googleusercontent.com/-ZaU9OKPUfwQ/WQnaeh9Q8MI/AAAAAAAARto/4ODmO-N0sl4Em-luoshMvf32OC9jmnzSwCHM/image%255B57%255D?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto 5px; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="603" /></div>
<div style="color: #555555; text-align: justify;">
This option can pay off very well if you have a serious knack for writing. Whether it is a how-to guide, a fictional novel or anything else, the possibilities are endless. However, in order to be successful, you will need to expend a great amount of effort.</div>
<div style="color: #555555;">
<br /></div>
<div style="color: #555555; text-align: justify;">
<span style="font-size: medium;"><strong>Read:</strong> </span><a href="http://www.mybloggertricks.com/2011/11/make-ebook-beginners-guide-to-pdf-ebook.html" style="color: #289728; outline: none; text-decoration-line: none;"><span style="font-size: medium;">Make an eBook: Beginners Guide To PDF eBook Building</span></a></div>
<div style="color: #555555; text-align: justify;">
For a student, writing an EBook may prove to be a bit difficult since it is hard to spare so much of time while studying. Nevertheless, it is something worth trying while on holidays when students have plenty of time to do whatever they like.</div>
<div style="color: #555555; text-align: justify;">
With so many online resources available, publishing EBooks have become incredibly easy. You can sell your EBooks through <a href="https://kdp.amazon.com/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">Amazon’s Kindle Program</a> or through <a href="https://itunesconnect.apple.com/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">Apple’s iTunes Connect</a>. All you need to do is sign up and publish your book at almost negligible cost.</div>
<h3 id="point14" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
So how does it work?</h3>
<div style="color: #555555; text-align: justify;">
Essentially, Amazon has a system through which you earn a specific percentage of the price. That is, if you price your book between US $1.83 and US $8.60, you will get <strong>70% of the price as royalty</strong> and 35% for $0.92.</div>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">To upload your book on Amazon, you will need to write a short description of what the book is about. This is the first thing that your readers will see when looking at your book. As such, make sure your description is compelling enough to make the potential reader buy your book.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">After uploading your book and publishing it, you will need to wait for 24 hours before your book gets available on the online store for people to buy.</li>
</ul>
<h3 id="point15" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Marketing</h3>
<div style="color: #555555; text-align: justify;">
Writing and publishing an EBook may be time-consuming and require a lot of effort. However, it is nothing compared to the time and effort you need to spend on marketing your work. After all, getting your book noticed in a crowd of billions of others is far from easy.</div>
<div style="color: #555555; text-align: justify;">
One way to get started with your marketing is to use your social media contacts to spread awareness. You can create a Facebook page to attract the relevant type of target audience. You may use <strong>Goodreads.com </strong>as well which is a website specially dedicated to readers of all kinds.</div>
<div class="redbox" style="background-attachment: initial; background-clip: initial; background-color: #fbecec; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(255, 199, 199); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
As with other marketing efforts, knowing your target audience is of utmost importance. You cannot sell a fictional novel to those who like reading about technical topics. As such, you need to strategize your marketing efforts accordingly.</div>
</div>
<div style="color: #555555; text-align: justify;">
You may do so by having someone create a landing page for your book or you may create one yourself. You can easily create a blog using WordPress for only a little amount of money and use it to provide relevant content to your target audience.</div>
<h3 id="point16" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Examples</h3>
<div style="color: #555555; text-align: justify;">
Earnings from e-books can vary significantly. However, below is a real earnings chart for books published on Amazon.</div>
<div style="color: #555555; text-align: justify;">
<a href="http://diseasecalleddebt.com/how-much-money-can-you-make-from-ebooks/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank"><img alt="earning charts for books published on amazon" height="323" src="https://lh5.googleusercontent.com/JCSlNss4pCObyH2hbblNhGxyFJmudSfxK8GL93QLF9P2ujK_d0pcno3XlVFGi7dlERdAEZ4OVahfE_jeZfq198VQN1SFfNdxPW8kU57FeKzM_Z_6_IXeNNy9YGHet1NLMU38K5hDXdCN9exWBQ" style="border-width: 0px; padding: 3px; transition: all 0.7s ease;" title="" width="624" /></a></div>
<div style="color: #555555; text-align: justify;">
<br /></div>
<div style="color: #555555; text-align: justify;">
On average, the E-books have made <strong>USD 224</strong> just in the month of February. As you can see, this is plenty for a student.</div>
<h3 id="point17" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Important Tips:</h3>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">One thing that needs to be kept in mind is that no matter how cheap the book is or how well you market it, it is not going to earn you enough if the <strong>content of the book</strong> itself is not up to the standards of your target audience.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">As such, make sure you clearly understand what you write. A good way to start is writing a draft outline of the entire book. You may then <strong>split the book into chapters</strong> accordingly and build upon your outline.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">This will make sure that you have a clear idea of what you are going to write. Furthermore, it is essential that you do your <strong>research thoroughly</strong>. In particular, if you are writing on a technical topic, a good amount of research is necessary in order to build credibility.</li>
</ul>
<h2 id="point18" style="border-bottom-color: rgb(78, 85, 90); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: rgb(78, 85, 90); border-top-style: dotted; border-top-width: 1px; color: #4e555a; font-size: 22.4px; line-height: 1.3em; margin-bottom: 10px; padding: 3px; text-align: justify;">
4. Affiliate Marketing</h2>
<div style="color: #555555;">
<img alt="students can make money doing Affiliate Marketing" border="0" height="348" src="https://lh3.googleusercontent.com/-kOBzWfYp5KQ/WQnafeTZUCI/AAAAAAAARts/M-52w9kHYi0Wm7tzvHDLlei5jeoJsi3PQCHM/image%255B103%255D?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="596" /></div>
<div style="color: #555555; text-align: justify;">
If nothing else works, then <a href="https://en.wikipedia.org/wiki/Affiliate_marketing" style="color: #289728; outline: none;" target="_blank">affiliate marketing</a> is the way to go. Essentially, as an affiliate marketer, you act as a middleman between the provider of the product and the target audience for that product.</div>
<div style="color: #555555;">
<br /></div>
<div style="color: #555555; text-align: justify;">
In simple terms, if you sign up as an affiliate for a certain product, you will be selling the product through the web using various marketing techniques. Each time the product is sold, you will get paid a certain amount of commission.</div>
<div style="color: #555555; text-align: justify;">
<strong>Need Motivation</strong> from a developing country like Pakistan?</div>
<div style="color: #555555;">
<img alt="luqman khan of 10beasts" border="0" height="451" src="https://lh3.googleusercontent.com/-tUEwMlMiSb8/WQspPPHqN7I/AAAAAAAARuk/6XGeuQQcH28MvrLmZDOBKSHYaOvJeJX8gCHM/image%255B11%255D?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="604" /></div>
<div style="color: #555555; text-align: justify;">
This talented guy plus student from Lahore, called "<strong>Luqman Khan</strong>" sitting on my office chair makes on average <strong><span style="color: green; font-size: medium;">$40,000 a month</span></strong> in Amazon affiliate sales from his website <a href="http://10beasts.com/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">10beasts.com</a> mashAllah! <strong>If he can do that, then why can't you?</strong></div>
<div style="color: #555555; text-align: justify;">
People love copying others without putting their own efforts. Yes some succeed in copying copyrights of others but neither do they succeed in their long term goals nor receives respect in the eyes of internet community.</div>
<div style="color: #555555; text-align: justify;">
Be unique and creative always. No one has equal thinking abilities. Everyone is unique and creative based on his God gifted potentials. So utilize your God gifted skills, polish them and present to the world something that you could solely own at the end of the day. <strong>Become the first You!</strong></div>
<h3 id="point19" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
How does it work?</h3>
<div style="color: #555555;">
<br /></div>
<div style="color: #555555; text-align: justify;">
Affiliate marketing works by online sellers allowing you to sell their products through their affiliate program.</div>
<div style="color: #555555;">
<img alt="how affiliate marketing works" border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM35lFhvd2IxA4TOHNGifDe5QSE2fLpEWcgpHK0qiQ5t6WCO1v9XigMGBzSFKttdW0Ak2pkZkuYl2Jcs28boZUwLsVv4yXWU8-uqbXYxbCZTMumSBQ0eKqG3R_w-kdMoreIhozJyQz08Y/?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="600" /></div>
<div style="color: #555555; text-align: justify;">
For instance, Amazon has its own affiliate program that allows people to register as affiliate marketers to sell any type of product they like.</div>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">When you sign up for an affiliate program, you are given an <strong>affiliate code</strong> that can be used to bring traffic to your website that you are using to sell the product.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Usually, the provider will give you the necessary banners, sales copies and other marketing materials which you can simply <strong>place on your website</strong>.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">The providers can monitor the progress of the website through the <strong>affiliate ID</strong> that they provided. You too can check your commissions and other relevant statistics.</li>
</ul>
<h3 id="point20" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Example</h3>
<div style="color: #555555; text-align: justify;">
Amazon.com runs one of the most well-known affiliate programs in the market.</div>
<div style="color: #555555;">
<img alt="amazon associates account" height="284" src="https://lh4.googleusercontent.com/4y9w9A69ERU194gsOtGhQOmSv2CNhDsxPR4z4NGPrPpaCqXurWNMw68zxyfSjsQf9iA3uLlSWvbAPdVrjgL54TunTxNGDSlEaOQnHsv4IaJQ4cM592Wq4SdGY8n8sVpgMrVslwsVGRLjUgBuig" style="display: block; float: none; margin-left: auto; margin-right: auto; padding: 3px; text-align: justify; transition: all 0.7s ease;" title="" width="500" /></div>
<div style="color: #555555; text-align: justify;">
All you need to do is join through the link and choose a product you want to advertise. You can then earn up to<strong> 10% advertising fee</strong>.</div>
<div style="color: #555555; text-align: justify;">
The best part is that you do not have to sell the product. Rather, you earn based on whether a customer has clicked on an ad linking to Amazon’s website. That is, the more clicks you get, the more you earn.</div>
<div style="color: #555555; text-align: justify;">
In the start, earnings can be quite low. However, with time, you can earn up <strong>$1000 per month</strong>. This can grow with experience and contacts.</div>
<div style="color: #555555;">
<img alt="amazon affiliate earning chart" height="220" src="https://lh4.googleusercontent.com/5HCZMlQq6xc_Dd5ofaybYA-b1YZ8wzjeN_EXGbJwcSujnyvnXnj97nSwg-9G8l6ufoUrx5rnmb-knOWeIBl9rr47cz-fkJ2qR1PLhzon4fR1rmh71pZFzGyZWLaXn94Ire0JjW8fTgAJmvMnPA" style="display: block; float: none; margin-left: auto; margin-right: auto; padding: 3px; text-align: justify; transition: all 0.7s ease;" title="" width="500" /></div>
<div style="color: #555555; text-align: center;">
<div style="text-align: justify;">
<em><span style="font-size: x-small;">The picture shows the amount of fees earned through Amazon’s affiliate program.</span></em></div>
</div>
<div style="color: #555555; text-align: justify;">
As you can see the conversion rate is <strong>11.14%.</strong> This is the part that needs to grow in order to increase earnings through the program.</div>
<div style="color: #555555; text-align: justify;">
Amazon provides a number of useful tools and resources to increase your conversion rates effectively.</div>
<h3 id="point21" style="border-bottom-color: rgb(40, 151, 40); border-bottom-style: solid; border-bottom-width: 1px; color: #289728; font-size: 19.2px; line-height: 1.3em; margin-bottom: 10px; padding: 1px 5px; text-align: justify;">
Important Tips:</h3>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Affiliate marketing is far from a get-rich-quick scheme. Since affiliate marketing requires minimal investment and resources, the barriers to entry are extremely low. As much as this is a benefit, it is also a cause of intense competition and hence standing out of the crowd can take some time.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">In order to get a head start in the affiliate marketing industry, the first thing you need to consider is the type of products you want to sell. It is recommended to select a couple of good products that have a high demand in the market.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">There is no point in taking on more than you can handle. Consequently, in order to determine what products sell well, you will need to do a lot of research on different markets.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;">Secondly, make use of different channels to promote the product. Simply using your website for promotion may not take you very far in terms of selling the product. Google and Facebook ads can be a great source for attracting the relevant type of traffic.</li>
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;"><strong><span style="background-color: yellow;">Golden Tip:</span></strong> Even if you don't own a website or youtube channel, you can send your affiliate link via email or social media to friends and family members who often ask you <span style="color: #d19049;"><strong>"<span style="font-family: "candara";"><em>Hey Mike! Do you know where can I buy a good laptop?</em></span>"</strong> </span>Just send him an email by adding your affiliate link! ;)</li>
</ul>
<div id="imptpoint" style="color: #555555;">
</div>
<h2 id="point22" style="border-bottom-color: rgb(78, 85, 90); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: rgb(78, 85, 90); border-top-style: dotted; border-top-width: 1px; color: #4e555a; font-size: 22.4px; line-height: 1.3em; margin-bottom: 10px; padding: 3px; text-align: justify;">
5. Build a Skill Set First!</h2>
<div style="color: #555555;">
<img alt="students can make money by building a skill set" border="0" height="343" src="https://lh3.googleusercontent.com/-e6CydT_xKXw/WQnahp3VyLI/AAAAAAAARt0/rUjX04Q6vO82Zn6J9iTrj-RkCc4GuA2MwCHM/image%255B112%255D?imgmax=800" style="background-image: none; border-width: 0px; display: block; float: none; margin: 0px auto; padding: 0px 0px 3px; text-align: justify; transition: all 0.7s ease;" title="" width="603" /></div>
<div style="color: #555555; text-align: justify;">
<em><span style="font-size: x-small;">This point is added by the editorial board of MBT.</span></em></div>
<div style="color: #555555; text-align: justify;">
No one values your time online unless you have acquired a skill set. Please note down the following important points to ensure a successful career online, with both inflow of a handsome income as well as respect in the eye of the internet community.</div>
<div style="color: #555555; text-align: justify;">
Ready? Let's discuss it on fingertips:</div>
<ol style="color: #555555;">
<li style="font-size: 15px; line-height: 1.5em; margin: 10px 0px; text-align: justify;"><strong><span style="color: red; font-size: x-small;">[Must]</span></strong> <strong><u>Learn Adobe Photoshop & Illustrator:</u></strong> Love those InfoGraphics and awesome Image graphics that you see on the Web? Then learn the art of photo editing and excell in this skill. Thousands of tutorials are available online on youTube or simply download a course from<strong> Lynda.com</strong>. You can start selling graphics online just within a month of learning Ps and Ai.</li>
<li style="font-size: 15px; line-height: 1.5em; margin: 10px 0px; text-align: justify;"><strong><u>Learn Adobe After Effects:</u></strong> Love those exciting YouTube videos or Hollywood trailers with that awesome text animation and graphic effects? Then learn Ae right today by watching videos on YouTube or downloading a course from <strong><a href="http://lynda.com/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">Lynda.com</a></strong>. You can start making money online by uploading awesome videos on YouTube after learning Ae within a month! <span style="color: green;"><strong>You could become the next great YouTuber/vLogger</strong>.</span></li>
<li style="font-size: 15px; line-height: 1.5em; margin: 10px 0px; text-align: justify;"><strong><span style="color: red; font-size: x-small;">[Must]</span></strong> <strong><u>Learn CSS & HTML:</u></strong> A person who don't know these basic UI languages used to build and style a webpage equals one who writes an English essay without knowing the grammar. You can become a web designer by simply excelling in these basic languages by reading free tutorials on <strong><a href="http://w3schools.com/" style="color: #289728; outline: none; text-decoration-line: none;" target="_blank">w3schools.com</a></strong></li>
</ol>
<div style="color: #555555; text-align: justify;">
Excelling in these three skills is no less than a weapon that can help you succeed at a much faster speed online.</div>
<div style="color: #555555; text-align: justify;">
If you are really serious about making a six figure income online then read the following article:</div>
<ul style="color: #555555; list-style: none;">
<li style="background-attachment: scroll; background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYO4jAtoW1XBf54A08xMrUhyphenhyphennCQj4Fh81z0o9s1-qTwfwSbBX5WSYxLDCFhXkK6FYMPW5PC5w2qPIeUvKtk5DXdF2x6srKi2Mc2ZLWueZGiC-i-QgczfrwGooc-A4ncMQngV_KvAzJm8/s400/255.gif"); background-position: 0px 4px; background-repeat: no-repeat; font-size: 15px; line-height: 1.5em; margin: 10px 0px; padding: 0px 0px 5px 20px; text-align: justify;"><strong>Read:</strong> <a href="http://www.mybloggertricks.com/2012/04/web-development-is-surely-key-to-become.html" style="color: #289728; outline: none; text-decoration-line: none;"><strong>How Web Development is the Key to Six Figure Income Online?</strong></a></li>
</ul>
<div class="bluebox" style="background-attachment: initial; background-clip: initial; background-color: #e2f0fc; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 1px solid rgb(144, 184, 224); color: #555555; margin: 15px 0px 30px; overflow: hidden; padding: 15px 15px 10px;">
<div style="text-align: justify;">
<b>The Internet is a place for people with creative skills, and it feeds only those who first learns, then practice it and finally shares his knowledge!</b></div>
</div>
<h2 id="point23" style="border-bottom-color: rgb(78, 85, 90); border-bottom-style: dotted; border-bottom-width: 1px; border-top-color: rgb(78, 85, 90); border-top-style: dotted; border-top-width: 1px; color: #4e555a; font-size: 22.4px; line-height: 1.3em; margin-bottom: 10px; padding: 3px; text-align: justify;">
Conclusion</h2>
<div style="color: #555555; text-align: justify;">
Earning money online is a great way to get some extra cash while you are a student. In fact, if you continue to work online, it is highly likely that you become an online professional by the time you finish studies.</div>
<div style="text-align: justify;">
<div style="color: #555555;">
If you are confused and still need help, do not hesitate and just post your query in the comment box below. I would love to answer all your queries and help you to the best of my ability. :)</div>
<div style="color: #555555;">
<br /></div>
<span style="color: red;">BIG CREDIT: PLEASE VISIT THIS SITE => http://www.mybloggertricks.com/</span></div>
</div>
</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-56448260811457744422019-07-31T21:06:00.000-07:002019-08-02T07:51:02.188-07:009 Tips to Make Your E-commerce Business Wildly Successful<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLfxbpdgt9ugFF6BVfwwEsZNOtAvXyLC46mUw-oAoBXCU_2CfHL4kzI_fAKnxRrNseci-S_2V1A3BB7dJL2wK9GvjALxOpz7nrzRLEIRnAXH1UshmjO3yx0hjUQB40TEcbSBEVHSZW32T7/s1600/eCommerce-marketing.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="579" data-original-width="1600" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLfxbpdgt9ugFF6BVfwwEsZNOtAvXyLC46mUw-oAoBXCU_2CfHL4kzI_fAKnxRrNseci-S_2V1A3BB7dJL2wK9GvjALxOpz7nrzRLEIRnAXH1UshmjO3yx0hjUQB40TEcbSBEVHSZW32T7/s640/eCommerce-marketing.png" width="640" /></a></div>
<br />
<h1 class="headline" itemprop="headline" style="background-color: white; box-sizing: inherit; clear: both; line-height: 2.3rem; margin: 1rem 0px 0.5rem;">
<span style="color: orange;"><span style="color: orange; font-size: 2rem; font-weight: 300;">
9 Tips to Make Your </span><span style="color: orange; font-weight: 300;">E-commerce</span><span style="font-size: 2rem; font-weight: 300;"><span style="color: orange;"> Business Wildly </span><span style="color: #cc0000;">Successful</span></span></span></h1>
<div>
<br /></div>
<div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">1. </span><span style="box-sizing: inherit;">Don’t rush the launch</span>.</span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
One of the biggest mistakes unsuccessful ecommerce entrepreneurs make is forcing or rushing the launch of a website. You only get one shot at launching your website and you can’t mess this up. While it’s okay to purchase your domain name and throw up some sort of “Coming Soon” page, you should avoid the big reveal until you’ve laid some substantial ground work (SEO, content marketing, social media, paid advertising, etc.).<br />
<br />
<a name='more'></a><br /></div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">2. </span><span style="box-sizing: inherit;">Put the focus on the user</span>.</span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
It’s no secret that the biggest shortcoming of ecommerce businesses is the inability to let their customers touch, feel, smell, and see (firsthand) products before making a decision. While there’s currently no solution for solving this problem, you can compensate for this deficiency in other areas of the business. Some of the best tips include offering appropriate pricing, giving free shipping and making the checkout process easy with simplified shopping carts.</div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">3. </span><span style="box-sizing: inherit;">Test absolutely everything</span>.</span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
Before, during and after you launch any ecommerce business, you should invest in testing and analytics. Think like the customer and figure out what’s working, what’s not, and the why behind those answers. Here’s a look at some of the <a href="http://mashable.com/2015/01/30/ab-testing-tools/" rel="nofollow" style="-webkit-tap-highlight-color: transparent; background-color: transparent; box-sizing: inherit; color: #23b5ba; text-decoration-line: none;" target="_blank">best A/B testing tools</a>.</div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">4. </span><span style="box-sizing: inherit;">Work closely with social</span>.</span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
Any ecommerce entrepreneur that tells you he outsources social media or delegates it to other team members is crazy. Social media is the heartbeat of your business, as it gives you an uninterrupted glance into the lives of your customers. While it’s perfectly fine to have a social-media manager, it’s pertinent that you’re involved with it, too.</div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">5. I</span><span style="box-sizing: inherit;">ncorporate social elements</span>.</span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
Going along with the previous tip, it’s a great idea to include social elements on your ecommerce sites. Things like product reviews and testimonials follow buttons and even social login options all help the conversion funnel.</div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">6. </span><span style="box-sizing: inherit;">Go mobile</span>.</span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
Bill Siwicki of Internet Retailer <a href="https://www.internetretailer.com/2014/03/10/mobile-commerce-will-be-nearly-half-e-commerce-2018" rel="nofollow" style="-webkit-tap-highlight-color: transparent; background-color: transparent; box-sizing: inherit; color: #23b5ba; text-decoration-line: none;" target="_blank">references Goldman Sachs,</a> saying, “Tablets will play an increasingly important role as worldwide consumer spending via mobile jumps from $204 billion in 2014 to $626 billion in 2018...” If you aren’t building ecommerce businesses with mobile in mind, you may be irrelevant in three to five years.</div>
<h2 style="background-color: white; box-sizing: inherit; font-size: 1.3rem; line-height: 22.88px; margin: 2rem 0px 0.5rem;">
<span style="color: orange;"><span style="box-sizing: inherit;">7. </span><span style="box-sizing: inherit;">Stay on top of SEO.</span></span></h2>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
As the ecommerce economy experiences rapid growth, more and more businesses will be entering this increasingly crowded space. That means it will be more important than ever to stay on top of SEO in order to stand out from the competition. Connecting with a skilled SEO will help you stay competitive in the long run.</div>
<div style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem;">
<br /></div>
<div style="background-color: white; box-sizing: inherit; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin-bottom: 1.5rem; text-align: center;">
<b><span style="color: #cc0000;">Continue reading...</span></b></div>
<div class="island-ad adbox" data-google-query-id="CL71wLOdktYCFQcjvQodjZAITQ" data-key="one-off" data-sizes="{ "sizes":[[728,90],[300,250],[300,50]] }" id="eojj8uopar" style="background-color: white; box-sizing: inherit; color: #464646; font-family: "PT Serif", TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif; font-size: 16px; margin: 1rem auto; max-width: 1232px; min-height: 90px; text-align: center;">
<div class="separator" style="clear: both; color: #003300; font-family: "Roboto Slab", Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="color: black; margin-left: 1em; margin-right: 1em; outline: none;">
<a href="https://www.entrepreneur.com/article/246223" imageanchor="1" style="color: #88ac40; margin-left: 1em; margin-right: 1em; outline: none; text-decoration-line: none;" target="_blank">
<img border="0" data-original-height="103" data-original-width="347" height="58" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh548B45o8k4E0L2gAGm4KMkuItYqdp5px_RYqaaeUaeA6cQUlBwD8qPYfxrki394NVsQ0vzn_bG-BdtMkdjltDMgHzGXIFpulWV-_EbSvZTwoPHw-_LmoU1BK3M5HwDVX9P8AC11gCDdAn/s200/read.png" style="background: transparent; border: none; max-width: 100%; padding: 0px; position: relative;" width="200" /></a></span></div>
<div>
<br /></div>
<span style="color: #003300; font-family: "roboto slab" , "arial" , "helvetica" , sans-serif; font-size: 13px; text-align: left;"></span></div>
</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-11908988507017948162019-07-31T19:24:00.000-07:002019-08-01T20:09:23.250-07:00DOWNLOAD XCOM 2 - FULL FREE PC GAME<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoGMJz9ULx9XIaOJfsMU0o2Q0JtxTyZ771-4lp9V2Eu1pIMM9t0bJRR4f3lO2XEynaAwk3gVf1_AAS-zz_hjiOBMq60Anf4WP0_KJg_8sQYKP_S44VRgRie_jyvL6-GekCnVzolwT5kCJ8/s1600/Xcom-2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: Trebuchet MS, sans-serif;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoGMJz9ULx9XIaOJfsMU0o2Q0JtxTyZ771-4lp9V2Eu1pIMM9t0bJRR4f3lO2XEynaAwk3gVf1_AAS-zz_hjiOBMq60Anf4WP0_KJg_8sQYKP_S44VRgRie_jyvL6-GekCnVzolwT5kCJ8/s640/Xcom-2.jpg" width="640" /></span></a></div>
<span style="background-color: white;"><span style="font-family: Trebuchet MS, sans-serif;"><span style="color: red;">XCOM 2</span> is the sequel to the award-winning strategy game, XCOM: Enemy Unknown. Twenty years have passed since humanity lost the war against the alien invaders and a new world order now exists on Earth. After years of lurking in the shadows, XCOM forces must rise and eliminate the alien occupation.</span></span><br />
<a name='more'></a><br />
<span style="font-family: Trebuchet MS, sans-serif;">
</span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWleouBxTENzTJzvOHNn_mJ-J3-pRMQnC2lebBGAleWzO7EFS99Bs44J_OE_qfYAPMCzMciwSfpWz0AIk1hM15BTYHsxl_FUZlWbH69Nc_YReeJGz9pJQxL33bExWDWcuuu9h3lJCqXiHv/s1600/2012-10-22_00006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Trebuchet MS, sans-serif;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWleouBxTENzTJzvOHNn_mJ-J3-pRMQnC2lebBGAleWzO7EFS99Bs44J_OE_qfYAPMCzMciwSfpWz0AIk1hM15BTYHsxl_FUZlWbH69Nc_YReeJGz9pJQxL33bExWDWcuuu9h3lJCqXiHv/s400/2012-10-22_00006.jpg" width="400" /></span></a></div>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
</span><br />
<div style="text-align: center;">
<span style="background-color: white; color: orange; font-family: Trebuchet MS, sans-serif;">Minimum requirements:</span></div>
<div style="text-align: center;">
<span style="background-color: white; font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<span style="background-color: white; font-family: Trebuchet MS, sans-serif;"><span style="color: red;">OS:</span> Windows/Vista /7/8/8.1/10<br /><span style="color: red;">CPU:</span> Intel Core 2 Duo E4700 2.6 GHz or AMD Phenom 9950 Quad Core 2.6 GHz<br /><span style="color: red;">RAM:</span> 4 GB RAM<br /><span style="color: red;">Graphics Card:</span> 1GB ATI Radeon HD 5770, 1GB NVIDIA GeForce GTX 460 or better<br /><span style="color: red;">Sound:</span> Yes<br /><span style="color: red;">Disk Space:</span> 45 GB</span><br />
<div style="text-align: center;">
<span style="background-color: white; color: orange; font-family: Trebuchet MS, sans-serif;">Recommended:</span></div>
<span style="background-color: white; font-family: Trebuchet MS, sans-serif;"><br /><span style="color: red;">OS: </span>Windows/Vista /7/8/8.1/10<br /><span style="color: red;">CPU:</span> Intel or AMD 3GHz Quad Core<br /><span style="color: red;">RAM:</span> 8 GB RAM<br /><span style="color: red;">Graphics Card:</span> 2GB ATI Radeon HD 7970, 2GB NVIDIA GeForce GTX 770 or better<br /><span style="color: red;">Sound:</span> Yes<br /><span style="color: red;">Disk Space</span>: 45 GB</span><br />
<div>
<span style="font-family: "verdana" , sans-serif;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></span></div>
<div>
<span style="font-family: "verdana" , sans-serif;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></span></div>
<div>
<div style="text-align: center;">
<span style="background-color: white;"><span style="background-color: white;"><span style="color: red; font-family: Trebuchet MS, sans-serif;"><b>DOWNLOAD:</b></span></span></span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="background-color: white;"></span><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; font-family: Trebuchet MS, sans-serif;"><a href="https://drive.google.com/file/d/1MJ4uJCQjrN0uKB5BLWZ_X0hLf6cEXyYf/view" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="242" data-original-width="290" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYw-KqI8-36VLaluNkN4dYqt6YM_Et9hLc0_dbcQP_3Nc7LNwAYFif9emXVAVKuaXEtiZKjC-rcY1mrjZvydSl30F66vfmoOOEYGCKi-SqT23yYHuKDHVC6AKa26HDkRAa5jvwKULplork/s200/giphy.gif" width="200" /></a></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYv7UfQAhwmQi19Yzo1jVT450CUEBw9goOioZK2zWUn5NRNIHjbboGM1LA0JLVa0iQLUWYArw3bzt8cvf64cl6nBaDSaGb5KByc2en8AR7KNXB4TJzCU-hIkWKszEMAsl_-7xCs3nwBUYV/s1600/1479679421-4016072328.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Trebuchet MS, sans-serif;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYv7UfQAhwmQi19Yzo1jVT450CUEBw9goOioZK2zWUn5NRNIHjbboGM1LA0JLVa0iQLUWYArw3bzt8cvf64cl6nBaDSaGb5KByc2en8AR7KNXB4TJzCU-hIkWKszEMAsl_-7xCs3nwBUYV/s400/1479679421-4016072328.jpg" width="400" /></span></a></div>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk-6oGCnR8aPQff_vlUMAHU9abwWSWLTpsgsiAhgxu26kKWXpAZwKq2n4TbTthfmDmtImyljZDYfIqJNrenX_g4e52tlYARwZyGbEnWPRWbSudNAH4bN6mjMmOHg5kGtIbF3tDhvIPytWR/s1600/xcom-2-ps4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Trebuchet MS, sans-serif;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk-6oGCnR8aPQff_vlUMAHU9abwWSWLTpsgsiAhgxu26kKWXpAZwKq2n4TbTthfmDmtImyljZDYfIqJNrenX_g4e52tlYARwZyGbEnWPRWbSudNAH4bN6mjMmOHg5kGtIbF3tDhvIPytWR/s400/xcom-2-ps4.jpg" width="400" /></span></a></div>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh78VpNMhjYtrLOZzYQuiYbfthxBvzCBSCqRHkKNZBi_Cq6gFrQn6Ap7s_mhlUaSBYpaKuEcgKbqhWOn9vq6fsjnolQYny01VOZ9Hhdpy9gBqvt53BtKpfJ4A20mfP3sLI5N03FzGwE8Wxw/s1600/Xcom-Enemy-Unknown-Game-Image.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Trebuchet MS, sans-serif;"><img border="0" data-original-height="720" data-original-width="1280" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh78VpNMhjYtrLOZzYQuiYbfthxBvzCBSCqRHkKNZBi_Cq6gFrQn6Ap7s_mhlUaSBYpaKuEcgKbqhWOn9vq6fsjnolQYny01VOZ9Hhdpy9gBqvt53BtKpfJ4A20mfP3sLI5N03FzGwE8Wxw/s400/Xcom-Enemy-Unknown-Game-Image.jpg" width="400" /></span></a></div>
<br /></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-82602712058579703922019-07-24T17:27:00.000-07:002019-07-24T17:27:12.953-07:00Adobe Illustrator Cs6 Portable free Download full version<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDy_nKAiH_wpj15mMflyLLzDQmVlheJ4XKd-x1uuK09LlbCjnA9NVCDiwEpVMV8VzY7JwVMWO87zF7vsLb-WhdRvXp4jkoH3NXA4z0r1HGGjcAYJL0LD4h4uWCpd9GErPR4V-VJKHDj3rM/s1600/9783836218863-1-1021x580.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif;"><img border="0" data-original-height="580" data-original-width="1021" height="361" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDy_nKAiH_wpj15mMflyLLzDQmVlheJ4XKd-x1uuK09LlbCjnA9NVCDiwEpVMV8VzY7JwVMWO87zF7vsLb-WhdRvXp4jkoH3NXA4z0r1HGGjcAYJL0LD4h4uWCpd9GErPR4V-VJKHDj3rM/s640/9783836218863-1-1021x580.jpg" width="640" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 15px; font-weight: 700;">Adobe Illustrator CS6 free download </span><span style="background-color: white; color: #0a0a0a; font-size: 15px;">full version for windows pc. Download Adobe illustrator cs6 with a single click from official resources.</span><span id="more-1205" style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 15px;"></span><span style="background-color: white; color: #0a0a0a; font-size: 15px;"> Many people involved in graphic design are well aware of Adobe Illustrator. It is basically a vector graphics editor developed by Adobe Systems. Adobe Illustrator CS6 is the latest version of adobe product line. Adobe Illustrator CS6 is the seventeenth generation ensuring high-performance image editing. This high-performance vector image editing program is capable of increasing skill, speed, precision and stability of graphic designing works. It includes many cutting-edge tools and some attractive features for making beautiful vector images. These images look clean and sharp. They can easily draw the attention of the viewers.</span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6a3ILVgqzphpytt2ZazWlRQvb5DTFoB9PY91okS9zau0aadIwjcwXYwJC4DTsfnTstLyaa9VtTb7CtgFBJOaEH5dw7nDKr7qip93Xh6DCETnKypnH_-gdcJUCacn9ADnpy2ucuyzwnmdg/s1600/maxresdefault.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif;"><img border="0" data-original-height="720" data-original-width="1280" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6a3ILVgqzphpytt2ZazWlRQvb5DTFoB9PY91okS9zau0aadIwjcwXYwJC4DTsfnTstLyaa9VtTb7CtgFBJOaEH5dw7nDKr7qip93Xh6DCETnKypnH_-gdcJUCacn9ADnpy2ucuyzwnmdg/s400/maxresdefault.jpg" width="400" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br />
<h3 style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 22px; font-weight: 400; line-height: 30px; margin: 27px 0px 17px;">
<span style="font-family: "trebuchet ms" , sans-serif;">
System requirements to install Adobe Illustrator CS6</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 15px; line-height: 30px; margin-bottom: 24px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Intel® Pentium 4 or AMD Athlon 64 processor.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;">Microsoft Windows XP with Service Pack 3 or Windows 7.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;">1GB of RAM (2GB recommended)</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;">1.6GB of Hard disk space</span></div>
<h3 style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 22px; font-weight: 400; line-height: 30px; margin: 27px 0px 17px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></h3>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvbjJX1ewTXrAc9H9yJhi_bYrooZ4RiE-cqfDTQw_mq3RjXCWroZOO6hLqt1X3WRhn9uSXus9uvpXK6daqe22lQyGFzjX0gtH6Y5PHlJS5oQUbNmE-hw3Jk5EZZDAr9_0bzAJRB9zYCnsL/s1600/1dfeaf60-4111-4c2b-b3c6-9a3026396a56.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvbjJX1ewTXrAc9H9yJhi_bYrooZ4RiE-cqfDTQw_mq3RjXCWroZOO6hLqt1X3WRhn9uSXus9uvpXK6daqe22lQyGFzjX0gtH6Y5PHlJS5oQUbNmE-hw3Jk5EZZDAr9_0bzAJRB9zYCnsL/s400/1dfeaf60-4111-4c2b-b3c6-9a3026396a56.jpg" width="400" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3 style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 22px; font-weight: 400; line-height: 30px; margin: 27px 0px 17px;">
<span style="font-family: "trebuchet ms" , sans-serif;">
Adobe Illustrator CS6 download download links:</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 15px; line-height: 30px; margin-bottom: 24px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Software version: AI CS6</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;">Publisher: <a href="https://adobe.com/" style="background: transparent; box-sizing: border-box; color: #8224e3; font-family: "Open Sans" !important; text-decoration-line: none !important;" target="_blank">Adobe</a></span></div>
<div style="background-color: white; box-sizing: border-box; color: #0a0a0a; font-size: 15px; line-height: 30px; margin-bottom: 24px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="background-color: white; clear: both; color: #003300; font-size: 13px; text-align: center;">
<span style="font-family: "merriweather" , "georgia" , serif;"><span style="font-family: "trebuchet ms" , sans-serif; line-height: 32px;"><b>Your Download is ready:</b></span></span></div>
<div class="separator" style="background-color: white; clear: both; color: #003300; font-size: 13px; text-align: center;">
<a href="https://toptech360.com/adobe-illustrator-cs6-portable-free-download/" style="color: #88ac40; outline: none; text-decoration-line: none;" target="_blank"><span style="font-family: "trebuchet ms" , sans-serif;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVGLCzK4lY9ka8HLhZbUTRkFQHCXwgA2tUl0DFaRflH_5YpKVUFzbqcFPUx5OM4E3S6OZaPZDSdsYJ-TPYDVnHzQRZd06TgAS0hqBEVqLValCHwAHaGKH45BSDglPvOPeMb8Gn1EwCx6i4/s200/ContinueButton.png" style="background: transparent; border: none; max-width: 100%; padding: 0px; position: relative;" /></span></a></div>
<br />JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-45030961551614189902019-07-24T17:26:00.000-07:002019-07-24T17:26:30.838-07:002K17 SLAMDUNK vs KUROKO-NO-BASUKE APK+OBB free Download<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVaqVlpamOf-vducxC7xAKDnMVvAC1EVAVoG0lw4KfmQlLn4MESh8joCPfoLNYpKF86Sn72Nab7g9Vom2pKb4vDR7Gkqhd1-r3NLlzNKTkdQ9ZyN7jVf0vFoZral581EgL6FA_GpbXyuH6/s1600/1462301890-8a85aaa6eeb63999e4584c4db42e46c1.jpeg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><b><img border="0" data-original-height="360" data-original-width="480" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVaqVlpamOf-vducxC7xAKDnMVvAC1EVAVoG0lw4KfmQlLn4MESh8joCPfoLNYpKF86Sn72Nab7g9Vom2pKb4vDR7Gkqhd1-r3NLlzNKTkdQ9ZyN7jVf0vFoZral581EgL6FA_GpbXyuH6/s640/1462301890-8a85aaa6eeb63999e4584c4db42e46c1.jpeg" width="640" /></b></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><b><br /></b></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><b><br /></b></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><b><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><span style="color: #38761d;">Slamdunk VS Kuroko</span></span><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><span style="color: #38761d;"> </span>No Basuke </span><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><span style="color: #b45f06;">APK</span></span><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"> (<span style="color: #e69138;">Offline Basketball</span></span></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><b><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><span style="color: #e69138;"> Game</span>) is Sports Games</span><wbr style="background-color: white; font-family: arial, sans-serif; line-height: 18.2px; text-align: left;"></wbr><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;">. Full </span><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;">APK</span><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"> Mod version available to download FREE for your Android Phone Kit.</span></b></span></div>
<a name='more'></a><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><b><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><br /></span></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><b><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><br /></span></b></span></div>
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/Wuem7VGSO3c" width="640"></iframe>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><b><br /></b></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><span style="background-color: white; font-family: "arial" , sans-serif; line-height: 18.2px; text-align: left;"><b><br /></b></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgogZ5ek02XAUFmey0IxrN0pQZp_OYrhVeYVX8l1I8xDxrc90vMqFlU3UAXZANdQ906UZwRG8U5rEZsPF-8rcatc4U3D_XonldQhltqOLuoIR_9ldnf-ImiJVRccifbrVgG_KypElD5LI4D/s1600/1449473246-6f2641abac9bb998d1f56bf161f8ce65.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><b><img border="0" data-original-height="532" data-original-width="918" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgogZ5ek02XAUFmey0IxrN0pQZp_OYrhVeYVX8l1I8xDxrc90vMqFlU3UAXZANdQ906UZwRG8U5rEZsPF-8rcatc4U3D_XonldQhltqOLuoIR_9ldnf-ImiJVRccifbrVgG_KypElD5LI4D/s400/1449473246-6f2641abac9bb998d1f56bf161f8ce65.jpeg" width="400" /></b></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLzHOrWxfY-4oeaXzAlOCVpD9Mg9uqjRsD4JbhslHsGiYlsX7hHiUQqH37953H2ZLwXcP63rE72H_Xqn0uDKllNBFCTT3kIHNsgGjBpPoInmoQg3bqjycgpEOM3doV8iB3eJde-A_wl9n/s1600/maxresdefault.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><b><img border="0" data-original-height="720" data-original-width="1280" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLzHOrWxfY-4oeaXzAlOCVpD9Mg9uqjRsD4JbhslHsGiYlsX7hHiUQqH37953H2ZLwXcP63rE72H_Xqn0uDKllNBFCTT3kIHNsgGjBpPoInmoQg3bqjycgpEOM3doV8iB3eJde-A_wl9n/s400/maxresdefault.jpg" width="400" /></b></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxRvhMKstXpDeLa8aq0Z2882JDJ-eS75sqYkvBVamF55Wo0vR74jLajerAWt0z-ZQBZyP89qvRnQ9Boxyu9u5M8N4-tWCsQX8bR1N0PgfhhDruZIabeieWy-CJcbSP28F9B6AFWS0RQSzo/s1600/Slamdunk-X-Kuroko-No-Basket-v1.2-Android-Apk-Download-Droidapk.org-7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><b><img border="0" data-original-height="225" data-original-width="400" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxRvhMKstXpDeLa8aq0Z2882JDJ-eS75sqYkvBVamF55Wo0vR74jLajerAWt0z-ZQBZyP89qvRnQ9Boxyu9u5M8N4-tWCsQX8bR1N0PgfhhDruZIabeieWy-CJcbSP28F9B6AFWS0RQSzo/s400/Slamdunk-X-Kuroko-No-Basket-v1.2-Android-Apk-Download-Droidapk.org-7.jpg" width="400" /></b></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwkVp7hAwVJd4ROnwfx-9w79vQnq24l7KF8mbgz5DOw6Hl14QSL86_GX-jTBdII8C9kN1GQzORcirsSLoPDDipCIGrxUonDpqpX0MsqizTZmxl-ToJ2byF48us3TnSs_f4-vYbY6KrH2ku/s1600/2013-05-20+04_33_41-nba-2k13-slamdunk-2k13-mod.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><b><img border="0" data-original-height="433" data-original-width="790" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwkVp7hAwVJd4ROnwfx-9w79vQnq24l7KF8mbgz5DOw6Hl14QSL86_GX-jTBdII8C9kN1GQzORcirsSLoPDDipCIGrxUonDpqpX0MsqizTZmxl-ToJ2byF48us3TnSs_f4-vYbY6KrH2ku/s400/2013-05-20+04_33_41-nba-2k13-slamdunk-2k13-mod.jpg" width="400" /></b></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b>Instruction:</b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b>1. Download the Apk File and Game Cache</b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b>2. Extract the Game Cache you’ve download and copy the folder com.t2ksports.nba2k14google</b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b>3. Paste to your internal storage at Android/Obb Folder if not work try to sdcard</b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b>4. Install the Apk and Enjoy the game</b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b>Credits to the modders!</b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b><br /></b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<b><br /></b></div>
<div style="background-color: white; color: #2e2e2e; font-family: 'Open Sans', sans-serif; line-height: 26px; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">
<div class="separator" style="clear: both; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-align: center; transition: all 0s ease;">
<span style="font-family: "trebuchet ms" , sans-serif; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;"><b>APK Size: 47MB</b></span></div>
<div class="separator" style="clear: both; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-align: center; transition: all 0s ease;">
<a href="https://www.mediafire.com/file/m49f3x70xwrtdf3/KNBXSD%28DroidApk.org%29.apk" style="color: #eb1a21; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; transition: all 0s ease;"><b><img alt="f9655378b84d0452a6112bf736607ff6" border="0" data-original-height="84" data-original-width="298" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNtIWSgaCspe2jLx-IgrR50wyzz5u0ao09Px88fXVmdRlwc5-UxJ8mTk5NCS-9OqpfqnluLLL8ztQU3q2ORZLVQxrptrHNCATuTfj8iluD1ps7HJk-3tg0XgVQs8enu0R-e44IOXQ6ARL4/s200/f9655378b84d0452a6112bf736607ff6.png" style="border: none; margin: 0px auto; max-width: 100%; outline: 0px; padding: 10px 0px; position: relative; transition: all 0s ease; vertical-align: middle;" title="f9655378b84d0452a6112bf736607ff6" width="200" /></b></a></div>
<div class="separator" style="clear: both; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-align: center; transition: all 0s ease;">
<b><br style="outline: 0px; transition: all 0s ease;" /></b></div>
<div class="separator" style="clear: both; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-align: center; transition: all 0s ease;">
<b>OBB Size: <span style="font-family: "source sans pro" , sans-serif; margin: 0px; outline: 0px; padding: 0px; transition: all 0s ease;">1.1GB</span></b></div>
<div class="separator" style="clear: both; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-align: center; transition: all 0s ease;">
<a href="https://www.mediafire.com/file/d1mt2jshyihcttj/SXK-v1-GameCache%28Droidapk.org%29.rar" style="color: #eb1a21; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; transition: all 0s ease;"><b><img alt="f9655378b84d0452a6112bf736607ff6" border="0" data-original-height="84" data-original-width="298" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNtIWSgaCspe2jLx-IgrR50wyzz5u0ao09Px88fXVmdRlwc5-UxJ8mTk5NCS-9OqpfqnluLLL8ztQU3q2ORZLVQxrptrHNCATuTfj8iluD1ps7HJk-3tg0XgVQs8enu0R-e44IOXQ6ARL4/s200/f9655378b84d0452a6112bf736607ff6.png" style="border: none; margin: 0px auto; max-width: 100%; outline: 0px; padding: 10px 0px; position: relative; transition: all 0s ease; vertical-align: middle;" title="f9655378b84d0452a6112bf736607ff6" width="200" /></b></a></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<br />
<br />JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-50322200810176556712019-07-20T01:48:00.001-07:002019-07-20T01:48:53.383-07:00DOMAIN SET-UP FOR BLOGGER TO FREENOM 2019<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/FkqR-zXnszA" width="100%"></iframe>JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-15723420929282062632019-07-20T01:00:00.000-07:002019-07-20T01:00:25.745-07:00How to recover data in Android<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPR_yEFBWVddFnsoqpwc6ncA57OAj27F4skWy60mxcUVJR_gw7NAEprCzBwo-U9AIFkYYq43xO11LAc_Fb9YVcCE_-AfKJQ_BSRi5sI4CW7s7x6VayCRzTvZamCZvVu07dnLibz9n5zyZb/s1600/NexusFamily2016_w670_h330.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="330" data-original-width="670" height="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPR_yEFBWVddFnsoqpwc6ncA57OAj27F4skWy60mxcUVJR_gw7NAEprCzBwo-U9AIFkYYq43xO11LAc_Fb9YVcCE_-AfKJQ_BSRi5sI4CW7s7x6VayCRzTvZamCZvVu07dnLibz9n5zyZb/s640/NexusFamily2016_w670_h330.png" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h2 class="pro_title center" style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 24px; font-weight: normal; line-height: 35px; list-style: none; margin: 0px 0px 39.1875px; padding: 0px 0px 0px 55.9688px; text-align: center; vertical-align: baseline;">
Safe Android Data Recovery Software to Recover Android FileS</h2>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">SMS</span></div>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: center;">Contact</span></div>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">Videos</span></div>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">Photos</span></div>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">Music</span></div>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">Documents</span></div>
<div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;"></span><br />
<a name='more'></a><span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;"><br /></span></div>
<div style="text-align: center;">
<span style="background-color: white; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 24px;">Common Scenarios:</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">OS Errors</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">Rooting</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;">Improper Handling</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: center;">Accidental Deletion</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: center;">Device Failure</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: center;">Virus Attack</span></div>
<div style="text-align: left;">
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: center;"><br /></span></div>
<div style="text-align: left;">
<h2 class="pro_title" style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 24px; font-weight: normal; line-height: 35px; list-style: none; margin: 0px 0px 39.1875px; padding: 0px; text-align: center; vertical-align: baseline;">
How to Recover Your Lost & Deleted Data on Android</h2>
<div class="pro_des" style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 16px; line-height: 25px; list-style: none; margin-bottom: 44.7813px; margin-top: -22.3906px; padding: 0px; text-align: center; vertical-align: baseline;">
<b style="border: 0px; list-style: none; margin: 0px; padding: 0px; vertical-align: baseline;">Note:</b> Please stop to use your Android phones or tablets and try to retrieve the lost data as soon as possible after finding you lost your data<br />
<br />
DOWNLOAD THE APPLICATION</div>
<div class="pro_des" style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 16px; line-height: 25px; list-style: none; margin-bottom: 44.7813px; margin-top: -22.3906px; padding: 0px; text-align: center; vertical-align: baseline;">
<a href="http://download.easeus.com/free/emsa_free.exe" style="font-family: "Times New Roman"; font-size: 14px;" target="_blank"><img border="0" data-original-height="242" data-original-width="290" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYw-KqI8-36VLaluNkN4dYqt6YM_Et9hLc0_dbcQP_3Nc7LNwAYFif9emXVAVKuaXEtiZKjC-rcY1mrjZvydSl30F66vfmoOOEYGCKi-SqT23yYHuKDHVC6AKa26HDkRAa5jvwKULplork/s200/giphy.gif" width="200" /></a></div>
<div style="text-align: center;">
<a class="pro_button down win one_line download_pop_show" href="http://download.easeus.com/free/emsa_free.exe" name="mobiaf" onclick="ga('send', 'event', 'mobisaver_android_product', 'Free_Download','product');">FREE DOWNLOAD</a></div>
<span style="background-color: white; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 20px; font-weight: 700;"><br /></span>
<span style="background-color: white; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 20px; font-weight: 700;">STEP 1: Connect Android Devices to Windows PC</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUg8VzRJVfzfKnbSD2n2T1RkJSnGKZsih5nBtRuqBVm815SNcOzZSQHrAVVw5RjA42nRAYkpoIMyuIg2LQxm52QuH8P_SSCCYtnG6HXgQEM2BvX1buc1N2QEyOGOYxTaJ94Wjh_6w03M7Y/s1600/ug-msa-free-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="600" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUg8VzRJVfzfKnbSD2n2T1RkJSnGKZsih5nBtRuqBVm815SNcOzZSQHrAVVw5RjA42nRAYkpoIMyuIg2LQxm52QuH8P_SSCCYtnG6HXgQEM2BvX1buc1N2QEyOGOYxTaJ94Wjh_6w03M7Y/s320/ug-msa-free-1.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2 style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 20px; list-style: none; margin: 0px 0px 25px; padding: 0px; vertical-align: baseline;">
STEP 2: Scan Your Android Device to Find Lost Files</h2>
<div style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 16px; list-style: none; margin-bottom: 30px; padding: 0px; vertical-align: baseline;">
EaseUS Android recovery software starts to scan your device and analyze all found photos, videos, audios, documents, contacts, messages, etc.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicGUWfMA8vthV0eIkn9cKJQ08Q6u9Ax_zH5MNuL_GsNA2_5JvPBlZj47bU-SlzlzinFJ1Ux-UnkbtV_1xgO0uYjMm-YxnQRnR89wL6f1GB-4hmvKOXvCiKGLneWNm1DeOreecfB-4oPTk4/s1600/ug-msa-free-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="600" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicGUWfMA8vthV0eIkn9cKJQ08Q6u9Ax_zH5MNuL_GsNA2_5JvPBlZj47bU-SlzlzinFJ1Ux-UnkbtV_1xgO0uYjMm-YxnQRnR89wL6f1GB-4hmvKOXvCiKGLneWNm1DeOreecfB-4oPTk4/s320/ug-msa-free-2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="border: 0px; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 18px; font-weight: bold; list-style: none; margin: 0px; padding: 0px; text-align: left; vertical-align: baseline;">Note:</span><span style="background-color: #f4f4f6; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: left;"> please make sure there is more than 20% electricity on the battery of your Android device before scanning</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2 style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 20px; list-style: none; margin: 0px 0px 25px; padding: 0px; vertical-align: baseline;">
STEP 3: Preview Recoverable Files on Android</h2>
<div style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 16px; list-style: none; margin-bottom: 30px; padding: 0px; vertical-align: baseline;">
All retrieved files are listed on the interface. Choose specific files and preview. In this step, you can see an option to only display deleted data and save much time.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCc5181v-UQusSCBcGpWaMqW-38XdEw0wQcUfmk2G-OGr224csKZqAXHdqkUKO63VM-NXOM2D6AOuwQ3r9awHzrD7dLcvBJiEECosuK9mSspF1Nlwx-DVFCEk_6m32wkmb8B6Jp3aecKEu/s1600/ug-msa-free-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="600" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCc5181v-UQusSCBcGpWaMqW-38XdEw0wQcUfmk2G-OGr224csKZqAXHdqkUKO63VM-NXOM2D6AOuwQ3r9awHzrD7dLcvBJiEECosuK9mSspF1Nlwx-DVFCEk_6m32wkmb8B6Jp3aecKEu/s320/ug-msa-free-3.png" width="320" /></a></div>
<span style="border: 0px; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 18px; font-weight: bold; list-style: none; margin: 0px; padding: 0px; vertical-align: baseline;">Note:</span><span style="background-color: #f4f4f6; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px;"> all deleted messages and contacts are highlighted in Red color</span><br />
<h2 style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 20px; list-style: none; margin: 0px 0px 25px; padding: 0px; vertical-align: baseline;">
STEP 4: Recover Lost Files on Android</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRACDzcfAna6ewlTdfE7KP5lH4n99TZ0DI9W2YT19myjXmMot5meOMHaysPzeFeeDCMwnbftl3xaMB5K60EnrsDDL0Mhrw-NgPLplAdWhlNM8YiA6ZymKoxXvu-1i63oFeu6BXowBHV2Qn/s1600/ug-msa-free-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="600" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRACDzcfAna6ewlTdfE7KP5lH4n99TZ0DI9W2YT19myjXmMot5meOMHaysPzeFeeDCMwnbftl3xaMB5K60EnrsDDL0Mhrw-NgPLplAdWhlNM8YiA6ZymKoxXvu-1i63oFeu6BXowBHV2Qn/s320/ug-msa-free-4.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="border: 0px; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 18px; font-weight: bold; list-style: none; margin: 0px; padding: 0px; text-align: left; vertical-align: baseline;">Note:</span><span style="background-color: #f4f4f6; color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif; font-size: 16px; text-align: left;"> please don't save recovered data on your Android device until you get all deleted or lost files back again in case that some retrieved data may be overwritten and cannot be recovered forever</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="step_title" style="background-color: white; border: 0px; color: #2f2f2f; font-family: laoui, Arial, Calibri, sans-serif; font-size: 22px; line-height: 30px; list-style: none; margin-bottom: 6px; padding: 0px; text-align: center; vertical-align: baseline;">
<br /></div>
<div class="pro_des" style="background-color: white; border: 0px; line-height: 25px; list-style: none; margin-bottom: 44.7813px; margin-top: -22.3906px; padding: 0px; text-align: center; vertical-align: baseline;">
<div style="color: #2f2f2f; font-family: laoui, arial, calibri, sans-serif; font-size: 16px;">
<br /></div>
<span style="color: #2f2f2f; font-family: "laoui" , "arial" , "calibri" , sans-serif;">For more Detials: https://www.easeus.com/tutorial/mobisaver-android-free-user-guide.html</span></div>
</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-46446469665324890622019-07-15T02:17:00.000-07:002019-07-15T02:18:14.571-07:00<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif; font-size: medium;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDfxmzr28BPDQfvj5lH15yjVT_yxVtw49cWRfOh6IQywCtAqII0EtX9kSOft6UAFwahEy6RAqkjlj80V0_n7ugA1fV4qa4rgyQzvLTOz1jj4q10Sk9SehkPDymIeH8-sLfLUw-V2MRFozl/s1600/maxresdefault.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDfxmzr28BPDQfvj5lH15yjVT_yxVtw49cWRfOh6IQywCtAqII0EtX9kSOft6UAFwahEy6RAqkjlj80V0_n7ugA1fV4qa4rgyQzvLTOz1jj4q10Sk9SehkPDymIeH8-sLfLUw-V2MRFozl/s640/maxresdefault.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<br /></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif; font-size: medium;">Quantum Break System PC Requirements/Specifications </span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"><br /></span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif;">● OS: Windows 7 and higher </span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif;">● DirectX: 11 </span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif;">● Processor: Intel Core i5-4460, 2.70GHz or AMD FX-6300 </span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif;">● Graphics: NVIDIA GeForce GTX 760 or AMD Radeon R7 260x </span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white; font-family: "verdana" , sans-serif;">● RAM:<span style="white-space: pre;"> </span>8 GB </span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"><span style="font-family: "verdana" , sans-serif;">Quantum Break From Remedy Entertainment, the masters of cinematic action games, comes Quantum Break, a time-amplified suspenseful blockbuster. The Quantum Break experience is part game, part live action show—where decisions</span><span style="font-family: "verdana" , sans-serif;"> in one dramatically affect the other.";</span></span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"><span style="font-family: "verdana" , sans-serif;"></span></span></div>
<a name='more'></a><span style="background-color: white;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span>
<br />
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"></span></div>
<div style="font-family: "Times New Roman"; font-size: medium; text-align: center;">
<span style="background-color: white;"><span style="background-color: white;"><span style="color: red; font-family: "trebuchet ms" , sans-serif;"><b>DOWNLOAD:</b></span></span></span></div>
<span style="background-color: white;">
</span>
<br />
<div class="separator" style="clear: both; font-family: "Times New Roman"; font-size: medium; text-align: center;">
<span style="background-color: white;"><a target="_blank" href="https://worldofpcgames.com/quantum-break-full-pc-game-download-full-version/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="242" data-original-width="290" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYw-KqI8-36VLaluNkN4dYqt6YM_Et9hLc0_dbcQP_3Nc7LNwAYFif9emXVAVKuaXEtiZKjC-rcY1mrjZvydSl30F66vfmoOOEYGCKi-SqT23yYHuKDHVC6AKa26HDkRAa5jvwKULplork/s200/giphy.gif" style="font-family: "times new roman";" width="200" /></a></span></div>
<span style="background-color: white;">
</span>
<br />
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPlJYRJ2mr4-FViaRjRoCuTv7UXw9S6rVr_hmoxGSo-iuqgjrY0Ik79QcvwpmZmhvQpl9WivxXWC3kgNXwqfBguQJzglc96M0HUDLhaDquJEeRShWV4xsNoyYqZuMkHNgWD9zygshd2sBa/s1600/Quantum_Break.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPlJYRJ2mr4-FViaRjRoCuTv7UXw9S6rVr_hmoxGSo-iuqgjrY0Ik79QcvwpmZmhvQpl9WivxXWC3kgNXwqfBguQJzglc96M0HUDLhaDquJEeRShWV4xsNoyYqZuMkHNgWD9zygshd2sBa/s400/Quantum_Break.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfch45RWV9-gSqBJLlNKLIl9dbBWHEq-CEE8pNdJaIoNFRs2Xe0TgXyvVkU3IcgqmnF-VwQ0mcx42NF7_Zq7Sm9C4-l6Pzuxxj488Y9HzWu1E1Lsd0MtCpH5twhRVzsdCaGd2x4t1qo5_Q/s1600/2016-04-13-image-15.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="619" data-original-width="1100" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfch45RWV9-gSqBJLlNKLIl9dbBWHEq-CEE8pNdJaIoNFRs2Xe0TgXyvVkU3IcgqmnF-VwQ0mcx42NF7_Zq7Sm9C4-l6Pzuxxj488Y9HzWu1E1Lsd0MtCpH5twhRVzsdCaGd2x4t1qo5_Q/s400/2016-04-13-image-15.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK-X_9H8JF6vo_mgnrR81WD9m0Utu06ccjW4E79H91U15YStuTowtV45EcxztzWFNmYgI_am0wZ_WWsP6QKwPSzQKW7xymEaj2rMoFbogzv3qXaPes_unslK6_1-Rk0g6bo_U3qZd8qhfw/s1600/Watch-more-than-16-minutes-of-commented-Quantum-Break-gameplay.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK-X_9H8JF6vo_mgnrR81WD9m0Utu06ccjW4E79H91U15YStuTowtV45EcxztzWFNmYgI_am0wZ_WWsP6QKwPSzQKW7xymEaj2rMoFbogzv3qXaPes_unslK6_1-Rk0g6bo_U3qZd8qhfw/s400/Watch-more-than-16-minutes-of-commented-Quantum-Break-gameplay.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; font-family: Roboto, Arial, Helvetica, sans-serif; font-size: 13px;">
<span style="background-color: white;"><span style="font-family: "verdana" , sans-serif;"><br /></span></span></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-74345738532131201522019-07-03T17:19:00.000-07:002019-07-03T17:19:26.520-07:00PHP MySQLi Prepared Statements Tutorial to Prevent SQL Injection<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_BOe2m0DiDhk5_uzjBMQoT5S1MjkVZe9bAKVFH_yZDU7mGb6tvVt84FcwOYa07G5nQOkhmhrwfIJ3Qvv2eHJBf7Zw4BKMjbllgvtW5esEM516G__-ZhmT28g8ITv85POjxVPUVzEq2iw-/s1600/hacking_terms.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="clear: left; float: left; font-family: "trebuchet ms" , sans-serif; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="502" data-original-width="798" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_BOe2m0DiDhk5_uzjBMQoT5S1MjkVZe9bAKVFH_yZDU7mGb6tvVt84FcwOYa07G5nQOkhmhrwfIJ3Qvv2eHJBf7Zw4BKMjbllgvtW5esEM516G__-ZhmT28g8ITv85POjxVPUVzEq2iw-/s640/hacking_terms.jpg" width="640" /></span></a></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span><span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span><br />
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span><br />
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span><br />
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "trebuchet ms" , sans-serif; font-size: 25px;">Introduction</span><br />
<div style="background-color: white; box-sizing: border-box; color: #333333; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: large;">Before </span>I start, if you'd like to see an even easier way to use MySQLi prepared statements, check out <a href="https://github.com/WebsiteBeaver/Simple-MySQLi" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; font-size: 16px; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">my wrapper class</a>. Also, here's a great resource to learn <a href="https://websitebeaver.com/php-pdo-prepared-statements-to-prevent-sql-injection" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; font-size: 16px; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">PDO prepared statements</a>, which is the better choice for beginners and most people in general.</span><br />
<a name='more'></a></div>
<div style="background-color: white; box-sizing: border-box; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="color: #333333;">A </span><span style="color: #0b5394;">hack attempt</span><span style="color: #333333;"> has recently been discovered, and it appears they are trying to take down the entire database. An impromptu staff meeting has been called at 2am, and everyone in the company is freaking out. Ironically, as the database manager, you remain the calmest. Why? You know that these scrubs are are no match for those prepared statements you coded! In fact, you find this humorous, as these hackers will likely be annoyed that they wasted their time with futile attempts.</span></span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Hopefully this scenario will never happen to your website. However, it is undoubtedly a good idea to take proper precautions. If implemented correctly, prepared statements (aka parameterized queries) offer superior protection against SQL injection. You basically just create the query template with placeholder values, and then replace the dummy inputs with the real ones. Escaping is not necessary, since it will treat the values as literals; all attempts to inject sql queries will be interpreted as such.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Prepared statements may seem intimidating at first, but once you get hang of it, it’ll seem like second nature to you. The goal of this tutorial is to transform someone with little to no knowledge of prepared statements, into an expert.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<em style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">Disclaimer: Don't actually be as laid back as this database manager. When it comes to security, you should never be complacent, no matter how secure you think your system is.</span></em></div>
<h2 class="blogInnerSectionTitle" id="how-sql-injection-works" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">How SQL Injection Works<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The following iconic comic, known as <em style="box-sizing: border-box;">Bobby Tables</em>, is an excellent portrayal of how an SQL injection attack might work. All credit for the image goes to <a href="https://xkcd.com/327/" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">this site</a> for this classic piece of rhetoric.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<img alt="Bobby Tables" src="https://s3.amazonaws.com/websitebeaver/blog/prepared-statements-in-php-mysqli-to-prevent-sql-injection/0.jpg" style="border: 0px; box-sizing: border-box; display: block; margin: 0px auto; max-width: 100%; vertical-align: middle;" /></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Now that we're done with the theory, let's get to practice. Before I start, if you're wondering exactly how the "<em style="box-sizing: border-box;">Bobby Tables</em> Attack" works, check out <a href="https://stackoverflow.com/a/332367" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">this explanation</a>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">In a normal MySQL call, you would do something like:</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">query</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT * FROM myTable WHERE name='$name'"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The problem with this, is that if it is based off of user input, like in the example, then a malicious user could do <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">' OR '1'='1</code>. Now this statement will always evaluate to true, since <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">1=1</code>. In this case, the malicious user now has access to your entire table. Just imagine what could happen if it were a <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">DELETE</code> query instead. Take a look at what is actually happening to the statement.</span></div>
<pre class="language-sql code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-sql" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">SELECT</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">*</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">FROM</span> myTable <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">WHERE</span> name<span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token string" style="box-sizing: border-box; color: #669900;">''</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;"></span><mark style="background: rgb(252, 248, 227); box-sizing: border-box; padding: 0.2em;"><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">OR</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'1'</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token string" style="box-sizing: border-box; color: #669900;">'1'</span></mark><span class="token string" style="box-sizing: border-box; color: #669900;"></span> </span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">A hacker could do a lot of damage to your site if your queries are set up like this. An easy fix to this would be to do:</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">real_escape_string</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">query</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT * FROM myTable WHERE name='$name'"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Notice how similar to the first example, I still added quotes to the column value. <span style="box-sizing: border-box; font-weight: 600;">Without quotes, strings are still equally susceptible to SQL injection</span>. If you'll be using a LIKE clause, then you should also do <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">addcslashes($escaped, '%_')</code>, since <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli::real_escape_string</code> won't do this <a href="http://php.net/manual/en/mysqli.real-escape-string.php#96429" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">as stated here</a>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This covers strings, as the function name implies, but what about numbers? You could do <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">(int)$mysqli->real_escape_string($_POST['name'])</code>, which would certainly work, but that's redundant. If you're casting the variable to an int, you don't need to escape anything. You are already telling it to essentially make sure that the value will be an integer. Doing <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">(int)$_POST['name']</code> would suffice. Since it is an integer you also obviously do not need to add quotes to the sql column <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">name</code>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">In reality, if you follow these instructions perfectly, it should be enough to use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli::real_escape_string</code> for strings and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">(int)$var</code> for integers. Just don't forget to set the default character set. This can be set in either the php.ini (should be the default value) like <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">default_charset = "utf-8"</code> and by using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->set_charset('utf8mb4')</code> on each page that uses <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->real_escape_string()</code>. But only for things that are legal in prepared statements, which are values in a WHERE statement or column <em style="box-sizing: border-box;">values</em>; <span style="box-sizing: border-box; font-weight: 600;">don't use this for table/column <em style="box-sizing: border-box;">names</em> or SQL keywords</span>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Regardless, I still <em style="box-sizing: border-box;">strongly</em> suggest using prepared statements, as they are clearly more suited to protect against SQL injection and less prone to mistakes, since you don't have to worry about manually formatting — instead you just have to replace dummy placeholders with your values. Of course you'll still want to filter and sanitize your inputs to prevent XSS however. With prepared statements statements, there are fewer aspects to consider, along with some <a href="http://stackoverflow.com/questions/5741187/sql-injection-that-gets-around-mysql-real-escape-string/12118602#12118602" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">edge cases to break</a><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->real_escape_string()</code> (Not properly setting the charset is one of the causes.). In summation, <span style="box-sizing: border-box; font-weight: 600;">there's absolutely no good reason to be using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">real_escape_string()</code> over prepared statements.</span> I merely showed how to manually format your queries with it, to show that it's possible. In reality, it would be foolish to not use prepared statements to prevent SQL injection.</span></div>
<h2 class="blogInnerSectionTitle" id="how-mysqli-prepared-statements-work" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">How MySQLi Prepared Statements Work<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">In plain English, this is how MySQLi prepared statements work in PHP:</span></div>
<ol style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; list-style-position: inside; margin-bottom: 10px; margin-top: 0px; padding-left: 0px;">
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">Prepare an SQL query with empty values as placeholders (with a question mark for each value).</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">Bind variables to the placeholders by stating each variable, along with its type.</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">Execute query.</span></li>
</ol>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The four variable types allowed:</span></div>
<ul style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; list-style-position: inside; margin-bottom: 10px; margin-top: 0px; padding-left: 0px;">
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">i - Integer</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">d - Double</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">s - String</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">b - Blob</span></li>
</ul>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">A prepared statement, as its name implies, is a way of preparing the MySQL call, without storing the variables. You tell it that variables will go there eventually — just not yet. The best way to demonstrate it is by example.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT * FROM myTable WHERE name = ? AND age = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token comment" style="box-sizing: border-box; color: slategrey;">//fetching result would go here, but will be covered later</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">If you've never seen prepared statements before, this may look a little weird. Basically what's happening is that you are creating a template for what the SQL statement will be. In this case, we are selecting everything from <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">myTable</code>, where <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">name</code> and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">age</code> equal <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">?</code>. The question mark is just a placeholder for where the values will go.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_param()</code> method is where you attach variables to the dummy values in the prepared template. Notice how there are two letters in quotes before the variables. This tells the database the variable types. The <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">s</code> specifies that name will be a string value, while the <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">i</code> forces age to be an integer. This is precisely why I didn't add quotation marks around the question mark for name, like I normally would for a string in an SQL call. You probably thought I just forgot to, but the reality is that there is simply no need to (In fact, it actually won't work if you do put quotes around the <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">?</code>, since it will be treated as a string literal, rather than a dummy placeholder.). You are already telling it that it will be a string literal when you call <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_param()</code>, so even if a malicious user tries to insert SQL into your user inputs, it will still be treated as a string. <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->execute()</code> then actually runs the code; the last line simply closes the prepared statement. We will cover fetching results in the Select section.</span></div>
<h3 id="creating-a-new-mysqli-connection" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Creating a New MySQLi Connection</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Creating a new MySQLi is pretty simple. I suggest naming a file called <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_connect.php</code> and place this file outside of your root directly (html, public_html) so your credentials are secure. We'll also be using exception handling, by utilizing <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)</code>. This might look weird to you, especially if you've never used a <a href="http://php.net/manual/en/language.operators.bitwise.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">bitwise operator</a> before. But all it's doing is reporting all errors, while converting them to exceptions, using the <a href="http://php.net/manual/en/class.mysqli-sql-exception.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">mysqli_sql_exception class</a>.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">new</span> <span class="token class-name" style="box-sizing: border-box;">mysqli</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"localhost"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"username"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"password"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"databaseName"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">connect_error</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Error connecting to database'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//Should be a message a typical user could understand in production</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">mysqli_report</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_REPORT_ERROR</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">|</span> <span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_REPORT_STRICT</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">set_charset</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"utf8mb4"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">A lot of tutorials, including the PHP manual, show how to use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->connect_error()</code> by printing it in <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">exit()</code> or <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">die()</code>. But this isn't really necessary (not to mention incredibly stupid, as you will be printing out this info to the world), since the error message will be appended to your error log anway. The message in <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">exit()</code> should be something a normal user could understand, like <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">exit('Something weird happened')</code>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You would think that setting the charset to <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">utf-8</code> in your php.ini would suffice, along with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">utf8mb4</code>for your entire database, but sometimes weird errors happen if you don't set it in your php file too, <a href="http://php.net/manual/en/mysqli.construct.php#115143" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">as noted here</a>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You can alternatively instantiate it in a try/catch block if you enable internal reporting, which I mention in the error handling section. <span style="box-sizing: border-box; font-weight: 600;">Please don't ever report errors directly on your site in production.</span> You'll be kicking yourself for such a silly mistake, since it will print out your sensitive database information (username, password and database name). Here's what your php.ini file should look like in production: do both <span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">display_errors = Off</code></span> and <span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">log_errors = On</code></span>. Also, do not echo the error in production.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token function" style="box-sizing: border-box; color: #dd4a68;">mysqli_report</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_REPORT_ERROR</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">|</span> <span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_REPORT_STRICT</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">try</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">new</span> <span class="token class-name" style="box-sizing: border-box;">mysqli</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"localhost"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"username"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"password"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"databaseName"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">set_charset</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"utf8mb4"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">catch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span>Exception <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">error_log</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">getMessage</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Error connecting to database'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//Should be a message a typical user could understand</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">If you prefer using <a href="http://php.net/manual/en/function.set-exception-handler.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">set_exception_handler()</a> instead of <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">try/catch</code>, you can do the following to avoid nesting. If you are using this method, you need to understand that it will affect every page its in included in. Therefore, you must either reuse the function again with a custom message for each page or use <a href="http://php.net/manual/en/function.restore-exception-handler.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">restore_exception_handler()</a> to revert back to the built in PHP one. If you made multiple ones, it will go to the previous one your made.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token function" style="box-sizing: border-box; color: #dd4a68;">mysqli_report</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_REPORT_ERROR</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">|</span> <span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_REPORT_STRICT</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">set_exception_handler</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">function</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">error_log</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">getMessage</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Error connecting to database'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//Should be a message a typical user could understand</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">new</span> <span class="token class-name" style="box-sizing: border-box;">mysqli</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"localhost"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"username"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"password"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"databaseName"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">set_charset</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"utf8mb4"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">There's a very of serious repercussion of using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report()</code>, which is that it will report your sensitive database information. You have three options to still use it but <em style="box-sizing: border-box;">not</em> report your password.</span></div>
<ol style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; list-style-position: inside; margin-bottom: 10px; margin-top: 0px; padding-left: 0px;">
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">You can also use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report()</code> strictly on everything <em style="box-sizing: border-box;">except</em> for creating the connection if you do it the first method I showed with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->connect_error</code> (password not shown) and just place <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report()</code> <em style="box-sizing: border-box;">after</em> <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">new mysqli()</code>.</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">If you call <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report()</code> <em style="box-sizing: border-box;">before</em> creating a connection, then <span style="box-sizing: border-box; font-weight: 600;">you need to ensure that it's in a try/catch block and you specifically print in your error log <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$e->getMessage()</code>, not <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$e</code>, which still contains your sensitive information</span>. This obviously strictly applies to the constructor.</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">Use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">set_exception_handler()</code> in the same manner as 2 and use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$e->getMessage()</code>.</span></li>
</ol>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">I strongly recommend doing one of these methods. Even if you are diligent and ensure all your errors only goes in your error log, I personally don't see why anyone would need to log their password. You'll already know what the issue is anyway.</span></div>
<h2 class="blogInnerSectionTitle" id="insert-update-and-delete" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Insert, Update and Delete<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Inserting, updating and deleting have an identical syntax, so they will be combined.</span></div>
<h3 id="insert" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Insert</span></h3>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"INSERT INTO myTable (name, age) VALUES (?, ?)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="update" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Update</span></h3>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"UPDATE myTable SET name = ? WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="delete" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Delete</span></h3>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"DELETE FROM myTable WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"i"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Get Number of Affected Rows</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You may also want to check the status of a row you inserted, updated or deleted. Here's how you would it if you're updating a row.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"UPDATE myTable SET name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">affected_rows</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">===</span> <span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows updated'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">In this case, we checked to see if any rows got updated. For reference, here's the usage for <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli::$affected_rows</code> return values.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;">-1</span> - query returned an error; redundant if there is already error handling for <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">execute()</code></span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;">0</span> - no records updated on <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">UPDATE</code>, no rows matched the <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">WHERE</code> clause or no query has been executed</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;">Greater than 0</span> - returns number of rows affected; comparable to <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_result::$num_rows</code> for <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">SELECT</code></span></div>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Get Rows Matched</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">A common problem with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->affectedRows</code> is that it makes it impossible to know why it returned zero on an UPDATE. This is due to the fact that it prints the amount of rows changed, so it makes ambiguous if you update your value(s) with the same data.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">An awesome feature that is unique to MySQLi, and doesn't exist in PDO, is the ability to get more info about a query. You can technically achieve it in PDO, but it can only be done in the connection, therefore you can't choose.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"UPDATE myTable SET name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">echo</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">info</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This will print:</span></div>
<pre style="background-color: whitesmoke; border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; color: #333333; font-size: 13px; line-height: 1.42857; margin-bottom: 10px; margin-top: 10px; overflow-wrap: break-word; overflow: auto; padding: 9.5px; word-break: break-all;"><code style="background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-size: inherit; padding: 0px; white-space: pre-wrap;"><span style="font-family: "trebuchet ms" , sans-serif;">Rows matched: 1 Changed: 0 Warnings: 0
</span></code></pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">I find this to be a rather imprudent implementation, as it's extremely inelegant to use it as is. Luckily we can change that, by converting it to an associative array. All credit goes do this <a href="http://php.net/manual/en/mysqli.affected-rows.php#116152" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">helpful commenter</a> on the PHP docs. While using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli->info</code> for UPDATE is by far its most common use case, it can be used for some <a href="http://php.net/manual/en/mysqli.info.php#refsect1-mysqli.info-description" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">other query types</a> as well.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token function" style="box-sizing: border-box; color: #dd4a68;">preg_match_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'/(\S[^:]+): (\d+)/'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">info</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$matches</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$infoArr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> array_combine <span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$matches</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">1</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$matches</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">2</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$infoArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Now this will output an array.</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Rows matched'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'1'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Changed'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'0'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Warnings'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'0'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Get Latest Primary Key Inserted</span></h3>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"INSERT INTO myTable (name, age) VALUES (?, ?)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">echo</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">insert_id</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Check if Duplicate Entry</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This is useful if you were to create a unique constraint on a table, so duplicates aren't allowed. You can even do this for multiple columns, so it will have to be that exact permutation. If exception handling were turned off, you'd check the error code with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->errno</code>. With exception handling turned on, you could choose between that or the generic exception method <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$e->getCode()</code>. Note, this differs from PDOException, which will print the SQLSTATE, rather than the error code.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Here's a <a href="https://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html#error_er_dup_entry" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">list of error messages</a>. The error code for a duplicate row entry from either an update or insert is <span style="box-sizing: border-box; font-weight: 600;">1062</span> and SQLSTATE is <span style="box-sizing: border-box; font-weight: 600;">23000</span>. To specifically check for SQLSTATE, you must use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->sqlstate</code>.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">try</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"INSERT INTO myTable (name, age) VALUES (?, ?)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">catch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span>Exception <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">errno</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">===</span> <span class="token number" style="box-sizing: border-box; color: #990055;">1062</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">echo</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Duplicate entry'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This is how you would set a unique constraint:</span></div>
<pre class="language-sql code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-sql" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">ALTER</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">TABLE</span> myTable <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">ADD</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">CONSTRAINT</span> unique_person <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">UNIQUE</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span>name<span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> age<span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h2 class="blogInnerSectionTitle" id="select" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Select<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">All select statements in parameterized queries will start off about the same. However, there is a key difference to actually storing and fetching the results. The two methods that exist are <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">get_result()</code>and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code>.</span></div>
<h3 id="get-result" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">get_result()</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This is the more versatile of the two, as it can be used for any scenario. It should be noted that this requires mysqlnd, which has been included in PHP since 5.3 and has been the default native driver since 5.4, <a href="https://dev.mysql.com/downloads/connector/php-mysqlnd/" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">as stated here</a>. I doubt many people are using older versions than that, so you should generally stick with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">get_result()</code>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This essentially exposes the regular, non-prepared mysqli_result api. Meaning, that once you do <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result = get_result()</code>, you can use it exactly the same way you'd use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result = $mysqli->query()</code>.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Now you can use the following methods for fetching one row at a time or all at once. Here's just some of the most common ones, but you can take a look at <a href="http://php.net/manual/en/class.mysqli-result.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">the entire mysqli_result class</a> for all of its methods.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="box-sizing: border-box; font-weight: 600;"><span style="font-family: "trebuchet ms" , sans-serif;">One Row</span></span></div>
<ul style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; list-style-position: inside; margin-bottom: 10px; margin-top: 0px; padding-left: 0px;">
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->fetch_assoc()</code></span> - Fetch an associative array</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->fetch_row()</code></span> - Fetch a numeric array</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->fetch_object()</code></span> - Fetch an object array</span></li>
</ul>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="box-sizing: border-box; font-weight: 600;"><span style="font-family: "trebuchet ms" , sans-serif;">All</span></span></div>
<ul style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; list-style-position: inside; margin-bottom: 10px; margin-top: 0px; padding-left: 0px;">
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->fetch_all(MYSQLI_ASSOC)</code></span> - Fetch an associative array</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->fetch_all(MYSQLI_NUM)</code></span> - Fetch a numeric array</span></li>
</ul>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT * FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">num_rows</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">===</span> <span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_assoc</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ids</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$names</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ages</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ages</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Output:</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">22</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">18</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">19</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">27</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">36</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">7</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="bind-result" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">bind_result()</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You might be wondering, why even use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code>? I personally find it to be far inferior to <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">get_result()</code> in every scenario, except for when fetching a single row into separate variables. Also, before <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">get_result()</code> existed and mysqlnd became built into PHP, this was your only option, which is why a lot of legacy code might be using it.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The most annoying part about using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code> is that you must bind <em style="box-sizing: border-box;">every</em> single column you select and then traverse the values in a loop. This is obviously not ideal for a plethora of values or to use with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">*</code>. The star selector is especially annoying to use with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code>, since you don't even know what those values are without looking in the database. Additionally, this makes your code exceedingly unmaintainable with changes to the table. This usually won't matter, as you shouldn't be using the wildcard selector in production mode anyway (but you know you are).</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">store_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">num_rows</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">===</span> <span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$idRow</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$nameRow</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ageRow</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ids</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$idRow</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$names</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$nameRow</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ages</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ageRow</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$ids</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Output:</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">106</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">221</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">3</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">55</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">583</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">72</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="fetch-all-selected-rows-in-associative-array" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Fetch Associative Array</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">I find this to be the most common use case typically. I will also be utilizing chaining in the following, though that's obviously not necessary.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_ASSOC</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">If you need to modify the result set, then you should probably use a while loop with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">fetch_assoc()</code>and fetch each row one at a time.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_assoc</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Output:</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">27</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Jessica'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">27</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">432</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Jimmy'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">19</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You can actually do this using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code> as well, although it was clearly not designed for it. Here's <a href="http://php.net/manual/en/mysqli-stmt.bind-result.php#85470" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">a clever solution</a>, though I personally feel like it's something that's cool to know is possible, but realistically shouldn't be used.</span></div>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Fetch Numeric Array</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This follows the same format as an associative array. To get the entire array in one command, without a loop, you'd use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_result->fetch_all(MYSQLI_NUM)</code>. If you need to fetch the results in a loop, you must to use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_result->fetch_row()</code>.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT location, favorite_color, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_NUM</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">And of course, the while loop adaptation.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT location, favorite_color, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Output:</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Boston'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'green'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">28</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Seattle'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'blue'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">49</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Atlanta'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'pink'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">24</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="fetch-single-row" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Fetch Single Row</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">I personally find it simpler to use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code> when I know for fact that I will only be fetching one row, as I can access the variables in a cleaner manner.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">store_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">num_rows</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">===</span> <span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$id</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">echo</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//Output: 'Ryan'</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Now you can use just simply use the variables in <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code>, like <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$name</code> since you know they will only contain one value, not an array.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Here's the <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">get_result()</code> version:</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_assoc</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You would then use the variable as <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$arr['id']</code> for example.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Output:</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">36</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Kevin'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">39</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Fetch Array of Objects</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This very similar to fetching an associative array. The only main difference is that you'll be accessing it like <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$arr[0]->age</code>. Also, in case you didn't know, objects are pass by value, while arrays are by reference.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_object</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Output:</span></div>
<pre class="language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span>
stdClass Object <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">27</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Jessica'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">27</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span>
stdClass Object <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">432</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Jimmy'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span> <span class="token number" style="box-sizing: border-box; color: #990055;">19</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You can even add property values to an existing class as well. However, it should be noted that there is a potential gotcha, according to <a href="http://php.net/manual/en/mysqli-result.fetch-object.php#109186" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">this comment</a> in the PHP docs. The problem is that if you have a default value in your constructor with a duplicate variable name, it will fetch the object first and <em style="box-sizing: border-box;">then</em> set the constructor value, therefore overwriting the fetched result. Weirdly enough, there was <a href="https://bugs.php.net/bug.php?id=72151" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">a "bug"</a> from PHP 5.6.21 to 7.0.6 where this wouldn't happen. Even though this violates principles of OOP, some people would like this feature, even though it was bug in certain versions. Something like <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">PDO::FETCH_PROPS_LATE</code> in PDO should be implemented in MySQLi to give you the option to choose.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">class</span> <span class="token class-name" style="box-sizing: border-box;">myClass</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_object</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'myClass'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">As the comment states, this is how you would do it correctly. All you need is a simple if condition to check if the variable equals the constructor value — if it doesn't, just don't set it in the constructor. This is essentially the same as using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">PDO::FETCH_PROPS_LATE</code> in PDO.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">class</span> <span class="token class-name" style="box-sizing: border-box;">myClass</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">private</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$id</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">public</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">function</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">__construct</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$id</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$this</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">id</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">===</span> <span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$this</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token property" style="box-sizing: border-box; color: #990055;">id</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$id</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">while</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$result</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_object</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'myClass'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$row</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Another unexpected, yet potentially useful behavior of using <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">fetch_object('myClass')</code> is that you can modify private variables. I'm really not sure how I feel about this, as this seems to violate principles of encapsulation.</span></div>
<h3 id="conclusion" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Conclusion</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;">bind_result()</span> - best used for fetching single row without too many columns or <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">*</code>; extremely inelegant for associative arrays.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="box-sizing: border-box; font-weight: 600;">get_result()</span> - is the preferred one for almost every use-case.</span></div>
<h2 class="blogInnerSectionTitle" id="like" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Like<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You would probably think that you could do something like:</span></div>
<pre class="blurredOutCode language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; opacity: 0.3; overflow-wrap: normal; overflow: auto; padding: 1em; position: relative; tab-size: 4; text-shadow: white 0px 1px; transition: opacity 0.2s ease-in-out 0s; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; tab-size: 4; text-shadow: white 0px 1px; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE Name LIKE %?%"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
</span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">But this is not allowed. The <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">?</code> placeholder must be the entire string or integer literal value. This is how you would do it correctly.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$search</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token string" style="box-sizing: border-box; color: #669900;">"%{$_POST['search']}%"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name LIKE ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$search</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_ASSOC</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h2 class="blogInnerSectionTitle" id="where-in-array" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Where In Array<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This is definitely something I'd like to see improved in MySQLi. For now, using MySQLi prepared statements with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">WHERE IN</code> is possible, but feels a little long-winded.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<em style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;">Side note: The following two examples use the <a href="http://php.net/manual/en/migration56.new-features.php#migration56.new-features.splat" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">splat operator</a> for argument unpacking, which requires PHP 5.6+. If you are using a version lower than that, then you can substitute it with<code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">call_user_func_array()</code>.</span></em></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">12</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">23</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">44</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$clause</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">implode</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">','</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">array_fill</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">count</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'?'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//create 3 question marks</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$types</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">str_repeat</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'i'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">count</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//create 3 ints for bind_param</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name FROM myTable WHERE id IN ($clause)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$types</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$resArr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_ASSOC</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$resArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$resArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="with-other-placeholders" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">With Other Placeholders</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The first example showed how to use the <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">WHERE IN</code> clause with dummy placeholder solely inside of it. What if you wanted to use other placeholders in different places?</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">12</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">23</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token number" style="box-sizing: border-box; color: #990055;">44</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$clause</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">implode</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">','</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">array_fill</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token number" style="box-sizing: border-box; color: #990055;">0</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">count</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'?'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//create 3 question marks</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$types</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">str_repeat</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'i'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">count</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//create 3 ints for bind_param</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$types</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'i'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//add 1 more int type</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$fullArr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">array_merge</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$inArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token number" style="box-sizing: border-box; color: #990055;">26</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//merge WHERE IN array with other value(s)</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name FROM myTable WHERE id IN ($clause) AND age > ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$types</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">.</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$fullArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//4 placeholders to bind</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$resArr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_ASSOC</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">if</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">!</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$resArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'No rows'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">var_export</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$resArr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h2 class="blogInnerSectionTitle" id="multiple-prepared-statements-in-transactions" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Multiple Prepared Statements in Transactions <span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This might seem odd why it would even warrant its own section, as you can literally just use prepared statements one after another. While this will certainly work, this does not ensure that your queries are atomic. This means that if you were to run ten queries, and one failed, the other nine would still succeed. If you want your SQL queries to execute only if they all succeeded, then you must use transactions.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">try</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">autocommit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">FALSE</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//turn on transactions</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt1</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"INSERT INTO myTable (name, age) VALUES (?, ?)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt2</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"UPDATE myTable SET name = ? WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt1</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'age'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt2</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt1</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt2</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt1</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt2</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">autocommit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">TRUE</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//turn off transactions + commit queued queries</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">catch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span>Exception <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">rollback</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//remove all queries from queue if error (undo)</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">throw</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="reuse-same-template-different-values" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Reuse Same Template, Different Values</span></h3>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">try</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">autocommit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">FALSE</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//turn on transactions</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"INSERT INTO myTable (name, age) VALUES (?, ?)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'John'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token number" style="box-sizing: border-box; color: #990055;">21</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Rick'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token number" style="box-sizing: border-box; color: #990055;">24</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">autocommit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">TRUE</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//turn off transactions + commit queued queries</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">catch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span>Exception <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">rollback</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//remove all queries from queue if error (undo)</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">throw</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h2 class="blogInnerSectionTitle" id="error-handling" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Error Handling<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<h3 id="fatal-error-uncaught-error-call-to-a-member-function-bind-param-on-boolean" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Fatal error: Uncaught Error: Call to a member function bind_param() on boolean</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Anyone who's used MySQLi prepared statements has seen this message at some point, but what does it mean? Pretty much nothing at all. So how do you fix this, you might ask? To start, don't forget to turn on exception handling, instead of error handling <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)</code> when you <a href="https://websitebeaver.com/prepared-statements-in-php-mysqli-to-prevent-sql-injection#creating-a-new-mysqli-connection" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;">create a new connection</a>.</span></div>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Exception Handling</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">All of the mysqli functions return false on failure, so you could easily just check for truthiness on each function and report errors with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->error</code>. However, this is very tedious, and there's a more elegant way of doing this if you enable internal reporting. I recommend doing it this way, as it's much more portable from development to production.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This can be used in production too, as long as you have an error log set up for all errors; this needs to be set in the php.ini. <span style="box-sizing: border-box; font-weight: 600;">Please don't ever report errors directly on your site in production.</span>You'll be kicking yourself for such a silly mistake. The placement of <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report()</code> matters also. if you place it <em style="box-sizing: border-box;">before</em> creating a new connection then it will output your password too; otherwise, it will just report everything after, like your queries.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Here's what your php.ini file should look like in production: do both <span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">display_errors = Off</code></span> and <span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">log_errors = On</code></span>. Also, keep in mind that each page should really only be using a single, global, <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">try/catch</code> block, rather than wrapping each query individually. The only <em style="box-sizing: border-box;">exception</em> to this is with transactions, which would be nested, but throw its own exception, so the global <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">try/catch</code> can "catch" it.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">try</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"DELETE FROM myTable WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"i"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"SELECT id, name, age FROM myTable WHERE name = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"s"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_POST</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'name'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$arr</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">get_result</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">fetch_all</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">MYSQLI_ASSOC</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">try</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">autocommit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">FALSE</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//turn on transactions</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"INSERT INTO myTable (name, age) VALUES (?, ?)"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"si"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'John'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token number" style="box-sizing: border-box; color: #990055;">21</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$name</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token string" style="box-sizing: border-box; color: #669900;">'Rick'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$age</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token number" style="box-sizing: border-box; color: #990055;">24</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">autocommit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token constant" style="box-sizing: border-box; color: #990055;">TRUE</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//turn off transactions + commit queued queries</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">catch</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span>Exception <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">rollback</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span> <span class="token comment" style="box-sizing: border-box; color: slategrey;">//remove all queries from queue if error (undo)</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">throw</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">catch</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token class-name" style="box-sizing: border-box;">Exception</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">error_log</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Error message for user to understand'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Custom Exception Handler</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><a href="https://websitebeaver.com/prepared-statements-in-php-mysqli-to-prevent-sql-injection#how-mysqli-prepared-statements-work" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;">As stated earlier</a>, you can alternatively use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">set_exception_handler()</code> on each page (or a global redirect). This gets rid of the layer of curly brace nesting. If you are using transactions, you should still use a try catch with that, but then throw your own exception.</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token function" style="box-sizing: border-box; color: #dd4a68;">set_exception_handler</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">function</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">error_log</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$e</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token function" style="box-sizing: border-box; color: #dd4a68;">exit</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">'Error deleting'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span> <span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">=</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$mysqli</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">prepare</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"DELETE FROM myTable WHERE id = ?"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">bind_param</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"i"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$_SESSION</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">[</span><span class="token string" style="box-sizing: border-box; color: #669900;">'id'</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">]</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">execute</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token variable" style="box-sizing: border-box; color: #ee9900;">$stmt</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">-</span><span class="token operator" style="background: rgba(255 , 255 , 255 , 0.5); box-sizing: border-box; color: #a67f59;">></span><span class="token function" style="box-sizing: border-box; color: #dd4a68;">close</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<h3 id="gotcha-with-exception-handling" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Gotcha with Exception Handling</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">You'd expect for all MySQLi errors to be converted to exceptions with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)</code>. Oddly enough, I noticed that it still gave me a warning error when <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_param()</code> had too many or too little bound variables or types. The message outputted is as follows:</span></div>
<blockquote style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-left: 5px solid rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-top-color: rgb(204, 204, 204); box-sizing: border-box; color: #333333; font-size: 17.5px; margin: 0px 0px 20px; padding: 10px 20px;">
<div style="box-sizing: border-box;">
<span style="font-family: "trebuchet ms" , sans-serif;">Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement</span></div>
</blockquote>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">A solution to this is to use a global error handler to trigger an exception. An example of this could be:</span></div>
<pre class="line-numbers language-php code-toolbar" style="background: rgb(245, 242, 240); border-bottom: none; border-image: initial; border-left: 4px solid rgb(204, 204, 204); border-radius: 0px; border-right: none; border-top: none; box-sizing: border-box; counter-reset: linenumber 0; font-size: 13px; hyphens: none; line-height: 1.5; margin-bottom: 10px; margin-top: 10px; overflow-wrap: normal; overflow: auto; padding: 1em 1em 1em 3.8em; position: relative; tab-size: 4; text-shadow: white 0px 1px; word-break: normal;"><code class=" language-php" style="background: none; border-radius: 0px; box-sizing: border-box; font-size: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0px; position: relative; tab-size: 4; text-shadow: white 0px 1px; white-space: inherit; word-break: normal; word-spacing: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><span class="token function" style="box-sizing: border-box; color: #dd4a68;">set_error_handler</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token keyword" style="box-sizing: border-box; color: #0077aa;">function</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token variable" style="box-sizing: border-box; color: #ee9900;">$errno</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$errstr</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$errfile</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">,</span> <span class="token variable" style="box-sizing: border-box; color: #ee9900;">$errline</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span> <span class="token punctuation" style="box-sizing: border-box; color: #999999;">{</span>
<span class="token keyword" style="box-sizing: border-box; color: #0077aa;">throw</span> <span class="token keyword" style="box-sizing: border-box; color: #0077aa;">new</span> <span class="token class-name" style="box-sizing: border-box;">Exception</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">(</span><span class="token string" style="box-sizing: border-box; color: #669900;">"$errstr on line $errline in file $errfile"</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span class="token punctuation" style="box-sizing: border-box; color: #999999;">}</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">)</span><span class="token punctuation" style="box-sizing: border-box; color: #999999;">;</span>
<span aria-hidden="true" class="line-numbers-rows" style="border-right: 1px solid rgb(153, 153, 153); box-sizing: border-box; left: -3.8em; letter-spacing: -1px; pointer-events: none; position: absolute; top: 0px; user-select: none; width: 3em;"><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span><span style="box-sizing: border-box; counter-increment: linenumber 1; display: block; pointer-events: none;"></span></span></span></code><div class="toolbar" style="box-sizing: border-box; opacity: 0; position: absolute; right: 0.2em; top: 0.3em; transition: opacity 0.3s ease-in-out 0s;">
<div class="toolbar-item" style="box-sizing: border-box; display: inline-block;">
<a href="https://www.blogger.com/null" style="background: rgba(224, 224, 224, 0.2); border-radius: 0.5em; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 0px 0px; box-sizing: border-box; color: #bbbbbb; cursor: pointer; font-size: 0.8em; padding: 0px 0.5em;"><span style="font-family: "trebuchet ms" , sans-serif;">Copy</span></a></div>
</div>
</pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">This only happened on runtime warnings, but I converted all errors to exceptions. I see no problem doing this, but there are some people who are strongly against it.</span></div>
<h2 class="blogInnerSectionTitle" id="some-extras" style="background-color: white; box-sizing: border-box; color: #333333; cursor: pointer; font-size: 25px; line-height: 1.1; margin-bottom: 5px; margin-top: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Some Extras<span class="blogSectionLink fa fa-link" style="box-sizing: border-box; color: #8a8787; display: inline-block; font-size: inherit; font-stretch: normal; font-weight: normal; line-height: 1; margin-left: 10px; opacity: 0; transition: 0.2s ease-in-out 0s;"></span></span></h2>
<h3 id="do-i-need-stmt-close" style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Do I Need $stmt->close()?</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Great question. Both <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->close()</code> and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->close()</code> essentially have the same effect. The former closes the MySQLi connection, while the latter closes the prepared statement. <span style="box-sizing: border-box; font-weight: 600;">TLDR;</span> both are actually generally not even necessary in most cases, since both will close once the script's execution is complete anyway. There's also a function to simply free the memory associated with the MySQLi result and prepared statement, respectively: <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->free()</code> and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->free()</code>. I myself, will likely never use it, but if you're interested, here's the one for <a href="http://www.php.net/manual/en/mysqli-result.free.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">the result</a> and for the <a href="http://www.php.net/manual/en/mysqli-stmt.free-result.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">the parameterized query</a>. The following should also be noted: both <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->close()</code> and the end of the execution of the script will the free up the memory anyway.</span></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Final verdict: I usually just do <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->close()</code> and <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->close()</code>, even though it can be argued that it's a little superfluous. If you are planning on using the same variable <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt</code> again for another prepared statements, then you must either close it, or use a different variable name, like <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt2</code>. Lastly, I have never found a need to simply free them, without closing them.</span></div>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">Classes: mysqli vs. mysqli_stmt vs. mysqli_result</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">One thing you may have realized along the way is that there are certain methods that exist in two of the classes, like an alias almost. I personally believe it would be better to only have one version, like in PDO, to avoid confusion.</span></div>
<ul style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; list-style-position: inside; margin-bottom: 10px; margin-top: 0px; padding-left: 0px;">
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><a href="http://php.net/manual/en/mysqli.affected-rows.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli::$affected_rows</code></span></a> or <a href="http://php.net/manual/en/mysqli-stmt.affected-rows.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_stmt::$affected_rows</code></span></a> - Belongs to <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_stmt</code>. Works the same with either, but will be an error if called <em style="box-sizing: border-box;">after</em> the statement is closed with either method</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><a href="http://php.net/manual/en/mysqli-result.num-rows.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_result::$num_rows</code></span></a> or <a href="http://php.net/manual/en/mysqli-stmt.num-rows.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_stmt::$num_rows</code></span></a> - <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$result->num_rows</code> can only be used with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">get_result()</code>, while <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->num_rows</code> can only be used with <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">bind_result()</code>.</span></li>
<li style="box-sizing: border-box;"><span style="font-family: "trebuchet ms" , sans-serif;"><a href="http://php.net/manual/en/mysqli.insert-id.phpp" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli::$insert_id</code></span></a> or <a href="http://php.net/manual/en/mysqli-stmt.insert-id.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank"><span style="box-sizing: border-box; font-weight: 600;"><code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli_stmt::$insert_id</code></span></a> - Belongs to <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">mysqli</code>. Better to use <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$mysqli->insert_id</code>, since it will still work even after <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->close()</code> is used. There's also a <a href="http://php.net/manual/en/mysqli-stmt.insert-id.php#102299" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">note</a> on the PHP docs from 2011 stating that <code style="background-color: #f9f2f4; border-radius: 4px; box-sizing: border-box; color: inherit; font-size: 14.4px; padding: 2px 4px;">$stmt->insert_id</code> will only get the first executed query. I tried this on my current version of 7.1 and this doesn't seem to be the case. The recommended one to use is the mysqli class version anyway.</span></li>
</ul>
<h3 style="background-color: white; box-sizing: border-box; color: #333333; font-size: 19px; line-height: 1.1; margin: 0px 0px 7px;">
<span style="font-family: "trebuchet ms" , sans-serif;">So Using Prepared Statements Means I'm Safe From Attackers?</span></h3>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-size: 16px; margin-bottom: 10px;">
<span style="font-family: "trebuchet ms" , sans-serif;">While you are safe from SQL injection, you still need validate and sanitize your user-inputted data. You can use a function like <a href="http://php.net/manual/en/function.filter-var.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">filter_var()</a> to validate <em style="box-sizing: border-box;">before</em> inserting it into the database and <a href="http://php.net/manual/en/function.htmlspecialchars.php" style="background-color: transparent; border-bottom: 2px solid white; box-sizing: border-box; color: #55acee; padding-bottom: 3px; text-decoration-line: none; transition: border-bottom-color 0.2s ease-in-out 0s;" target="_blank">htmlspecialchars()</a> to sanitize <em style="box-sizing: border-box;">after</em> retrieving it.</span></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-81172168169511245922019-07-02T23:18:00.000-07:002019-07-03T17:17:14.784-07:00SAVE FILE | Summertime SAGA<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaaFnm3dJZwaa6pyrarVxwn7Gr2cWfqwin60OpRWRtYfHyFvWpgSy28PCn36wc3sk0icY1krNbw8frPO3q2wA0HRpSX_2LqEd3pv22EieLbFVrk5pdZ5TtJRr3w5MG1kZqqE11X-g0npL/s1600/SAVE.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="670" data-original-width="1192" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaaFnm3dJZwaa6pyrarVxwn7Gr2cWfqwin60OpRWRtYfHyFvWpgSy28PCn36wc3sk0icY1krNbw8frPO3q2wA0HRpSX_2LqEd3pv22EieLbFVrk5pdZ5TtJRr3w5MG1kZqqE11X-g0npL/s640/SAVE.jpg" width="640" /></a></div>
<br />
<div class="download-info">
<span style="font-family: "trebuchet ms" , sans-serif;"><i class="fas fa-save"></i>
</span>
<br />
<h1 style="box-sizing: border-box; color: #8087aa; font-family: "Maven Pro", sans-serif; font-size: 2.5rem; font-weight: 400; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;">
Version 0.18.6</h1>
<span style="font-family: "trebuchet ms" , sans-serif;">We have an optional save file available, with all older content/paths completed. </span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: large;"><br /></span></span>
<span style="font-size: large;"><a href="https://summertimesaga.com/files/0.18.5/1-1-LT1.save" style="font-family: "Trebuchet MS", sans-serif;" target="_blank"><b>DOWNLOAD HERE</b></a><span style="font-family: "trebuchet ms" , sans-serif;">. </span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">To install the save, follow the </span><a href="https://wiki.summertimesaga.com/Getting_started#Saves_and_persistent_data_file" style="font-family: "Trebuchet MS", sans-serif;" target="_blank"><b>instructions on the wiki</b></a><span style="font-family: "trebuchet ms" , sans-serif;">.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"></span><br />
<a name='more'></a><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-18251578053016318732019-07-02T20:47:00.000-07:002019-07-20T04:38:53.171-07:00DOWNLOAD: Summertime Saga for android [APK] , for Windows, For Mac<div style="font-family: "times new roman";">
<div>
<h4 style="line-height: 1.25; margin: 0px; text-align: center;">
</h4>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="margin: 0px;">
<br /></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxCedomCRV3pXOFCODt8VAYNsxo0cln0_zOVSdkeNjt4I-j3xe1h0o1K3aatIElN9L1I6i-cdw47S8dStdFqkmyg1bTdHfueK2-7Ie3RYSIlzBaGrH08-byXV1QcwRC_HZY0b28gQldW4/s1600/DHmz4IpXkAUPJgn.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1000" data-original-width="1600" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxCedomCRV3pXOFCODt8VAYNsxo0cln0_zOVSdkeNjt4I-j3xe1h0o1K3aatIElN9L1I6i-cdw47S8dStdFqkmyg1bTdHfueK2-7Ie3RYSIlzBaGrH08-byXV1QcwRC_HZY0b28gQldW4/s640/DHmz4IpXkAUPJgn.jpg" width="640" /></a></div>
<div style="margin: 0px;">
<strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px; text-align: justify;"><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;"><br /></strong></strong>
<strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px; text-align: justify;"><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;"><br /></strong></strong>
<strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px; text-align: justify;"><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">DarkCookie</strong><span style="color: #052d49; font-family: "america" , sans-serif; font-weight: normal;"> now has a team helping him deal with development! Which means he can </span></strong><br />
<strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px; text-align: justify;"><span style="color: #052d49; font-family: "america" , sans-serif; font-weight: normal;">focus on the story, art and design of the game! The more pledges, the more time he can spend adding content to the game instead of working on his day job (freelance, mostly). He plans on doing a lotwith this game by continuing to add quality content and expand the universe (</span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">potential story expansions</strong><span style="color: #052d49; font-family: "america" , sans-serif; font-weight: normal;">) over time so he's in this for </span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">the long run</strong><span style="color: #052d49; font-family: "america" , sans-serif; font-weight: normal;">!</span></strong></div>
</div>
<h2>
<div style="font-size: medium; font-weight: normal;">
<div style="text-align: justify;">
<a name='more'></a></div>
</div>
<div style="font-size: medium; font-weight: normal;">
<div style="text-align: justify;">
<div style="margin: 0px;">
<br style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;" /></div>
</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.facebook.com/summertimesaga/" style="font-family: "roboto slab", arial, helvetica, sans-serif; font-weight: normal; margin-left: 1em; margin-right: 1em;" target="_blank"><img alt="" height="51" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRME8ltz4p65tF35CI3-E2XIMoS0Tfn0kmVmmAOWfJW3Z3TsqM-dTCNum0oHdKf6YQmRqLRM3-RlLq849II-NGkAHVJAS1sqTy65vl7dplXMUH3vublcvuDC3SbjMIOSEqbRr108NaRFRd/s200/facebook_like_logo1-620x161-ID-9d307bda-ba25-48df-f2ec-9727ed720b16.png" style="cursor: move;" title="summertime saga official page" width="200" /></a></div>
<div style="font-size: medium; font-weight: normal;">
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="margin: 0px;">
<span style="background-color: white; color: #052d49; font-family: "america" , sans-serif; font-size: 16px;">The game is </span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">free</strong><span style="background-color: white; color: #052d49; font-family: "america" , sans-serif; font-size: 16px;"> as of now but if you pledge a small monthly fee you can have access to the </span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">latest playable version of Summertime Saga</strong><span style="background-color: white; color: #052d49; font-family: "america" , sans-serif; font-size: 16px;">, watch </span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">DarkCookie</strong><span style="background-color: white; color: #052d49; font-family: "america" , sans-serif; font-size: 16px;"> work via his </span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">video stream</strong><span style="background-color: white; color: #052d49; font-family: "america" , sans-serif; font-size: 16px;">, read or post Patreon-only feed on </span><strong style="background-color: white; color: #052d49; font-family: america, sans-serif; font-size: 16px;">content progression</strong><span style="background-color: white; color: #052d49; font-family: "america" , sans-serif; font-size: 16px;"> and you get to help him financially which is greatly appreciated.</span></div>
</div>
</div>
</h2>
<div>
<div style="text-align: center;">
<div style="text-align: left;">
<div style="margin: 0px;">
</div>
<hr />
</div>
</div>
</div>
<div class="" style="clear: both; line-height: 22.1px; text-align: center;">
<div style="background-color: white; font-family: "roboto slab", arial, helvetica, sans-serif;">
<div style="margin: 0px;">
<br /></div>
</div>
</div>
<div>
</div>
<div class="separator" style="background-color: white; clear: both; color: #003300; font-family: "roboto slab", arial, helvetica, sans-serif; font-size: 13px; line-height: 22.1px; text-align: center;">
</div>
</div>
<div class="container">
<h1>
Download 0.18.6</h1>
Use any of the mirrors below to download the latest version of Summertime Saga. Builds are available for Windows/Linux, macOS and Android. iOS builds are not possible due to Apple's publishing restrictions.<br />
<div class="download-info">
<i class="fas fa-save"></i>
We have an optional save file available, with all older content/paths completed. You can download the save file <a href="https://summertimesaga.com/files/0.18.5/1-1-LT1.save" target="_blank">here</a>. To install the save, follow the <a href="https://wiki.summertimesaga.com/Getting_started#Saves_and_persistent_data_file" target="_blank">instructions on the wiki</a>.</div>
<div class="download-info">
<i class="fas fa-info-circle"></i>
Did you know? <strong>Patrons</strong> have access to a network of high speed private download servers, <a href="https://my.kompasproductions.com/download" rel="noopener" target="_blank">click here to download</a>. If you're not already a patron, why not consider <a href="https://www.patreon.com/bePatron?c=415949" rel="noopener" target="_blank">pledging</a> and contributing to development?</div>
<h4>
<i class="fab fa-windows"></i> Windows & Linux</h4>
<div class="mb-none">
<a style="color:white;" class="btn btn-success mb-xs" href="https://mega.nz/#!qOohyApC!YPfk45HDUYHPVIrhrQ8PIUQL1I6zdaO87a7VlWYloCQ" rel="noopener" target="_blank">mega</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://transfer.sh/THMDm/SummertimeSaga-0-18-6-pc.zip" rel="noopener" target="_blank">transfersh</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://workupload.com/file/7wMp4fN3" rel="noopener" target="_blank">workupload</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://openload.co/f/oLfta4mgJfo/SummertimeSaga-0-18-6-pc.zip" rel="noopener" target="_blank">openload</a>
</div>
<pre style="color: #3f4562;">SHA1: b464fb76a9f3864ff7326adaa3170c7f8ee041ab</pre>
<h4>
<i class="fab fa-apple"></i> Mac</h4>
<div class="mb-none">
<a style="color:white;" class="btn btn-success mb-xs" href="https://mega.nz/#!nCZhxA7B!tkQysC1VSBXnC6aHhnnzwdXlLSs1nOZCNz7eQqtT4OU" rel="noopener" target="_blank">mega</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://transfer.sh/X785A/SummertimeSaga-0-18-6-mac.zip" rel="noopener" target="_blank">transfersh</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://workupload.com/file/9kHPDsRU" rel="noopener" target="_blank">workupload</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://openload.co/f/aPnH1l9dEX4/SummertimeSaga-0-18-6-mac.zip" rel="noopener" target="_blank">openload</a>
</div>
<pre style="color: #3f4562;">SHA1: ea04c763a8e74535c550a41dfcb57697c83e21d0</pre>
<h4>
<i class="fab fa-android"></i> Android</h4>
<div class="mb-none">
<a style="color:white;" class="btn btn-success mb-xs" href="https://mega.nz/#!STJjGaqL!SFuhL3uoiG_FXVh0Xp4lyCANbmmv6WWPuBkQKZBRmSo" rel="noopener" target="_blank">mega</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://transfer.sh/esSkq/SummertimeSaga-0186-release.apk" rel="noopener" target="_blank">transfersh</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://workupload.com/file/5mZUE9tD" rel="noopener" target="_blank">workupload</a>
<a style="color:white;" class="btn btn-success mb-xs" href="https://openload.co/f/CjN3ugvMKD4/SummertimeSaga-0186-release.apk" rel="noopener" target="_blank">openload</a>
</div>
<pre style="color: #3f4562;">SHA1: ade7097787c7dd0b2a161496ee844d04c768a91f</pre>
</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-3239501201516353052018-12-20T00:28:00.000-08:002019-07-02T18:56:31.392-07:00DOWNLOAD | FIFA 17 Soccer APK<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUhvXayngss9Xahtk7YYPAGpxyZJ9aFjWSDqay2QVbTwViOa1iM-JUziXSoWayqGwPOpeeAxqqan-j3QdvQaSmUA6AuAZ5ySbWwmFg3z0jUCrlMR11_MHZNIv4VtMvr3PiNQVAlgfTYFPW/s1600/fifa+3.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="clear: left; color: black; float: left; font-family: "trebuchet ms" , sans-serif; margin-bottom: 1em; margin-right: 1em;"></span></a></div>
<h2 style="background-color: white; font-size: 16px; margin: 0px 0px 15px; padding: 0px;">
</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilbpsoPeFK8Vmns1lldfsdccsQw7uxYicwAgv5-ge9huMDVAaZwvJWj26-xQIKAyhGXBu9EXBprT8My41r0vEqrIH1GJYkODsfPUd3EcmLHOih77xKulQBrdHfnscWrF2weH3dLLqij3DM/s1600/fifa+3.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilbpsoPeFK8Vmns1lldfsdccsQw7uxYicwAgv5-ge9huMDVAaZwvJWj26-xQIKAyhGXBu9EXBprT8My41r0vEqrIH1GJYkODsfPUd3EcmLHOih77xKulQBrdHfnscWrF2weH3dLLqij3DM/s640/fifa+3.jpg" width="640" /></a></div>
<h2 style="background-color: white; font-size: 16px; margin: 0px 0px 15px; padding: 0px;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></h2>
<h2 style="background-color: white; font-size: 16px; margin: 0px 0px 15px; padding: 0px;">
<span style="font-family: "trebuchet ms" , sans-serif;">The description of FIFA Soccer</span></h2>
<div class="content" style="background-color: white; font-size: 14px;">
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">After FIFA 15, FIFA 16 and FIFA 17, EA Sports developed a new Soccer game- FIFA Mobile Soccer. You can build and manage your soccer team and operate everything on the mobile because FIFA Mobile Soccer is specially designed for mobile. In Attack Mode, challenge others. In Leagues, play with friends. Meanwhile, get everyday latest content and try a totally new approach to squad building.</span></span><br />
<a name='more'></a><span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">Halloween special.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">If you also enjoy playing FIFA Mobile Soccer, good news is that the game is now officially running its Scream Team <b>Halloween</b>program. You can earn Trick and Treat Tokens when completing Scream Team Live Events, find Halloween-themed Players items, and then complete Plans to unlock a special edition Master Elite Player item. Just wait for the new version to come.<o:p></o:p></span></span><br />
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span>
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span>
<br />
<div style="text-align: center;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">DOWNLOAD GAME</span></span><br />
<a href="https://apkpure.com/fifa-17-fifa-mobile-soccer/com.ea.gp.fifamobile" target="_blank">
<img border="0" data-original-height="242" data-original-width="290" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYw-KqI8-36VLaluNkN4dYqt6YM_Et9hLc0_dbcQP_3Nc7LNwAYFif9emXVAVKuaXEtiZKjC-rcY1mrjZvydSl30F66vfmoOOEYGCKi-SqT23yYHuKDHVC6AKa26HDkRAa5jvwKULplork/s200/giphy.gif" width="200" /></a></div>
</div>
</div>
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;"></span></span>
<br />
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">Features.<o:p></o:p></span></span></div>
<div class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Quick, Fun and Accessible<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">Gameplay is completely re-imagined in the creative<b> Attack Mode</b>. Quick, exciting, turn-based matches will have you playing only your team's attacking chances for each half, before passing the game to your opponent to do the same.<o:p></o:p></span></span></div>
<div class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">2.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Tell the Story of the Football World<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">If it happens in the real world, you’re likely to experience it in FIFA Mobile. <b>Live Events</b> deliver new and fresh content daily based on stories and matches happening around the globe. Quick, fun mini-games reward you with themed Tokens to redeem for free players and packs.<o:p></o:p></span></span></div>
<div class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">3.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Join a Team, Conquer the World<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">No one can win alone. Then <b>join a team</b> is necessary. Join your friends’ team or other people around the world. Compete for bragging rights in inter-league Championships, complete cooperative league achievements, or take your skills and play against other leagues around the world. Climb the leaderboard and prove you can conquer the world of football.<o:p></o:p></span></span></div>
<div class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">4.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Your Ultimate Team Expands<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">A new approach to building your squad lets you create a bigger and deeper club, offers a simplified method to boost your players and gives you a better experience to manage who is on the pitch. Stay tuned throughout the season to find unique and exciting ways to make your club better.<o:p></o:p></span></span></div>
<div align="left" class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">5.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Unrivaled Authenticity<o:p></o:p></span></span></div>
<div align="left" class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">With more than 30 leagues, 650 teams, and 17000 players, FIFA Mobile is the most authentic football experience available on-the-go. Play with all of your favorite stars and immerse yourself in the world of football!<o:p></o:p></span></span></div>
<div align="left" class="MsoNormal" style="margin-bottom: 10px; padding: 0px;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">FAQ<o:p></o:p></span></span></div>
<div align="left" class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Is the game offline?<o:p></o:p></span></span></div>
<div align="left" class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: 0cm;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">The game needs internet connection maybe network fees apply.<o:p></o:p></span></span></div>
<div align="left" class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: -18pt;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span lang="EN-US">2.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span lang="EN-US">Can Children Play the Game?<o:p></o:p></span></span></div>
<div align="left" class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: 0cm;">
<span lang="EN-US"><span style="font-family: "trebuchet ms" , sans-serif;">The game contains direct links to the Internet and social networking sites intended. It is suitable for an audience over 13. Parents need to notice this.</span></span></div>
<div align="left" class="MsoListParagraph" style="margin-bottom: 10px; margin-left: 18pt; padding: 0px; text-indent: 0cm;">
<br /></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-25331678031979990052018-11-18T15:45:00.000-08:002018-11-18T15:45:06.149-08:00Hacking Any WIFI in just 4 Steps<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKJvBc4MgZTMH7TBKynp3dxPqeovcbUFbJOQm_Abk6EGhAbf2H5Dno6VR1vuGAqfDkFbXbfSiCq9-kdzS81Aj8lYZK1DkxOV7J_EVaynMShYFZftlSD5xT4cITFwVnjyC3wqf5TIADjCV5/s1600/wifi.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKJvBc4MgZTMH7TBKynp3dxPqeovcbUFbJOQm_Abk6EGhAbf2H5Dno6VR1vuGAqfDkFbXbfSiCq9-kdzS81Aj8lYZK1DkxOV7J_EVaynMShYFZftlSD5xT4cITFwVnjyC3wqf5TIADjCV5/s640/wifi.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="color: #38761d; font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<center style="text-align: justify;">
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="color: #38761d;">For educational purposes</span>,
in this article,we will see how to crack WiFi password using a famous
WiFi cracker, Backtrack 5 R3, which can help patient people to hack even
WPA and WPA2 security protocols.</span></center>
<center style="text-align: left;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><a name='more'></a><br />
</span></center>
<center>
</center>
<center>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><br />
</span></center>
<center>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><br />
</span></center>
<center>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><br />
</span></center>
<center>
</center>
<center>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><br />
</span></center>
<center>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><br />
</span></center>
<center>
<a href="https://drive.google.com/open?id=0B87IsKT7_wxJQTdyRGVrV2FFdnM" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-size: 16px;" target="_blank"><span style="background-color: white; color: black; font-family: "trebuchet ms" , sans-serif;">Download the PDF Version of Instructions here</span></a></center>
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif; font-size: 16px; margin-left: 1em; margin-right: 1em;"> <a href="https://drive.google.com/file/d/0B87IsKT7_wxJQTdyRGVrV2FFdnM/view" style="font-size: 16px; margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="73" data-original-width="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMkkI3VzBxFQtx62bUdKU9h1dWLrML2Ml2n8tDV-ajpnDagBogzeohFqmkiuoh9arbAs02bDMX_yxBAcv-UsnXPuu5il53oatZT4_OcjVNOiG6eG5gq5hTS7_6iX-_hhI2L61M6Fnph9o9/s1600/ContinueButton.png" style="border: 0px; height: inherit; max-width: 100%;" /></a></span></div>
<center>
<span style="font-family: "courier new" , "courier" , monospace;"><br />
</span></center>
<center>
</center>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-7988090490502294052018-11-17T20:52:00.000-08:002018-11-17T20:52:39.736-08:00Windows 10 Product Keys | Working Serial Keys<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnF_9EaWRCXkgJ1xdgVnAN7sBOjP7ByD7u837RvEqgrTGiexPHY7qy4NgptlSJ_pM41_m4i88232BfQa7rFndY59CD-NJXN79ag-6rA2ItEVkCLMP2j6jV_Gyxg79cRhHW6GQ-adaMF-4U/s1600/windows+10+product+keys+serial+keys.png" imageanchor="1" style="clear: left; color: #999999; float: left; margin-bottom: 1em; margin-right: 1em; text-decoration-line: none;"><span style="clear: left; float: left; font-family: "trebuchet ms" , sans-serif; margin-bottom: 1em; margin-right: 1em;"><img alt="windows 10 product keys serial keys" border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnF_9EaWRCXkgJ1xdgVnAN7sBOjP7ByD7u837RvEqgrTGiexPHY7qy4NgptlSJ_pM41_m4i88232BfQa7rFndY59CD-NJXN79ag-6rA2ItEVkCLMP2j6jV_Gyxg79cRhHW6GQ-adaMF-4U/s640/windows+10+product+keys+serial+keys.png" style="border: 1px solid rgb(211, 211, 211); height: auto; max-width: 95%; padding: 4px; transition: all 0.4s ease-in-out;" title="windows 10 product keys serial keys" width="640" /></span></a></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">Windows 10 has now become the world’s most popular operating system as 350 million users of windows 10 to date are not wrong. Windows 10 was released in July 29, 2015 and it comes with great new features that let you do things fast and easily.</span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">What Makes Windows 10 Unique?</span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">The best windows operating system brings you the most innovative tools and security features that will not only make your device secure but also enables you to perform your daily task in most creative and productive way. Windows 10 uses and combines some cool features of windows 7 and windows 8 which make it stand out from other Microsoft Operating Systems.</span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"> </span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">In a very short period of time windows 10 has able to capture the attention of many peoples including IT professionals, businessman, and personnel relating to different fields. Before the official launch of windows 10 Microsoft has also released Technical preview of the Windows 10 to attract tech expert and IT professionals.</span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<a name='more'></a><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="background-color: white; clear: both; color: #333333; text-align: center;">
</div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>How to Download Windows 10</b><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">If you are already using genuine version of windows 7 or windows 8 then its free to upgrade your older version of windows to windows 10. Microsoft is also allowing you to download ISO image file of windows 10 32 bits and 64 bits downloaded through media creation tool.</span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Window 10 Product Keys Serial Keys:</b><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">In order to benefit from premium features of windows 10 you always need a product key or serial key to activate your copy of windows 10. If you are using genuine version of windows 7 and 8 then you can free upgrade to windows 10. There are several sites online providing activation key for windows but most of them do not work.</span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
</div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">Today we have find out and gonna share with you windows 10 product keys, serial keys that are guaranteed to work 100%. You can activate almost all versions of windows 10 using our activation key provided below. With these key you can activate windows 10 Home Premium, Windows 10 Professional and Windows 10 Ultimate. </span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br style="background-color: white; color: #333333;" /></span>
<br />
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">Windows 10 Product Key, Serial Keys 2018<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 Home Edition</b> – YTMG3-N6DKC-DKB77-7M9GH-8HVX7<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 Single Language Key</b> – BT79Q-G7N6G-PGBYW-4YWX6-6F4BT<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 Pro Serial Key</b>– VK7JG-NPHTM-C97JM-9MPGT-3V66T<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">Windows 10 <st1:city w:st="on"><st1:place w:st="on">Enterprise</st1:place></st1:city> Product Key Updated 2018<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">NPPR9-FWDCX-D2C8J-H872K-2YT43<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">PBHCJ-Q2NYD-2PX34-T2TD6-233PK<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 Product Code and Serial Key</b>:<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 Serial Key</b>:<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">NPPR9-FWDCX-D2C8J-H872K-2YT43<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">Windows 10 OS key Professional Edition:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">6P99N-YF42M-TPGBG-9VMJP-YKHCF<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"> 8N67H-M3CY9-QT7C4-2TR7M-TXYCV<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 product key: Technical Preview for Consumer</b>:<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">334NH-RXG76-64THK-C7CKG-D3VPT<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b>Windows 10 Product key all Editions</b>:<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">NKJFK-GPHP7-G8C3J-P6JXR-HQRJR<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">Windows 10 key <st1:city w:st="on"><st1:place w:st="on">Enterprise</st1:place></st1:city> Edition:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">CKFK9-QNGF2-D34FM-99QX2-8XC4K<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">Windows 10 product number:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">VK7JG-NPHTM-C97JM-9MPGT-3V66T<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
</div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">W269N-WFGWX-YVC9B-4J6C9-T83GX<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;">T44CG-JDJH7-VJ2WF-DY4X9-HCFC6<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<b><span style="font-family: "trebuchet ms" , sans-serif;">New Product Keys Windows 10 || 2017<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"> TX9XD-98N7V-6WMQ6-BX7FG-48Q99<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #333333;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<span style="background-color: white; color: #333333;"><span style="font-family: "trebuchet ms" , sans-serif;">TX9XD-98N7V-6WMQ6-BX7FG-H8Q99</span></span>JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-20313569845711180362018-11-14T22:35:00.000-08:002018-11-14T22:41:46.070-08:00How To Access Notorious Dark Web Anonymously (10 Step Guide)<span style="font-family: "trebuchet ms" , sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh_Rt7HbEyQJCdz43dT57uCX6Sm8dWutc0OUriB2xVZ3fTjTZE8uGA8JClWFhxbd94T3uvPxZ_zJUgnvF__s5KsLQ8arketSZDfp-sKil_8xUeU_k6hKm0hksz_cAc6-g8Do4YjwCufhC2/s1600/maxresdefault.jpg"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh_Rt7HbEyQJCdz43dT57uCX6Sm8dWutc0OUriB2xVZ3fTjTZE8uGA8JClWFhxbd94T3uvPxZ_zJUgnvF__s5KsLQ8arketSZDfp-sKil_8xUeU_k6hKm0hksz_cAc6-g8Do4YjwCufhC2/s640/maxresdefault.jpg" /></a><br /><br /><b><span style="color: #b45f06;">Are you trying to find out how to access the dark web and what is it?</span></b><br /><br />Well, look no further, we have gone and done the research so we could show you step by step the best and safest way how to access the dark net.</span><br />
<a name='more'></a><span style="font-family: "trebuchet ms" , sans-serif;"><br />We cover everything, from setting up Tor, how to choose a VPN, what not to do, finding the best sites to access, and extra steps to remain anonymous.<br /><br />It is extremely easy to access the dark web and even easier to be detected on it if you don’t take precautions. If you are new to the darknet, this guide will help you on your way.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /><br />According to researchers, only 4% of the internet is visible to the general public.<br /><br /><br />Meaning that the remaining 96% of the internet is made up of “The Deep Web”.<br /><br /><br /><a href="https://topvpnsoftware.com/how-to-hide-tor-usage/?data1=dwb40403"><img src="https://darkwebnews.com/wp-content/uploads/2017/08/banner_01.gif" /></a><br /><br /><br /><span style="color: orange;">Dark Web or Dark Net</span> is a subset of the <a href="https://darkwebnews.com/deep-web/">Deep Web</a> where there are sites that sell drugs, hacking software, counterfeit money and more. We explain this further down the article if you are not up to speed.<br /><br /><br />If you are looking to access hidden marketplace’s or darknet websites (with a .onion domain) then dark web access is done using the TOR network with the TOR browser bundle. TOR is the most widely used dark web browser.<br /> How To Access The Dark Web Guide<br /><br /><br /><span style="color: orange;">Step 1:</span> Go and get yourself a good VPN (Virtual Private Network) <a href="https://topvpnsoftware.com/?data1=dwnac01b">here</a> , use it ALL of the time, no matter if you are on TOR or not. This site <a href="https://topvpnsoftware.com/?data1=dwnac01b">here</a>reviews the best VPN’s for use with TOR.<br /><br /><br />You should be taking your <a href="https://en.wikipedia.org/wiki/Anonymity">anonymity </a>and security very seriously if you are visiting the Dark Net, especially if you are viewing any Darknet Markets.<br /><br /><br />Do not fool yourself and think that the ISP’s (Internet Service Providers) and Law Enforcement are not trying to track those who use Tor to access the Dark Web, they are, and they are good at it so don’t make it easy for them.<br /><br /><br />It should be brought to your attention that there was a recent <a href="https://darkwebnews.com/anonymity/tor-turmoil-vulnerability/">Tor vulnerability</a> which leaked your REAL IP address leading back to your real location. If you already have the Tor Browser then UPDATE it immediately. Vulnerabilities like these are happening more often to Tor.<br /><br /><br /><img src="https://darkwebnews.com/wp-content/uploads/2016/09/VPN.png" />By using the simple VPN app, your darknet activities will be hidden from your ISP and government agencies as all of your internet usage will be encrypted. No one will even know you are using TOR, let alone browsing for darknet markets.<br /><br /><br />What’s even better is that the VPN will give you a fake IP address, in another country if you like, so even if Tor is compromised then the trace just leads back to somewhere else that can’t be linked to you.<br /><br /><br />The other benefit of using a VPN is to prevent hackers stealing your identity and or personal files and photos from your computer.<br /><br /><br />You need to <a href="https://darkwebnews.com/vpn-anonymity-tool/">use a good VPN</a> that keeps NO LOGS, fast performance, preferably accepts bitcoin as payment, has a kill switch for <a href="https://darkwebnews.com/dns-leak-protection/">DNS leaks</a>, and is compatible with TOR.<br /><br /><br />Then install your VPN, if you buy one of the better VPN’s then it is usually just a one click install and one or two clicks to turn it on.<br /><br /><br />Step 2: You can’t access the deepweb just using a common browser like Internet Explorer or <a href="https://www.google.com/chrome/">Google Chrome</a>. To get dark net access you will need to download the dark web browser called TOR browser bundle. Only get it from the official TOR website, never download it from anywhere else!<br /><br /><br />Now close all of your browsing windows and all apps connecting to the world wide web like Google Drive, Skype, OneDrive, iCloud etc.<br /><br /><br />Then open your VPN app and connect to another location other than where you are at, make sure to use the <a href="https://openvpn.net/index.php/open-source/333-what-is-openvpn.html">OpenVPN protocol</a> as it is the most secure.<br /><br /><br />Open up your normal favorite browser and then download TOR<br /><br /><br />TOR Official Website: <a href="https://www.torproject.org/download/download.html">https://www.torproject.org/download/download.html<img src="https://darkwebnews.com/wp-content/uploads/2014/04/download-tor.jpeg" /></a><br /><br /><span style="color: orange;">Step 3:</span> Install the TOR browser bundle on your PC or Mac. When the download is complete, double-click the downloaded file, choose the destination folder (the folder where you want to extract tor browser), and choose extract.<br /><br /><br /><span style="color: orange;">Step 4: </span>Start TOR Browser. Open the folder where you extracted TOR browser and double-click “Start Tor Browser”. The TOR start page will open in a browser window (it’s actually a portable version of FireFox stripped down).<br /><br /><br />From here, you now have a good level of anonymity and security and you are able to <a href="https://darkwebnews.com/deep-web-links/">gain access to .onion websites</a> through your dark web browser.<br /><br /><br /><img src="https://darkwebnews.com/wp-content/uploads/2016/09/Tor-Folder.png" /><br /><br /><br /><br /> Congratulations…<br /><br /><br />Next, you will want to visit a dark web site.<br /><br /><br />Now you have dark net access you should <a href="https://darkwebnews.com/dark-web-market-list/">Click HERE</a> to view the Darknet Market List so you can visit some of the best black market websites on the DeepWeb.<br /><br /><img src="https://darkwebnews.com/wp-content/uploads/2016/09/SilkRoad.png" />Silk Road ( Dark web screenshot )<br /><br /><br /><br />If you do want to check out some darknet markets then you should follow the guide for that specific market as it will show you step by step what to do to sign up, browse etc.<br />If you are looking for the biggest list of <a href="https://darkwebnews.com/deep-web-links/">hidden deep web links go here</a>so you can find exactly what you are looking for. (some also call them dark web links). We have compiled one of the biggest lists of tested <a href="https://darkwebnews.com/deep-web-links/">.onion sites</a> on the dark net complete with a search function, website name, description, categories, site status and even a screenshot of the landing page so you can see if your site is online or dead.<br /><br /><br />Now we have shown you how to access the dark web we have some very important tips to share…<br /> Bitcoin and Buying on the Dark Web:<br /><br /><br />If you are on the dark net to buy something, and most of us are, then you will need to use cryptocurrency to do so and Bitcoin is the most used cryptocurrency on the dark web.<br /><br /><br />Buying cryptocurrencies is another topic altogether, so we won’t go into it here but this site has made an easy to follow guide on <a href="https://totalbitcoin.org/guide-on-how-to-buy-bitcoin/">buying bitcoin</a>, but we will give you one GOLDEN tip on how to go under the radar and not have your crypto exchange account shut down and lose money.<br /><br /><br />NEVER send cryptocurrency directly from your exchange account (where you buy the coins) to a market or anywhere on the dark web, also never send coins directly from anywhere on the dark net to your exchange. They are onto this right away as they can tell where the coins came from and they WILL shut you down and you will be recorded in a list for sure.<br /><br /><br />You must send your coins from your exchange to a wallet (find out how to in the guides) then from the wallet to the dark web and vice-versa.<br /> Hacking on the Dark Web:<br /><br /><br />There are a lot of dark web users that are hackers and there are even more users that want to become hackers. The dark web is the hacker’s playground, so if you don’t know what you are doing then you need to be extra careful and take the precautions we mention very seriously, like using a VPN, covering your webcam, using very good usernames and passwords etc.<br /><br /><br />If you are wanting to become a hacker then we have found a great course to teach you how to become a hacker. We even lined up a 74% discount for you. Just click the link below.<br /><br /><br /><a href="https://www.udemy.com/learn-ethical-hacking-from-scratch/?couponCode=DAMG50">https://www.udemy.com/learn-ethical-hacking-from-scratch/?couponCode=DAMG50</a><br /><br /><br />The hacking course will teach you tons of things like: <br />Penetration testing <br />Create fake WiFi Networks <br />Crack WEP/WPAWPA2 encryptions <br />Launch man in the middle attacks <br />Gain control over other computer systems <br />Backdoor programs <br />Exploit vulnerabilities <br />ARP Spoofing/ARP Poisoning <br />And much much more. <br /> Bonus Security Steps For the DarkNet:<br /><img src="https://darkwebnews.com/wp-content/uploads/2016/09/cyber-security.jpg" /><br /><br /><br /><span style="color: orange;">Step 5:</span> <a href="https://news.ycombinator.com/item?id=10833629">DO NOT change the TOR browser window size</a> unless you like living dangerously. The FEDS have programs that can match identities on random things such and matching time online and other things with the browser window size, I shit you not. If you don’t change the size then it is the same as most other people.<br /><br /><br /><span style="color: orange;">Step 6:</span> Please remember that TOR isn’t necessarily 100% anonymous, you should turn off JavaScript within the dark web browser settings to help.<br /><br /><a href="https://darkwebnews.com/wp-content/uploads/2016/09/Tor-Javascript-Setting.png"><img src="https://darkwebnews.com/wp-content/uploads/2016/09/Tor-Javascript-Setting-300x258.png" /></a>Block Javascript in TOR Browser<br /><br /><br /><br /><span style="color: orange;">Step 7:</span> Disconnect your webcam or block the camera with some black tape. Hackers and governments have ways of getting into your computer and turning on the video and cameras.<br /><br /><br />You can have intimate images of you be used as blackmail or extortion, or even worse, used by the feds.<br /><br /><a href="https://darkwebnews.com/wp-content/uploads/2016/09/Zuckerberg.jpg"><img src="https://darkwebnews.com/wp-content/uploads/2016/09/Zuckerberg-300x150.jpg" /></a>Covered camera and mic?<br /><br /><br /><br /><br /><span style="color: orange;">Step 8:</span> Disconnect your microphone or cover it with tape to muffle it good. The same goes for the microphone as the camera, the last thing you want is to be recorded saying incriminating things at home. It doesn’t even have to be while on the dark net. Even the Facebook creator Mark Zuckerberg does it as he knows the dangers.<br /><br /><br /><span style="color: orange;">Step 9:</span> NEVER use your real name, photos, email, or even password that you have used before on the dark web. This is the fastest way to be tracked. <a href="https://darkwebnews.com/anonymous-email/">Use an anonymous email</a> account and aliases that have nothing to do with you that you have never used before.<br /><br /><br /><span style="color: orange;">Step 10:</span> If you are using TOR on the dark web for anything other than looking at cute pictures of kittens, you should think seriously about your privacy and security. Jolly Roger has put together a comprehensive guide on how to stay safe on the deep web, <a href="https://darkwebnews.com/help-advice/dark-web-beginners-security-guide/">view the guide here</a>.<br /><br /><br />If you have read through this how to access the darknet guide and thought to yourself WTF? Then you are probably new to this and need a bit of background and information to get you up to speed. Please remember to share this post so everyone that wants to have a look on the Dark Web can do so and do it safely.<br /> What is the Clear Web? (Surface Web)<br /><br /><br />Firstly, there is the Clear Web/Clear Net/Surface Web. This is the normal internet / world wide web where you do everyday things like check Gmail, Facebook, and Twitter and buy things from Amazon etc. All websites and web pages that a search engine like Google can find are on the Clear Net.<br /> What is the Deep Web?<br /><br /><br />Then we have the Deep Web. This is a sub-set of the internet that can not be indexed (found) by search engines like Google. This includes all web pages that are behind membership logins, all company and organization web pages used internally and other data. The majority of the deepweb does not have anything illegal on it.<br /><br /><a href="https://darkwebnews.com/wp-content/uploads/2016/09/Deep-Web-Dark-Web-differences.png"><img height="400" src="https://darkwebnews.com/wp-content/uploads/2016/09/Deep-Web-Dark-Web-differences-252x300.png" width="335" /></a></span><br />
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Deep Web and Dark Web</span><br />
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /><br /> What is the Dark Web (also called dark net)?<br /><br /><br />Then we have the Dark Web. This is a sub-set of the Deep Web that contains all sorts of websites, both legal and illegal. The types of sites include black markets that sell things like drugs, counterfeit goods, and weapons, you also have hacking sites, X-rated sites, bitcoin tumbling, and even sites for hitmen. The variety of sites on the Dark Web is quite astonishing. For now there is no dark web search engine that works as well as Google does for the clearnet.</span></div>
</div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-27988513513978211382018-11-14T00:51:00.000-08:002018-11-18T02:09:05.377-08:00Hackers Behind WannaCry Ransomware Withdraw $143,000 From Bitcoin Wallets<div style="text-align: justify;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: white;"><span style="font-family: "trebuchet ms" , sans-serif;"><img border="0" data-original-height="373" data-original-width="723" height="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJn9671mUGA3dyRkb9_aekG6o74QcbNSgLxYLH-jwEKoBUl9Zvhegkfqp1UIwyNfWi6Sssce13ZM6eYV1fDoJBfR76vVmmfF3d7N-VNjqNa0SUN8f_1muAgHFgNdC31y8r-37awZFErIfk/s640/asdasd.jpg" width="640" /></span></span></b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJn9671mUGA3dyRkb9_aekG6o74QcbNSgLxYLH-jwEKoBUl9Zvhegkfqp1UIwyNfWi6Sssce13ZM6eYV1fDoJBfR76vVmmfF3d7N-VNjqNa0SUN8f_1muAgHFgNdC31y8r-37awZFErIfk/s1600/asdasd.jpg" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em;"><span style="color: black; font-family: "trebuchet ms" , sans-serif;"></span></a></div>
<div style="text-align: justify;">
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><span style="font-size: 16px; line-height: 25px;">The cyber criminals behind the global </span>WannaCry ransomware attack<span style="font-size: 16px; line-height: 25px;"> that caused chaos worldwide have finally cashed out their ransom payments.</span></b></span></div>
<a name='more'></a><span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br style="content: " "; display: block; font-size: 16px; line-height: 25px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 25px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 25px;"></span></b></span><br />
<div style="text-align: justify;">
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 25px;"><b style="background-color: white;"><span style="line-height: 25px;">Nearly three months ago, the </span>WannaCry ransomware<span style="line-height: 25px;"> shut down hospitals, telecom providers, and many businesses worldwide, infecting hundreds of thousands of computers in more than 150 countries, encrypting files and then charging victims $300-$600 for the keys.</span></b></span></b></span></div>
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br style="content: " "; display: block; font-size: 16px; line-height: 25px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 25px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 25px;"></span></b></span><br />
<div style="text-align: justify;">
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 25px;"><b style="background-color: white;"><span style="line-height: 25px;">WannaCry was really bad, as the nasty </span>ransomware forced the British NHS<span style="line-height: 25px;"> (National Health Service) to shut down hospitals and doctor's surgeries, and infected a Spanish telecommunications company and Russian mobile operator, among much more.</span></b></span></b></span></div>
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="background-color: white; font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 25px;">
</span></b></span>
<span style="background-color: white;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span>
<br />
<div style="text-align: justify;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif; font-weight: 700;"><br /></span></div>
<span style="background-color: white;"><span style="font-family: "trebuchet ms" , sans-serif;"></span></span><br />
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><span style="font-size: 16px; line-height: 25px;">Even a month after the outbreak, the WannaCry ransomware was found infecting systems at </span>Honda Motor Company<span style="font-size: 16px; line-height: 25px;">, forcing the factory to shut down its production, and 55 speed and traffic light cameras in Victoria, Australia.</span></b></span></div>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;">
<span style="color: white; font-family: "verdana" , sans-serif;"><b><br style="content: " "; display: block; font-size: 16px; line-height: 25px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 25px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 25px;"></span></b></span></span><br />
<div style="text-align: justify;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="font-size: 16px; line-height: 25px;"><b><span style="line-height: 25px;">Overall, the hackers behind </span>WannaCry<span style="line-height: 25px;"> made $140,000 in Bitcoins from the victims who paid for the decryption keys—but for almost three months, they did not touch three of their wallets where victims were instructed to send ransom payments.</span></b></span></b></span></span></div>
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="font-size: 16px; line-height: 25px;">
</span></b></span></span><br />
<div style="text-align: justify;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><span style="font-size: 16px; line-height: 25px;"><span style="color: white; font-family: "verdana" , sans-serif;"><b><br /></b></span></span>
</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzlnLeL200uBkkpOGVsvEuJ_qQvtK5GyHmTQCSWYEiB8a41uav1AACiyzlh7ETfnbK4cXQUBfR9brCqeLRXJ7r_G-68RiYFctz-6iuT1hPJJdQda2dQvjT2X4vDLbHoid8AoJpSkWTGOlA/s1600/btc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="color: black; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><img border="0" data-original-height="587" data-original-width="530" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzlnLeL200uBkkpOGVsvEuJ_qQvtK5GyHmTQCSWYEiB8a41uav1AACiyzlh7ETfnbK4cXQUBfR9brCqeLRXJ7r_G-68RiYFctz-6iuT1hPJJdQda2dQvjT2X4vDLbHoid8AoJpSkWTGOlA/s400/btc.jpg" width="360" /></b></span></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<b><span style="background-color: white; font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 28px; text-align: left;">However, the WannaCry hackers started cashing out their cryptocurrencies on Wednesday night.</span></b></div>
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 28px; text-align: left;"></span></b></span><br />
<div style="text-align: justify;">
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 28px; text-align: left;"><b style="background-color: white; text-align: center;"><span style="line-height: 28px; text-align: left;">According to a </span>Twitter bot<span style="line-height: 28px; text-align: left;"> tracking WannaCry ransom payments, only 338 victims paid the $300 in Bitcoin that totalled $140,000.</span></b></span></b></span></div>
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="background-color: white; font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 28px; text-align: left;">
</span></b></span>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-size: 16px; line-height: 28px; text-align: left;"><span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br /></b></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-size: 16px; line-height: 28px; text-align: left;"><span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br /></b></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<b style="background-color: white;"><span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-size: 16px; line-height: 28px; text-align: left;">On Wednesday night, this money was </span>withdrawn<span style="font-size: 16px; line-height: 28px; text-align: left;"> in 7 different payments within 15 minutes, although it is not clear where the money is being sent, or how the attacker will use it.</span></span></b></div>
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 28px; text-align: left;"></span></b></span><br />
<div style="text-align: justify;">
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 28px; text-align: left;"><b style="background-color: white; text-align: center;"><span style="line-height: 28px; text-align: left;">If you are unaware, we recently reported about Google's research on how cyber criminals and </span>ransomware hackers cash out<span style="line-height: 28px; text-align: left;"> their stolen or looted cryptocurrencies via cryptocurrency exchanges that are involved in money laundering.</span></b></span></b></span></div>
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><span style="font-size: 16px; line-height: 28px; text-align: left;">
</span><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 28px; text-align: left;"></span></b></span><br />
<div style="text-align: justify;">
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><span style="font-size: 16px; line-height: 28px; text-align: left;"><b style="text-align: center;"><span style="line-height: 28px; text-align: left;">Last week, even German authorities arrested an alleged operator of the popular BTC-e Bitcoin exchange on charges of </span>laundering over $4 billion in Bitcoin<span style="line-height: 28px; text-align: left;"> for culprits involved in hacking attacks, tax fraud and drug trafficking without identifying them.</span></b></span></b></span></div>
<span style="color: white; font-family: "trebuchet ms" , sans-serif;"><b style="background-color: white;"><span style="font-size: 16px; line-height: 28px; text-align: left;">
</span><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 28px; text-align: left;"><div style="text-align: justify;">
<b style="text-align: center;"><span style="line-height: 28px; text-align: left;">The identity behind the WannaCry ransomware is still unknown, though some researchers traced back WannaCry to a </span>state-sponsored hacking group<span style="line-height: 28px; text-align: left;"> called </span><span style="border: 0px; font-stretch: inherit; line-height: 28px; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">Lazarus</span><span style="line-height: 28px; text-align: left;"> in North Korea, while other believed the </span>perpetrators might be Chinese<span style="line-height: 28px; text-align: left;">.</span></b></div>
</span><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 28px; text-align: left;"><div style="text-align: justify;">
<b style="text-align: center;"><span style="line-height: 28px; text-align: left;">The WannaCry epidemic was using self-spreading capabilities by leveraging leaked NSA's SMBv1 exploit, called </span><span style="border: 0px; font-stretch: inherit; line-height: 28px; margin: 0px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">EternalBlue</span><span style="line-height: 28px; text-align: left;">, to infect vulnerable Windows computers, particularly those using older versions of the operating system.</span></b></div>
</span><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><br style="content: " "; display: block; font-size: 16px; line-height: 28px; margin: 20px 0px 0px; outline: 0px; padding: 0px; text-align: justify;" /><span style="font-size: 16px; line-height: 28px; text-align: left;"><div style="text-align: justify;">
<b style="text-align: center;"><span style="line-height: 28px; text-align: left;">While most of the affected organisations have now returned to normal, law enforcement agencies across the world are still on the hunt.</span></b></div>
</span></b></span><br />
<div class="separator" style="clear: both; text-align: justify;">
<span style="color: white; font-family: "verdana" , sans-serif;"><b><span style="background-color: white; font-family: "trebuchet ms" , sans-serif; font-size: 16px; line-height: 28px; text-align: left;"><br /></span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white; font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "verdana" , sans-serif;"><b><span style="font-size: 16px; line-height: 28px; text-align: left;"><span style="color: orange;">Source Site :</span><span style="color: white;"> </span></span></b></span><b>http://thehackernews.com/2017/08/wannacry-ransomware-bitcoin.html</b></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #212121; font-family: "source sans pro" , "helvetica neue" , "helvetica" , "helvetica" , "arial" , sans-serif; font-size: 16px; line-height: 25px;"><br /></span></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com1tag:blogger.com,1999:blog-3139632596985166429.post-84495816495248124642018-11-14T00:34:00.000-08:002018-11-14T00:34:38.848-08:00 Why Egyptians made mummies?<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white; clear: left; color: black; float: left; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="642" data-original-width="973" height="419" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyJdH0my5Um5xOyDW2j80bTF6euC062VEtvwDVuXnpf-J0KTEdul7Jm7Bcos4OD68GSZq8hyphenhyphen9aFgBsQ4kndnjvsMbiS-JLgE9-0OiZTSRRQ91lyOdC-ivFIzLst5RzkkNOY_U-lf24TEI3/s640/egyptian-mummy_0.jpg" width="640" /></span></div>
<span style="background-color: white;"><span style="background-color: black;"><span style="color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span>
</span><br />
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="color: #38761d;"><b>Egyptians</b></span> believed that a person's soul had many parts, and that all people and the parts of their souls were sculpted from clay by the ram-headed god named Khnum. One of these parts was called the ka. The ka was a person's double, sort of an invisible twin, which supposedly lived in the body until death. It was necessary to prevent the dead body from decaying because the ka still needed it!</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Sometimes a statue that resembled the deceased would be placed in the tomb with the mummy. These ka statues were a back-up, to make sure the ka had a body to belong to, just in case something should happen to the mummy. In addition to a recognizable body, the ka also needed food to survive. When Egyptians left food and water at the tomb, they were leaving it for the ka.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBZ-TBTNS27huNtJttA8Zjnt61_PhLfYMzUUEdLTDkhDzaBwykWAL-u4fLEUDItWDSeCpa9Tvy8b-zLCXo41JMridf5wEI6wbJn8jknlS3VtZ2UMUVgNf5-xoKGv7OQBF1ylCZ5Ip7KNLn/s1600/Screaming-Mummy.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: black;"><span style="background-color: white; color: black; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><img border="0" data-original-height="630" data-original-width="1200" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBZ-TBTNS27huNtJttA8Zjnt61_PhLfYMzUUEdLTDkhDzaBwykWAL-u4fLEUDItWDSeCpa9Tvy8b-zLCXo41JMridf5wEI6wbJn8jknlS3VtZ2UMUVgNf5-xoKGv7OQBF1ylCZ5Ip7KNLn/s320/Screaming-Mummy.jpg" width="320" /></span></span></a><span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Another part of the soul was called the ba. The ba was usually shown as a bird with a human head that looked like that of the dead person. Unlike the ka, which stayed in the tomb with the mummy, the ba was able to leave. It could fly out of the tomb, magically passing through walls of solid rock. But it always returned to the mummy at night. Like the ka, it could only live forever if it was able to find and recognize the body to which it belonged. And this wouldn't be possible if the body decomposed! This is why the Egyptians wanted to preserve the dead in as life-like a state as possible. Mummification was the guarantee of eternal life.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">What isn't known is whether the Egyptians practiced mummification to support their religion, OR if they shaped their religious beliefs to go along with their desire for fancy burials, which relied on mummification.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; color: #38761d; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b>How Egyptians made mummies:</b></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxzgc3ulrYDM_glYWhmfdCo0-1FHcOrVVhXEykis-m-hmoZTEHQud8_DUEznjXNkm2-u0zechzE7z39C-nl1hDZn5EhNZ58PonDq3bwWafV9pgt4_N2Y6BrDEXa4OukRQWhb74sgRNKxW8/s1600/Monster_history_-_mummy_figure_stockphoto.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: black;"><span style="background-color: white; color: black; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><img border="0" data-original-height="1500" data-original-width="1313" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxzgc3ulrYDM_glYWhmfdCo0-1FHcOrVVhXEykis-m-hmoZTEHQud8_DUEznjXNkm2-u0zechzE7z39C-nl1hDZn5EhNZ58PonDq3bwWafV9pgt4_N2Y6BrDEXa4OukRQWhb74sgRNKxW8/s200/Monster_history_-_mummy_figure_stockphoto.jpg" width="175" /></span></span></a><span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Early attempts at mummification were not successful because the coffin, bandages, and resin locked the moisture inside the corpse, making it rot from within. But making mummies turned out to be not so difficult after all-- the Egyptians improved on nature by artificially drying the bodies before sealing with resin. </span></span></div>
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The entire process of mummification took 70 days to complete. Several well-respected embalmers conducted the task in a special enclosure called a per nefer. The chief embalmer was known as the hery seshta. He wore a jackal mask to represent Anubis, the god of mummification. Assistants called wetyw bandaged the body and carried out other tasks of the embalming process.</span></span></div>
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">After being delivered to the per nefer, the deceased was placed upon a slanted table. The first task that needed to be done was to remove the soft, moist body parts that would cause decay. As these parts were removed, blood and other bodily fluids trickled out and flowed down the table into a collecting bowl.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">During the Old and Middle Kingdoms, the brain was left in the head, but starting in the New Kingdom it was removed. The bone that separates the nasal cavity from the brain cavity was broken open by ramming a sharp instrument up the nose. Then, a long hook was used to stir up the brain until it was liquefied. By turning the body face down, the brain would spill out the nostrils. The Egyptians were so rough on the brain because they didn't realize its importance. They thought its purpose was just to produce snot!</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">brain removal hook</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Next, some of the major organs were removed. One of the embalmers would use a blade made of sharpened stone or obsidian to make an incision in the left side of the abdomen. Although this step was entirely necessary to remove the organs, they didn't like it because it was considered sinful to "injure" a corpse. In mock ceremony, the other embalmers present would curse and throw stones at the man who made the cut. They didn't really try to hurt him, it was all just part of the ceremony.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The stomach, intestines, liver, and lungs were removed and preserved by drying them in a special salt called natron. Natron is chemically similar to a mixture of table salt and baking soda. Originally dissolved in the ground water, it is found in clumps by oases where it gets left behind when water evaporates.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">After drying, the organs would be put in a four-chambered box. This box was stored in the tomb with the mummy. The Egyptians believed that all body parts would be magically reunited in the afterlife and the body would become whole again, just like the god Osiris. According to Egyptian mythology, the god Osiris was murdered by his jealous brother Set and hacked into pieces. The goddess Isis reassembled the pieces and Osiris was magically restored, and went on to become the god of the afterlife.</span></span></div>
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">In later times, it became customary to put each organ into a separate container called a canopic jar. During the Middle Kingdom, the stoppers of the jars were carved to resemble the face of the dead person. Later still, during the New Kingdom, the stoppers of canopic jars were shaped like the heads of the four sons of the god Horus. Each son protected the organ placed inside his respective jar.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Duamutef, who had the head of a jackal, guarded the jar that contained the stomach. Qebehsenuf, who had the head of a falcon, watched over the intestines. Hapi, the baboon-headed son of Horus, protected the lungs, while human-headed Imseti was in charge of protecting the liver.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Canopic jars were usually stored in a four-chambered chest that was later placed in the tomb with the mummy. By 1000 BC, the preserved organs were wrapped in linen and placed back in the mummy's body, but the empty canopic jars were still placed in the tomb.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">After the organs were removed, the body was washed with wine and rubbed with spices. The alcohol in the wine acted as an antiseptic, helping to kill bacteria. The corpse was then covered with natron, where it sat for 40 days to dry out. Once dried, the skin was shrunken and leathery. The mummy was cleaned again and rubbed with sacred oils to soften the skin.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">In one Egyptian myth, the god Horus had his eye miraculously restored after losing it in a battle with the evil god Set. The eye of Horus, known as a wedjat, is associated with healing and protection. A wax or bronze plate with a wedjat carved into it was placed over the embalming incision to magically heal the mummy in the afterlife.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Once the body was fully dried and cleaned, it was adorned with jewelry. Then it was covered in linen shrouds and bound with linen strips. Small magical amulets were inserted between the layers of the bandages to protect the mummy's spirit on its way to the afterlife. As each layer was added, it was coated with resin to hold the wrappings together with a waterproof seal.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">some funerary amulets: ankh (symbolizes life); djed (for strength</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">and stability); tet (protects the limbs); and a scarab (symbolizes rebirth)</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: black;"><span style="background-color: white; font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.facebook.com/WorldTrendsCenter/" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em;" target="_blank"><span style="color: black;">
<img border="0" data-original-height="161" data-original-width="620" height="83" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRME8ltz4p65tF35CI3-E2XIMoS0Tfn0kmVmmAOWfJW3Z3TsqM-dTCNum0oHdKf6YQmRqLRM3-RlLq849II-NGkAHVJAS1sqTy65vl7dplXMUH3vublcvuDC3SbjMIOSEqbRr108NaRFRd/s320/facebook_like_logo1-620x161-ID-9d307bda-ba25-48df-f2ec-9727ed720b16.png" width="320" /></span></a></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0tag:blogger.com,1999:blog-3139632596985166429.post-55638322183170168672018-11-13T21:22:00.001-08:002018-11-13T21:22:42.986-08:00DOWNLOAD | HUNTER×HUNTER World Hunt v1.1.6 Mod Apk<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkJBYhj-z55_jZY6lvdjAUtYOSTnmoWl1Zw_MN3G8xmSyWehVTGH0sYqwxkJz3pZSaq5OobpeTokBXPzmJTrJfmOtLixsZUEi2HRJBJ96VMxGdZUBeMZ3NPNtpEaenBoruC04SBZw-UeT/s1600/hxh-feature-image.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="1000" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkJBYhj-z55_jZY6lvdjAUtYOSTnmoWl1Zw_MN3G8xmSyWehVTGH0sYqwxkJz3pZSaq5OobpeTokBXPzmJTrJfmOtLixsZUEi2HRJBJ96VMxGdZUBeMZ3NPNtpEaenBoruC04SBZw-UeT/s640/hxh-feature-image.jpg" width="640" /></a></div>
<a href="http://www.apkdlmod.com/hunterxhunter-world-hunt-apk-mod.html" style="box-sizing: border-box; color: #4db2ec; font-family: Verdana, Geneva, sans-serif; font-size: 15px; text-decoration-line: none;"><strong style="box-sizing: border-box;">HUNTER×HUNTER World Hunt v1.1.6 Mod Apk</strong></a><span style="background-color: white; color: #222222; font-family: "verdana" , "geneva" , sans-serif; font-size: 15px;"> </span><br />
<span style="background-color: white; color: #222222; font-family: "verdana" , "geneva" , sans-serif; font-size: 15px;"><br /></span>
<span style="background-color: white; color: #222222; font-family: "verdana" , "geneva" , sans-serif; font-size: 15px;">Themselves to create the avatar mimics the world of HUNTER × HUNTER</span><br />
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
Can enter into the cyber world, it is a hunter-life simulation.<br />
Avatar appearance and equipment, of course, is possible to build a sense ability as a precaution system diagnostics and piece Tsukai puzzle called the aura memory in the pounding 2 quiz and water seen equation.</div>
<a name='more'></a><br style="box-sizing: border-box;" />
You can also put a new aura memory in hand by making the adventure with familiar characters who, such as Gon and Killua, forces and of each system, you can foster the ability.<br />
In addition there are also elements of the guild, it raised avatar, Aim the strongest guild along with the fellow in your own just in case capacity.<br />
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
※ to’ll play you this application please allow access to the “phone” at the time of application startup. It is intended to be used for user identification, be originating from this application will never.</div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
[Operating environment, and other inquiries]<br />
https://bnfaq.channel.or.jp/contact/faq_list/1823</div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
※ This app, please use always in the operating environment described in the above link. It should be noted that, even in the case of use in the operating environment, due to factors of your usage and model of the specific customer, you may be the app is not working properly.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3VJoqjQG1UcVmPxOVid1kVgv14itw_VM2yw3uyP6w-OEoXaEZbeC5i3tLlrihQrprtPjdshJlkKNx8Lk51pzanzYSvcsct1p1xtGgWYb-DSV5ZvPVoYR1gO-LIPLlimKV5fJcx2VszwMx/s1600/4-1024x577.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="577" data-original-width="1024" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3VJoqjQG1UcVmPxOVid1kVgv14itw_VM2yw3uyP6w-OEoXaEZbeC5i3tLlrihQrprtPjdshJlkKNx8Lk51pzanzYSvcsct1p1xtGgWYb-DSV5ZvPVoYR1gO-LIPLlimKV5fJcx2VszwMx/s320/4-1024x577.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggHfWi9Z7qtFPjWpYkuRmzKKZ9ijm79lmw5G1YAJzCChjkxj2XetHtNKP_4Na-TA_qN7tOw64DhfUYhAV4z8w0QKHOijApLJPzxIAiDWbSBTOJdfaFB2VOQ3AhRmXWwyCTe_w0KyPeD0uS/s1600/hxhimg1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="338" data-original-width="600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggHfWi9Z7qtFPjWpYkuRmzKKZ9ijm79lmw5G1YAJzCChjkxj2XetHtNKP_4Na-TA_qN7tOw64DhfUYhAV4z8w0QKHOijApLJPzxIAiDWbSBTOJdfaFB2VOQ3AhRmXWwyCTe_w0KyPeD0uS/s320/hxhimg1.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaowF2GN8V9B9HoBrEI0NZGtRkGCd_e9Cq68_z7G8uRN-YOkdZX5RhUvEToTzsHDXXNkzkw8COdinzyhxyltaudEwlluRvJ4OzpZEK5ALxH_E6EXHSK0mzMyUw3ohp3kmNm-FNdWUDDuH2/s1600/IMG_3558.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="750" data-original-width="1334" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaowF2GN8V9B9HoBrEI0NZGtRkGCd_e9Cq68_z7G8uRN-YOkdZX5RhUvEToTzsHDXXNkzkw8COdinzyhxyltaudEwlluRvJ4OzpZEK5ALxH_E6EXHSK0mzMyUw3ohp3kmNm-FNdWUDDuH2/s320/IMG_3558.PNG" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDgysaHKiBT3KIrCPUySqm-UuIa0ut5Q_7YWL7m0M0WVSchP_nQFYDIPBgsMBb-j4XAuyZ1y9WSkBV1KYuI991GtAjpz3lomn3L14od8ePw5QVvVTYO6wAv74pmgijRsKdt09FdblGfYOI/s1600/tumblr_opu8uhQguq1saz9u4o1_500.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="281" data-original-width="500" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDgysaHKiBT3KIrCPUySqm-UuIa0ut5Q_7YWL7m0M0WVSchP_nQFYDIPBgsMBb-j4XAuyZ1y9WSkBV1KYuI991GtAjpz3lomn3L14od8ePw5QVvVTYO6wAv74pmgijRsKdt09FdblGfYOI/s320/tumblr_opu8uhQguq1saz9u4o1_500.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcYNCskZ_ZA2zPjv6Ubfxa4bg6yYPpb0BykdKDRqt8bq0-Cm7pKt21vyOJqIH5W59Vz9d1hHrwr1hhdryDNM2az-g-iT_U-gn7FNRd9WhGrY3_UCrJt8exRu8ebYGPEoyaKpEfBwCj-4OX/s1600/unnamed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="355" data-original-width="631" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcYNCskZ_ZA2zPjv6Ubfxa4bg6yYPpb0BykdKDRqt8bq0-Cm7pKt21vyOJqIH5W59Vz9d1hHrwr1hhdryDNM2az-g-iT_U-gn7FNRd9WhGrY3_UCrJt8exRu8ebYGPEoyaKpEfBwCj-4OX/s320/unnamed.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
<span style="box-sizing: border-box; color: red;"><strong style="box-sizing: border-box;">MOD:</strong></span><br />
High Damage<br />
High Defense</div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
*Sometimes you hit 0 or 1, i’ve no idea why maybe is something from the game.. I just blindly clicked all the way.</div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
*Some enemies debuffs can kill you if you’re too weak for the stage and have low HP.</div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
*IF YOU’RE A NEW PLAYER USE THE ORIGINAL APK TO PLAY THE TUTORIAL BEFORE USING THE MODDED APK.</div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px;">
<strong style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red;">DOWNLOAD:</span></strong></div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: verdana, geneva, sans-serif; line-height: 26px; margin-bottom: 26px;">
<a class="external" href="http://m.obblink.com/1r0XD" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #4db2ec;" target="_blank"><strong style="box-sizing: border-box;"><span style="font-size: xx-small;">HUNTER×HUNTER World Hunt v1.1.6 Mod Apk – <span style="box-sizing: border-box; color: olive;">DROPLOAD</span></span></strong></a></div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: verdana, geneva, sans-serif; line-height: 26px; margin-bottom: 26px;">
<a class="external" href="http://m.obblink.com/sWi1v" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #4db2ec; text-decoration-line: none;" target="_blank"><strong style="box-sizing: border-box;"><span style="font-size: xx-small;">HUNTER×HUNTER World Hunt v1.1.6 Mod Apk – <span style="box-sizing: border-box; color: #ff6600;">ZIPPYSHARE</span></span></strong></a></div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: verdana, geneva, sans-serif; line-height: 26px; margin-bottom: 26px;">
<strong style="background-color: transparent; box-sizing: border-box; color: #4db2ec;"><a class="external" href="http://m.obblink.com/WA9it" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #4db2ec; text-decoration-line: none;" target="_blank"><span style="font-size: xx-small;">HUNTER×HUNTER World Hunt v1.1.6 Mod Apk – <span style="box-sizing: border-box; color: teal;">DRIVE LINK</span></span></a></strong></div>
<div style="background-color: white; box-sizing: border-box; color: #222222; font-family: verdana, geneva, sans-serif; line-height: 26px; margin-bottom: 26px;">
<a class="external" href="http://m.obblink.com/LEHnF" rel="nofollow" style="background-color: transparent; box-sizing: border-box; color: #4db2ec;" target="_blank"><strong style="box-sizing: border-box;"><span style="font-size: xx-small;">HUNTER×HUNTER World Hunt v1.1.6 Mod Apk – <span style="box-sizing: border-box; color: #993300;">RACATY LINK</span></span></strong></a></div>
JARM is Lifehttp://www.blogger.com/profile/12252621618298599901noreply@blogger.com0