Code2Design.com
P.S. Don't leave without watching the Video Tutorials!

User login

The Layout

Programming

Graphic Design

Resources

Navigation

C2D Projects

Unsystematic Affiliates

Flash Valley AOM Designs The-Tutorials Tutorial Mix 

Change Language

Who's online

There are currently 0 users and 6 guests online.

PHP Video Tutorials

After several months work I am proud to announce the Code2Design video system is finally up! Featuring 25 videos on HTML, PHP, AutoCAD, and more! Each video is either 640x480 or 800x600 and is avalible to download for private viewing. (Not everyone has DSL in their home.)

The Two videos I recomend the most are PHP Security and Resizing and Sending Images For Email.

PHP security is probably the most advanced video of it's type in the world. It is about 45min long and covers basic attacks like Globals, Includes, and Super Global arrays like $_SERVER and $_GET. More advanced subjects like SQL injection, CSFR, and XSS are covered later in the video. Each attack is not only discussed - but actually shown in action so you can easily follow along.


Submitted by David on September 10, 2008 - 3:58pm.
read more | David's blog | 2 comments

MD5, hashes, passwords, salts and more

1) You need to salt your passwords.

"Assume a user's secret key is stolen and he is known to use one of 200,000 English words as his password. The system uses a 32-bit salt (like md5). Because of this salt, the attacker's pre-calculated hashes are of no value. He/she must calculate the hash of each word with each of 2^32 (4,294,967,296) possible salts appended until a match is found. The total number of possible inputs can be obtained by multiplying the number of words in the dictionary with the number of possible salts:

2^{32} \times 200 000 = 8.58993459 \times 10^{14}

To complete a brute-force attack, the attacker must now compute about 800 trillion hashes, instead of only 200,000. Even though the password itself is known to be simple, the secret salt makes breaking the password radically more difficult." - http://en.wikipedia.org/wiki/Salt_(cryptography)


Submitted by David on April 8, 2008 - 8:04pm. |
read more | David's blog | 2 comments

Arrays by reference

I have been using lots of functions to create and check my variables and arrays lately. Along these lines, I thought I would take some time to share how the concept of "passing values by reference" works.

Basically, if you are anything like me you are always passing functions values and then having that function "return" a value. While there is nothing wrong with this approach, there is often an easier way to work with values in functions. Besides making values "global", you can also pass a function a value by reference.

Here is the standard way most people would work with a value in a function and then collect the functions return value.


Submitted by David on January 17, 2008 - 8:18pm.
read more | 2 comments

Convert MySQL Tables to SQLite Tables

If you are having trouble converting MySQL tables to SQLite tables then this tutorial is for you. On the other hand, if you have no idea what I just said then let me explain that both MySQL and SQLite are free, open source databases. While MySQL is the most used open source database in the world, SQLite is catching on as a great database for people who don't need a complex system to manage their data. I personally have been looking into it as a possibility for running my personal blog.


Submitted by David on December 13, 2007 - 8:36pm.
read more | 2 comments

Members-system (using My-Sql)

PHP and MySQL login-system

Here I will teach you how to create a really basic login-system for use in php and mysql. The system can easily be built on to work with flash and other applications.

I'll just start:

First you need a "data.php" file that looks like this:

<?php
 
$dbc 
mysql_connect("localhost","***username***","***password***"); mysql_select_db("***db_name***"); 
session_start();
?>

You also need a database with a table (registered) with fields that look like the SQL code below. (If you want, you can copy it into phpMyAdmin and it will create the table.)

CREATE TABLE `registered` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(64) NOT NULL,
`password` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;


Submitted by Alxandr on August 29, 2007 - 5:32pm.
read more | 10 comments

Javascript tooltips

Easy tooltips using javascript and html

Today I'm gone teach you how to create tooltips in HTML. First of all, you need to let the computer know that we are writing javascript - So start by typing:

<script language="javascript">

</script>;

Now that we have the container for the javascript we can now add the actual code for the tooltips. Paste this inside the script tags:


Submitted by Alxandr on June 2, 2007 - 5:51pm.
read more | add new comment

SELECT COUNT from database

I thought I would just take a minute to share this little code snippet with you as I had some trouble finding posts online that would tell me if I was going about this the right way! The problem is that I needed a fast way to count how many rows were in a database without using a CPU demanding function like mysql_num_rows().

<?php
$query 
'SELECT COUNT(*) FROM `users`';
$result mysql_query($query) or die('Sorry, we could not count the number of results: ' mysql_error());
$numberofresults mysql_result($result0);
?>

You can also limit the count to only rows that meet a certain value:

<?php
//Where the user id is greater than 149.
$query 'SELECT COUNT(*) FROM `your_table` WHERE `id` > 149';
$result mysql_query($query) or die('Sorry, we could not count the number of results: ' mysql_error());
$numberofresults mysql_result($result0);
?>


Submitted by David on May 14, 2007 - 12:16am.
read more | 3 comments

Free AutoDesk Inventor

AutoDesk is giving away free copies of its student programs like AutoDesk Inventor. If you are a student you need to take a minute to register for this great offer! (visit Student Autodesk)

As soon as my month-long fight with my computer-box is over (Curse you SATA, Cheap Video Cards, and ECS Mobos), I plan on releasing some Inventor tutorials and because it is a $4000 program (Full Version) this maybe your only chance to grab a copy!

Please note that you must be a student with a college email address(I think they also allow Highschool emails). Also, you will need a decent video card for this program as it is a 3D modeling program. (64MB video card should be fine - but I suggest a 128MB.)


Submitted by David on April 19, 2007 - 10:05pm. |
David's blog | 4 comments




Like what you see?

Why not add more? C2D is looking for other Christian Web Masters who would like to help write articles for this site. If you have expericance in FLASH, CSS/HTML, PHP/MySQL, PhotoShop/GIMP, Blender, Javascript, or just General Design - our users would love to hear what you have to say. Contact Us

delicious   digg   reddit   magnoliacom   newsvine   furl   google   yahoo   technorati