WEB-NES-BAY

Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware

bookmark bookmark
Posted by WEBNESBAY ADD COMMENTS

Most of the websites use this alternating color to tables which will make the user readability of table content. We can use any of the colors you want.
I am writing php code which will print the data present in the mysql table in a alternating color format.
<?php
//Database Connection inputs
$host=”localhost”; // Host name
$username=””; // Mysql username
$password=””; // Mysql password
$database=”mydb”; // Database name
$table=”mytable”; // Table name
// Connect to server and select databse
mysql_connect(“$host”, “$username”, “$password”)or die(“cannot connect”);
mysql_select_db(“$mydb”)or die(“cannot select DB”);
$sql=”SELECT * FROM $mytable”;
$result=mysql_query($sql);
// [...]

Categories: PHP
Posted by WEBNESBAY 1 COMMENT

Cookies have been the most popular concept of internet. They were invented to allow webmaster’s to store information about the user and their visit on the user’s computer.
Also, by storing the cookie information we may track the user logs very easily with timestamps
This article will teach you the basics of storing a cookie and retrieving a cookie, and different options of cookies
Creating Your First PHP Cookie
When you create a cookie, using the function setcookie, you must specify three arguments. These [...]

Categories: PHP
Posted by WEBNESBAY ADD COMMENTS

I recently got the chance to actually try out the product. Here’s a brief tour of Delphi for PHP, which I hope will help you bootstrap yourself into the environment. Because many regular readers are already familiar with Visual Studio, and because I am extremely familiar with it, I will be making many comparisons between Delphi for PHP and Visual Studio. Also, I won’t spend time discussing the PHP language itself, but I will show how the work in the [...]

Categories: PHP
Posted by WEBNESBAY ADD COMMENTS

Since Javascript is a client-side technology, and PHP is a server-side technology, the two languages cannot directly share variables. It is, however, possible to pass variables between the two. One way of accomplishing this is to generate Javascript code with PHP, and have the browser refresh itself, passing specific variables back to the PHP script. The example below shows precisely how to do this — it allows PHP code to capture screen height and width, something that is normally only [...]

Categories: PHP