Hack

‘ HTML-PHP ’ category archive

Photo Gallery with Carousel Viewer

March 27, 08 by Crossover

carusel

Dynamic Drive offers a page slider script they call the Step Carousel Viewer, which uses jQuery as well. The examples they use on the page are images only, but the panels themselves are just DIV’s, so you could conceivably put anything you want in there. There are some unique navigational options which makes this one cool such as “forward 2 panels” and “back to 1st panel” as well as an option to display which panel (or range of panels) you are currently viewing.

{via css-tricks}

Thanks for visiting! If you're new here, you may want to subscribe to my Rss Feed. This blog posts regular Internet news, updates for apps, security, ideas, hacks, quick fixes and everything about hi-tech. Go ahead, subscribe to our feed!

10 Tips That Every PHP Newbie Should Know

September 18, 07 by ReniX

php

I wish I had known these 10 tips the day I started working with PHP. Instead of learning them through painstaking process, I could have been on my way to becoming a PHP programmer even sooner! This article is presented in two parts and is intended for folks who are new to PHP.

Tip 1: MySQL Connection Class

The majority of web applications I’ve worked with over the past year have used some variation of this connection class:
[sourcecode language='sql']
class DB {
function DB() {
$this->host = “localhost”; // your host
$this->db = “myDatabase”; // your database
$this->user = “root”; // your username
$this->pass = “mysql”; // your password

$this->link = mysql_connect($this->host, $this->user,
$this->pass);
mysql_select_db($this->db);
}
}

// calls it to action
$db = new $DB;[/sourcecode]

Simply edit the variables and include this in your files. This doesn’t require any knowledge or special understanding to use. Once you’ve added it to your repertoire, you won’t likely need to create a new connection class any time soon. Now you can get to work and quickly connect to your database without a lot of extra markup:
[sourcecode language='sql']
$result = mysql_query(”SELECT * FROM table ORDER BY id ASC LIMIT 0,10″);[/sourcecode]
Read the rest of this entry »

External web links - Linket e jashtem

July 24, 07 by ReniX

se shpejti… soon

Close
E-mail It