Posts

Showing posts with the label php

CSS not updating in PHP page

Image
      If you are working with PHP you may have faced a problem that whenever the CSS is being updated the new styles are not shown in the PHP page. This happens due to some caching problems. In this situation you have to hard reload the CSS each time page is refreshed. Normally, you have already included the CSS like this:  <link rel="stylesheet" href="style.css" />     But to hard reload the CSS and make the styles work every time you update the CSS file, you have to include the PHP code after CSS file name with ?v=  <?php echo date('his'); ?> . So the final structure will be like:  <link rel="stylesheet" href="style.css?v=<?php echo date('his'); ?>" /> Hope, you understand the solution. If you have any opinion, doubt or suggestion make a comment below. Also mention your country name in the comments, I am curious!! Ok, have a good day , Byee..

Send AJAX Request to PHP using jQuery.

Image
 PHP is a very commonly used language for backend web development. This is used to make dynamic websites with a database connection. Now there are two types of request that can be sent to a PHP file GET and POST. In the normal case if you sent any request a PHP file the page will be refreshed, which will surely decrease the User Experience. Also in some web applications it may happen that you have to send request to a PHP file very frequently. In these situations we have another way to send request and receive response from the PHP file. It can be done through Ajax or XMLHttp request. Normal Javascript can be used to write a code for AJAX but I will recommend jQuery to do this task as it is time saving and less code have to be written.  At first include the jQuery CDN link above the closing </BODY> tag . You can get it from here--> <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="

Is PHP dead ? What to use in backend ?

Image
  So, hello everyone welcome to another blog. Now the question that leads you to this blog post is that which language should we use in the backend of website. For about two decades, PHP was soo famous in web backend development and was the compulsory language for backend developers. But, nowadays, some says that PHP is dead , he is no more, leave it, kill it and so on. So, what's the matter actually and what to learn. Okay, let's point out one thing that--  Do you know Wordpress is the biggest platform for blog websites. Very interestingly,  it is totally on PHP. Also, PHP is made and brought up only and specially for web development. Also PHP is very compatible with HTML and CSS websites.  People who say that PHP is dead actually they somehow hate this language. But trust me it is not true. In this days, in the web 79.1 % websites are on PHP.  Also it has a very strong userbase throughout the world.  Also, let me mention some giant websites which are world famous all time an