Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Monday, January 4, 2021

Create Single Line Border Table HTML/CSS

I used table tag in html to create a table, but by default this tab create table with double line border and extended to the full length of Page.

But my requirement to use single line table. You can use below properties for TABLE tag to create single line border table.


<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse;" width="200px">

Sample table created (click here)

Saturday, December 5, 2020

How to Launch First Page using XAMPP on local machine

 How to Launch First Page using XAMPP on local machine

If you are new to XAMPP/PHP then this blog may help you. If you are not aware how to run php page on your local computer, read and follow below steps carefully


  • Start XAMPP
  • Make sure Apache/MySQL is running through XAMPP
  • Go to installation folder of XAMPP
  • Locate htdocs folder in installation directory "C:\xampp\htdocs\username"
  • Create any Folder in "htdocs" folder
  • Move in New folder created in "htdocs"
  • create new file containing your PHP code
  • Launch Chrome Browser or any other browser installed on your computer
  • Enter URL "http://localhost/phpmyadmin/" to make sure XAMPP is up and running
  • Enter url "http://localhost/username/first_.php" 


Note * - first_.php is the php page which is kept under htdocs folder, you must put your project under "htdocs" folder only



Create Search TextBox on Webpage

I have used this search textBox to search from the table, it can search any text (entered in text box) from the whole table and table will show only those rows where ever searched keyword found.

Once can modify the code as per their requirement.

Add below code in your header tab of html/xml code. Actual code is in "script" tag which is handling this implementation.

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#myInput").on("keyup", function() {
    var value = $(this).val().toLowerCase();
    $("#ListAllPost tr").filter(function() {
      $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
    });
  });
});
</script>
<style>
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}
td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 4px;
}
tr:nth-child(even) {
  background-color: #dddddd;
}
</style>
</head>
<body>
<h2>
Filter Posts</h2>
<input id="myInput" placeholder="Search.." type="text" />
<table><thead>
<tr>     <th style="width: 10%;">  Full Name  </th>     <th style="width: 45%;">Comment</th>     <th style="width: 45%;">Place</th>   </tr>
</thead>    <tbody id="ListAllPost">
<tr><td>Gurjeet Singh</td>     <td><a href="http://j4info.blogspot.com/p/blog-page_14.html">Enter any text in your text Box</td> <td>Click on the link to see the implementation</td> </tr>
<tr><td>J4Info</td>     <td><a href="http://j4info.blogspot.com/p/blog-page_14.html">Entered text will look from this table rows and accordingly show only that rows where ever searched keyword found.</a></td><td>Click on the link to see the implementation</td> </tr>
</tbody></table>
</body></html>
</div>

Use this code for
  • To add search text button in your blog
  • Search text in your website
  • Add Search button in table
  • Search keyword from tabular data

Friday, January 27, 2017

Xampp Starting Error

One of the friend came to me and ask if you will help me out, i said why not. when i asked about the problem he told my xampp server was not working. I was think in my mind i was not aware of this tool, then how i can help him. However we sit together and started looking into the problem.

We were having
- Window 7 on 32 bit laptop
- xampp server installed by friedn him self

We started and try to start xampp and getting below error


"Port 80 in use by "unable to open process" with PID 4:

Error clearly mention, Apache tomcat want to use 80 port and it is being used by PID (Process ID) 4

How to proceed:
  • Open Task manager
  • Look for the PID with number 4, probable it will be "NT Kernel and system"
  • Open CMD and check the processes that are running with port number 80
netstat -o -n -a | findstr 0.0:80

  • After searching on google, came to know that the PID process is related to SQL server Reporting server. 
  • Go to services
  • Stop all services related to SQLServer
  • Stop and start services for apache and mysql
  • It Works!!!!


Other Possible Processes :

Skype
IIS
VMWork Station

web stats