You can use the jQuery :checked selector together with the each() method to retrieve the values of all checkboxes selected during a group. The each() method used here simply iterates over all the checkboxes that are checked. Let’s try an example to check how it works:
Utilizing URLs on your site that are program friendly is straight forward and straight forward to try to to because of PHP and Apache. we’ll be utilizing permalinks that get obviate all the nasty $_GET data that trails the top of most PHP scripts. An example of a SEO unfriendly URL we’ll clean is:
Using a combination of Apache’s ForceType directive, the PHP explode() function and PHP’s PATH_INFO variable we will easily turn the sample URL into:
http://www.domain.com/post/123/seo-php-url
This not only helps our website’s SEO (search engine optimization), but also accomplishes a security concept is understood as “security by obscurity”. By obscuring the very fact that our internet site is employing a PHP script, we may detract potential hackers from trying to find exploits within our scripts.
Follow below code for
Step1: First remove all special character from url
function clean($title) {
$string = str_replace(' ', '-', $title); // Replaces all spaces with hyphens.
$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one.
}
$slug=strtolower(clean($title));
Explanation Of above code
in $title you store form title value and remove space from both end and Convert the predefined characters “<” (less than) and “>” (greater than) to HTML entities
and most important to use clean function .
In this function you just need to pass title value and use this function value in $slug ou your desire url valriable
When the user selects a picture, an onChange event is triggered on the file input field and that we can use JavaScript’s readURL() class to onchange event to display the image for preview. When the user choose the file, the input form is going to be submitted to an equivalent page. So on its same form.
Step 1: Preparing for HTML to WordPress Conversion The first and foremost thing is to choose the right hosting plan that best fits your requirements. Once you’ve purchased a plan, you will need to install WordPress and log into WordPress’s admin panel.
Step 2: Before you start the site conversion, you must create a backup of your existing website data. It will empower you to eliminate all the migration risks. You can use a hard disk, flash drive or any other medium or object for data backup.
Step 3: When you have a backup of your website, it’s time to create a WordPress theme. There are two options available:
Manually create a WordPress theme according to your static HTML website. If your motive is to not only move the content from your HTML website into WordPress but also want the existing design, you will need to create a custom theme. Thankfully, this is not as difficult as it sounds at first. It involves the simple process of setting up some folders and files, copying & pasting, and then uploading the content. Here, you will need a code editor i.e. Notepad++ or Sublime. Moreover, you will require an HTML site’s directory and new WordPress install’s directory.
Create a New Theme Folder and Necessary Files On a desktop, simply create a new folder to store your theme files. Now, create the below-mentioned files in a code editor. You will not need to do, just leave them open for further coding. Style.css Index.php header.php sidebar.php footer.php Copy current CSS into New Stylesheet If you are looking forward to imitating a design, you will need to play with the CSS. So the first file you should edit is your Style.css file.
You should add the following code to the top of your file:
/* Theme Name: Replace with your Theme’s name. Theme URI: Your Theme’s URI Description: A brief description. Version: 1.0 Author: You Author URI: Your website address. */ After this section, just paste your current CSS below and save the file.
Separate your existing HTML Before we go further, let’s see how WordPress works. WordPress uses PHP to call and recover the data from its underlying database. Each file that is mentioned in this tutorial is created to tell WordPress which part of your web content needs to be shown and where. So, here what you need to do is just copy and paste your existing code into the individual files, you’ve just created and let WordPress know where to display them. Follow all the below mentioned steps to perform this:
First, open the index.html of your existing website. Highlight the section from the top to the div class=”main” tag. Now, copy & paste this section into your header.php file and save. Again, open your index.html file and highlight the class=”sidebar” element and everything inside it. Now, copy and paste the copied part into your sidebar.php file and save. Now, select everything that comes after the sidebar and copy & paste this part into your footer.php file and save. In the end, copy everything that’s left in your index.html file and paste it into your index.php file and save. • Finalize Your Index.php File
In order to settle your new index.php file, you need to make sure that it calls up all the other sections that is kept in other files you’ve created.
Place the following line of php. at the top of your index.php file:
Place following code to the very bottom of your index.php file
And last but not the least, you will need to add the primary bit of php that WordPress uses to showcase your content to the visitors.
Now, the final step is to add the below-mentioned code in the index.php.
I am an experienced PHP web developer and completed several web development projects successfully using WordPress , Woocommerce, Html5, CSS3, Bootstrap, JavaScript, JQuery, PHP, Codeigniter, and Mysqli.