Tuesday, February 3, 2009

PHP Main Development Sites

PHP: Hypertext Preprocessor Home Page
PHP is a server-side HTML embedded scripting language. It provides web developers with a full suite of tools for building dynamic websites: native APIs to Apache and other web servers; easy access to MySQL, Sybase, Oracle, and other databases; IMAP; LDAP; HTTP headers and cookies. This site is the official home of PHP4.
Zend
A bottom-up rewrite of the PHP scripting engine. It features a modular architecture, vastly improved performance, and greater scalability.
International PHP Magazine
Web-based magazine for Web professionals focused on PHP based development. News, online articles, book reviews, forum.
Quality Assurance Team
Voulonteer coders dedicated to providing coders with quality assurance.
Codewalkers
A community site dedicated to PHP and SQL. Includes user submitted code, tutorials and forums.
PHP Freaks
A community designed to assist developers with PHP and MySQL related information. Includes tips, tutorials, forums, articles, code examples and manuals.
PHP Everywhere
Articles on PHP on Windows and Linux. Also compares PHP to ASP, Cold Fusion and Perl.
PHP News by CodingTheWeb.com
PHP development news, tutorials, technical articles and HOWTOs. This is the definitive news source for PHP. Updated hourly.
PHPMac.com
A site dedicated to PHP programmers that use the Mac OS. In particular Apple's new OS X unix system.
Devshed - Searching with PHP and ht://Dig
Adds search capabilities to site using the popular open source tools PHP3 and ht://Dig.
Wrox Resource Center
PHP support and resource forums run by programmers for programmers, provided by Wrox Press.
Core PHP Programming
Home page for the first book about PHP
Club of the Developers
This is a site of programmer's group united by a desire to develop PHP technologies in Internet.
ThePHPGuy
PHP, MySQL and Apache articles, tutorials, guides. Also features daily updated developer news as well as a monthly developer newsletter packed with PHP programming tips and tricks.

What is PHP ?

What is PHP ?
PHP is a server-side scripting language for creating dynamic Web pages. PHP's programming syntax is very similar to that of Perl. Because of its elegant design, PHP makes it easy for anyone to learn. It is significantly easier than comparable Perl or ASP Code. Unlike other scripting languages, PHP supports the most common databases like Oracle, Sybase and MySQL. It is also possible to integrate external libraries to generate PDF documents or parsing XML PHP is an open-source language and is supported by a large groups of delvelopers. The code is downloadable from php.net.

how can we insert data into a table

1. INSERT INTO `tutorial_users` (
2.
3. `id` ,
4.
5. `username` ,
6.
7. `admin`
8.
9. )
10.
11. VALUES (
12.
13. NULL , 'Stewie', '0'
14.
15. ), (
16.
17. NULL , 'Peter', '0'
18.
19. ), (
20.
21. NULL , 'Brian', '0'
22.
23. ), (
24.
25. NULL , 'Meg', '0'
26.
27. ), (
28.
29. NULL , 'Lois', '0'
30.
31. ), (
32.
33. NULL , 'Chris', '0'
34.
35. ), (
36.
37. NULL , 'Greased Up Deaf Guy', '0'
38.
39. ), (
40.
41. NULL , 'Quagmire', '0'
42.
43. );

free sql code

# $sql = "SELECT id,username,admin FROM tutorial_users ORDER by id ASC";
# $result = mysql_query($sql) or trigger_error(mysql_error(),E_USER_ERROR);
# while(list($id,$username,$admin)=mysql_fetch_row($result)){
# $checked = ($admin==1) ? 'checked="checked"' : '';
# echo '
# '."\n";}
# ?>

use of checkbox


Selection one

Selection two

Selection three

Selection four

Selection five

Selection six

Selection seven



if(!isset($_POST)) exit();
$selections = (isset($_POST['selection']))?$_POST['selection']:NULL;
$count = count($selections);
if($count > 5 ¦¦ $count < 1) { //checks to see if they selected more than 5
echo 'Danger Will Robinson!';
exit();
}
$query = 'INSERT INTO table (attribute1,attribute2,attribute3,attribute4,attribute5) valueS (';
$add = "'".implode("','",$selections)."'";
for($i = 0; $i < 5-$count; $i++) {
$add .= ",NULL";
}
$query .= $add.')';
echo $query;
?>