background preloader

Database management in single PHP file

Introduction to Computer Programming - Applets BFOIT - Introduction to Computer Programming Welcome to BFOIT's Introduction to Computer Programming website. This is a short screencast overview of the first lesson: What is Computer Programming? Computer programming is composing/authoring of a process/procedure for doing something, BUT IN INCREDIBLE DETAIL. proc-ess / Noun: A series of actions or steps taken to achieve an end. pro-ce-dure / Noun: A series of actions conducted in a certain order or manner. In a more advanced world (science fiction today) it will be possible to teach the computer to do something by describing what it is that you want in your native language, English in my case. But, as of now, this is pretty much fantasy.

kriswallsmith/assetic - GitHub Logging processes with PHP Its sometimes necessary as a developer to log and track data as it is processed either to debug or to keep a simple record of maybe who’s logged in or out of your site. You could easily do this by accessing a MySQL database and adding a row, but you then have to create and maintain that database. So today I’m going to run through the steps to writing and reading a .txt log file. The Code In order to write and access our log file we will be using the php functions fopen() fwrite() and fclose(). find below the rules that can be passed to fopen(). NOTE: It’s important that the file permissions for the log file are set so our script can access and modify it. Running the function Below is a very simple example of how to call the function. $message = 'Posted to the database'; log_action($message); Reading our log file Above is an image example of the code below minus the row highlighting and thumbnails. Below is a quick method for displaying the contents of our log file.

Inclure jQuery de manière optimisée jQuery est un framework JavaScript très célèbre, permettant en quelques lignes de code de dynamiser un site web, de créer de petites animations, des interactions avec les formulaires, de programmer des appels Ajax. Voici, en détails, quelques possibilités d'intégration à votre site, afin de minimiser l'impact sur les performances et le temps de chargement. Appel classique à la librairie (fichier téléchargé) De la manière la plus basique, il est vous est proposé sur le site jQuery.com de télécharger le fichier - en affichant son code source - et de le placer sur votre site, par exemple dans jquery.js ou jquery-1.x.x.min.js. Fichier et compression Vous récupérerez ainsi une version "minifiée", c'est à dire compressée jusqu'à un certain niveau par un algorithme supprimant espace et commentaires, mais rendant peu lisible la déclaration des fonctions. Voyez les différences entre la version non minifiée et la version minifiée. Performances au chargement Vous obtiendrez ainsi : <! <! Démo

Introduction to Computer Programming - Preface These web-based notes are the result of classes that I have been involved with over the past few years. I started putting them together simply as notes for my students. From 1999 through 2002, I taught an Introduction to Programming class using the Java programming language to 6th through 8th grade students at Berkeley's Longfellow Arts & Technology Middle School. Starting in the summer of 2000, I volunteered to work with Brian Harvey, participating in the BFOIT Introduction to Computer Science program. The Longfellow Java class was held on Saturday mornings, from 9:00am to 11:00am. The BFOIT class started out as a single week, with Introduction to Programming taught every morning from 9:00 to 12:00. In the summer of 2001, BFOIT was extended to two weeks. For the summer of 2002, I combined the Turtle Graphics commands available in Logo with the Java programming language. For the 2004 BFOIT class the web notes were expanded to cover a wider variety of computer science topics.

Home | x:template a professional PHP template engine Email Injection | damonkohler Not so long ago, I ran a wiki called SecurePHP. On that wiki, there was one particular article about email injection that received a lot of attention. Naturally, with all the attention came lots of spam. As a result, I disabled editing of the wiki and content stagnated. Still, the email injection article remained popular. About a year later, the server that hosted SecurePHP died and I never had a chance to hook it all back up. The PHP mail() Function There are a lot of ways to send anonymous emails, some use it to mass mail, some use it to spoof identity, and some (a few) use it to send email anonymously. Function usage: mail([RECIPIENT],[SUBJECT],[MESSAGE],[EXTRAHEADERS], [EXTRAPARAMS]); (mail()) Extra params are not commonly fed from user input, so we'll skip this part. Example 1 Here's an example of code we'll base our analysis on: When looking at the HTML form or at the code, it seems obvious one cannot choose the recipient email address as it is hardcoded in the script. Example 2 Regex

Loader Developer's Guide - Google Loader Google API loader allows you to easily import one or more APIs, and specify additional settings (such as language, location, API version, etc.) applicable to your needs. In addition to the basic loader functionality, savvy developers can also use dynamic loading or auto-loading to enhance the performance of your application. To load the APIs, include the following script in the header of your web page. After you call google.load, you can use all of the loaded modules in your web page. For specific examples of each API, visit the code playground or the documentation specific to the desired API(s) (see links in the left navigation). The loader is cached in the user's browser for up to one hour. google.load(moduleName, moduleVersion, optionalSettings), allows you to call individual APIs by version, where: moduleName is the name of the API (e.g., "visualization" or "search").version specifies the version of the API module, as described below. Versioning The usage model Google encourages is:

Free Java tutorials from the Java Coffee Break Here are all our tutorials on Java programming. If you can't find what you're looking for, also try our articles section, which typically deals with more advanced topics Getting Started with Java (A Beginner's Guide) Get Swinging! Visual J++ Users If you wish to use any source code from the tutorials in your projects, you'll need to import the files into your project first. Borland JBuilder Borland JBuilder should work with all these tutorials, but you'll need to import the files into your project first. Introduction to JBuilder Lesson One Learn how to create projects, add classes, compile and run applications. Introduction to JBuilder Lesson Two Write a small applet, and learn how to write a HTML page to display an applet. Java 101 - An introduction to Java This free tutorial series teaches the basics of Java programming. Java 101 : Hello World offers an introduction to Java, one of the hottest programming languages today. Intermediate Tutorials

Related: