background preloader

Csaw programming ressources

Facebook Twitter

AJAX Introduction. AJAXForms - Home. Code Snippets. Disabling Magic Quotes. DIV/SPAN. This can be used to create the coolest effects in a website.

DIV/SPAN

Thats the good news. The bad news is that each browser appears to have its unique way of handling these tags. So what appears to be an extremely cool effect in your favorite browser will appear to be something very similar to green goo on other browsers. DOMDocument, whitespace, PHP. The DOMDocument is a convenient way of manipulating an XML file.

DOMDocument, whitespace, PHP

While this is for PHP, I’ve come across some great parsers for use on a business iphone using lib2xml but we leave that for another day. One issue I ran into was the fact that when loading an XML file, DOMDocument treats the tabs and spaces which make the XML readable as empty text nodes. This presents a problem when you try and traverse the DOM by using attributes like firstChild and nextChild. For example: Here is the XML file, “example.xml”: EasyFileBrowse - Create your own sortable folder index. You are seeing this very light version of the page, as you are using an outdated browser!

EasyFileBrowse - Create your own sortable folder index.

Onlinetools.org is done in XHTML 1.0 and supports CSS 2.0, please upgrade your browser if you want a better version of this site. Thank you, please help us developers keep up with the industry rather than patching our code for outdated applications. Enhance your input fields with simple CSS tricks. We're all trying to build an effective and good looking web forms.

Enhance your input fields with simple CSS tricks

But there are always a new challenges. If you read my previous articles on how to build a better web forms, you could have noticed there are so many details. Label positioning, context highlighting or justifying elements. File Upload. A very useful aspect of PHP is its ability to manage file uploads to your server. Allowing users to upload a file to your server opens a whole can of worms, so please be careful when enabling file uploads. Before you can use PHP to manage your uploads, you must first build an HTML form that lets users select a file to upload. See our HTML Form lesson for a more in-depth look at forms.

HTML Code: <form enctype="multipart/form-data" action="uploader.php" method="POST"><input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /><input type="submit" value="Upload File" /></form> Filesystem. Glob. Since I feel this is rather vague and non-helpful, I thought I'd make a post detailing the mechanics of the glob regex. glob uses two special symbols that act like sort of a blend between a meta-character and a quantifier.

glob

These two characters are the * and ? Haz.io › HTML5 & CSS3 Browser Capabilities. Here is a simple popup contact form (modal popup) A popup contact form has many benefits.

Here is a simple popup contact form (modal popup)

You can add a button/link in every page that pops up the contact form in a modal popup. That makes the contact form easily accessible from any part of the website. Your web site visitors do not have to ‘hunt’ for the ‘contact us’ page. Download the popup contact form code. How to upload files to remote server with PHP cURL. HTML - Instant search in HTML and other developer documentation. Html - Javascript to figure out which button was pressed. JavaScript DOM - Date. Load XML file into PHP from a link. Managing Sessions and State with PHP.

By Brian Fioca 05/18/2006 MVC Frameworks, such as WASP, provide a solid jumping-off point for entry-level programmers to produce strong, well-formed code.

Managing Sessions and State with PHP

The framework simplifies such things as creating a page (using a kind of page object) and creating or searching for data (using database table objects). Paste Word Count. Pathinfo. Php - Select random file from directory. PHP Sending Whitespace After Headers? Jan 7, 2011 Having a strange issue with the email class in codeigniter.

PHP Sending Whitespace After Headers?

When I send email directly to my gmail account email address, it works fine. However if I send email to a different email address and use POP3 to import that email address into gmail, then for some reason all the headers are included in the message. Here's the code for sending the email: $this->email->clear();$config['mailtype'] = "html";$this->email->initialize($config);$this->email->set_newline("");$this->email->from('url', 'Website');$this->email->to('url');$this->email->message($message); PHP Example AJAX and XML. PHP XML Date Problem - PHP. Reading and writing the XML DOM with PHP. Reading and writing Extensible Markup Language (XML) in PHP may seem a little frightening.

Reading and writing the XML DOM with PHP

In fact, XML and all its related technologies can be intimidating. However, reading and writing XML in PHP doesn't have to be a daunting task. First, you need to learn a little about XML -- what it is and what it's used for. Then, you need to learn how to read and write XML in PHP, which you can do in many ways. Removing whitespace from a string? Str_replace. Strip some but not all whitespace - PHPBuilder.com.

Upload file with php and save path to sql. Upload php check the file name duplicat - php. XML2OWL demonstration platform.