Web Development Code Snippet Index

A four function calculator (HTML)

Here we use the eval() function as the backbone of a simple calculator. One table is used for the display. A second table holds the buttons for the keypad. The whole thing forms an attractive looking calculator. To test it, simply paste the code into an editor like notepad and save it as... (Read More)
-1

Google search bar

Put your very own Google search bar on your web page. (Read More)
1

Pure CSS Rollover Navigation

This piece of css will show you that it is perfectly possibly to create a good looking navigation bar without any images or javascript and just a couple of lines of css. All you need to do is create a html file that contains a unordered list in it with your navigation links in it as <li>. You... (Read More)
1

Pure CSS Image Gallery with mouse-click swap

This code enables you to publish a CSS only with mouse click and keyboard tab image swap. Attached is a Demo example of how it would look on IE6. To ensure the greatest possible cross-browser compatibility/support this code uses CSS level 1 capabilities only. One of extra benefits is that... (Read More)

Make text inside a textfield display when the page loads and disapear when clicked

Use This script can be used to mimize space of a textfield by putting the title of the field inside the text field itself when the page loads. This title will then disapear when it is clicked. How To Use Use the following code as your textfield and fill in the "value" property with the... (Read More)

Blackjack

You can place the game "Blackjack" by adding the following script to your website. All the information is included within the script, please do not remove the warranty or information. If you don't want such a big lap of code on your website, you can also place the following, as this is a link to... (Read More)
2

StarRating v.1.01

This script can be used for star ratings on for example forum or music sites. The scriptinformation is included within the script. ~G (Read More)

JS Date-parser

This is a simple code-snippet that can be used to parse dates with javascript. It's setup to use European dates (dd.mm.yyyy | dd/mm/yyyy | dd,mm,yyyy), but it can easily be setup to use american dates as well (mm/dd/yyyy etc), to do so simply replace "$1" with "$2" and "$2" with "$1". No... (Read More)

Table Editer

This is a nice and easy table editer. Use it to add and delete cells, rows, and a caption (Read More)

Password Encrypter

Use this to encrypt your passwords, for login fields and password protection. (Read More)
-1

Power Calculator

Calculates Power to the number (Read More)

JavaScript Binary/ASCII Converter

Here's a script I worked up to convert binary code into ASCII. Didn't work out an ASCII to binary conversion yet. (Read More)

Display html tags on a webpage

Displays the html tags without rendering on a webpage. (Read More)

Two steps to install thumbnail viewer

1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function ViewImage(ifile,ix,iy,ititle) { var... (Read More)
PHP

Resizing an image

this script, made by me, lets you resize an image propotionally! (Read More)

Private Messaging system

This one is a messaging system! Made it myself, works great! Hopes you like :) (Read More)

PHP Proxy Solution for cross-domain AJAX scripting

This is a PHP script that allows javascript clients to request content they otherwise would not be able to. With the popularity of AJAX (using the XmlHttpRequest object in the browser), many developers are becoming aware of the cross-domain scripting limitation. This is a security feature that... (Read More)

Javascript not working in PHP class file

I am in the process of learning PHP with JS and Ajax and have the foll. problems. I have created a class to generate master data entry screens. (1) Javascript code that works when I run master.class.php independently does not work when I run users.php. I came across this problem while trying to... (Read More)

Export CSV TO Mysql and Import to CSV from MYsql in PHP

Export CSV TO Mysql and Import to CSV from MYsql in PHP (Read More)

Save, edit & update languages in one time

I wont describe whats here, just figure it out yerself, enjoy =) (Read More)

Ping

Ping a server (Read More)

parse error on last line (line 802)

this php n html code is supposeed to allow editting of property info/details (Read More)

PHP Login Script

Here is a simple login script (Read More)

generate a PDF and send as attachment

FPDF is a class that provides a useful way to deal with PDF documents using dynamic content. Sometimes, according to a special circumstance, also would be valuable to send directly the PDF as attachment e.g. send an invoice automatically after processing a payment. In this example we use a html... (Read More)
1

Filter url to domain

In these three functions, you can filter to a url to just the domain name. There are three main methods of doing so which are all shown in the example and the usage of each function is shown in the example. (Read More)

Storing Passwords Securely in Database and Cookies

I am posting this code snippet as I continue to see login and user registration scripts that store passwords in databases as unsalted md5 hashes, and passwords in cookies as raw text. This snippet includes an example user registration function, as well as an example user login, login check, and... (Read More)

Greeting the Guests & Users

This tutorial shows how to greet your visitors depending on what time of day it is. If it's morning, it greets your visitor with "Good Morning!" If it's afternoon, it greets them with "Good Afternoon!" Magic? Noooo! Just PHP! We will start by looking at the entire script and then dissecting it... (Read More)

Delete Records With Effect Using jQuery And PHP

Overview this is a fast way to delete Records from your mysql datebase without loading the page . this jquery code can Delete a Record with animation fade-out effect using jQuery and Ajax. <FAKE SIGNATURE> (Read More)

Fill Function

Got bored and made a function that handles filling strings similar to mysqli bind_param. It actually gets used a lot in my code. Figured someone else might find it useful. Example usage: Using question marks as place holders $str = 'Hello, my daniweb user name is ? and my real name is ?';... (Read More)

Find String in PHP Ready easy function

Better way to find String in PHP ! instead of substring and other php function , This function takes Start and End , and it will return the String in between in another variable ! you can call it easily :) (Read More)

CURL PHP Ready function !

This is CURL Ready function , to use it just call do post if the page you are calling has post variables , or get if it has get variables :) (Read More)

PHP HTTP Screen-Scraping Class with Caching

class_http.php is a "screen-scraping" utility that makes it easy to scrape content and cache scraped content for any number of seconds desired before hitting the live source again. Caching makes you a good neighbor! The class has 2 static methods that make it easy to extract individual tables of... (Read More)

This is it!!

This is it, I've completed my forum script and I'm sharing it with you!!!!!!! :O Hope you like it, if you find any bugs, please post it here Oh yea, and the first registered person will be the admin (Read More)
1

PHP Register Script

A simple register script (Read More)

Currency Converter

Hi there peoples, This is a currency converter, built with a combination of javascript and php, which uses an XML feed from http://www.ecb.int/ to get up to date exchange rates. I know the xml handling is not very elegant, but it is functional :) Additions/comments/corrections welcome (Read More)

SQL Insert India 'State'

SQL Insert India 'State' (Read More)
ASP

Display Random Banners

I created this code because i was bored and wanted to try something with some code and i ended up creating this little code snip. Code from: http://www.iportalx.net (Read More)

Blocking an IP adress to a certain page

This is a small function that will block the specific IP from viewing the certain page, and it will redirect the user to the main page or noaccess page. (Read More)

asp.net login some part coding

hey buddies:) here is login page for begining purpose in asp.net i hope you will enjoy it and it is expected there is some mistakes also so please feedback it. Thanks (Read More)

Domain Name Checker

A simple domain name checker. This script use service from who.is Usage: ruby domainchecker.rb <domain_name> (Read More)

Forum Tools


Tag cloud for Web Development
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC