Skip to content
pontikis.net
  • Blog
  • Labs
  • Write For Us
  • About
Search for:
Menu Close

webdev

  1. Home>
  2. Blog>
  3. webdev
Sanitize User Input Text with PHP
Credits

Sanitize User Input Text with PHP

  • Post author:Christos Pontikis
  • Post published:April 12, 2015
  • Post category:Web Development
  • Reading time:1 mins read

When you prompt user to input text (e.g. username, lastname etc), you may use Regular expressions to sanitize User Input, for example: allow space, any unicode letter if(preg_match("/[^\040\pL]/u", $term)) {…

Continue Reading Sanitize User Input Text with PHP
Get basename and file extension with PHP or Javascript
Credits

Get basename and file extension with PHP or Javascript

  • Post author:Christos Pontikis
  • Post published:August 6, 2014
  • Post category:Web Development
  • Reading time:2 mins read

Getting file extension and basename is a common development task. PHP internal function pathinfo is very useful. But, Windows paths will not work correctly on Linux servers and vice versa.…

Continue Reading Get basename and file extension with PHP or Javascript
How to Create, Read, Update and Delete Cookies with PHP or Javascript
Irrational Cookies

How to Create, Read, Update and Delete Cookies with PHP or Javascript

  • Post author:Christos Pontikis
  • Post published:January 4, 2014
  • Post category:Web Development
  • Reading time:6 mins read

http is a stateless protocol. A way to remember information from page to page is to use cookies. According to Wikipedia: A cookie, also known as an HTTP cookie, web…

Continue Reading How to Create, Read, Update and Delete Cookies with PHP or Javascript
How to check if a Request is AJAX call with PHP
Credits

How to check if a Request is AJAX call with PHP

  • Post author:Christos Pontikis
  • Post published:December 9, 2013
  • Post category:Web Development
  • Reading time:1 mins read

It is useful to prevent direct access of AJAX calls (from browser address bar). A solution could be the following simple function check_is_ajax(): /** * Check if request is an…

Continue Reading How to check if a Request is AJAX call with PHP
PHP and Javascript Internationalization using Gettext and Poedit
Credits

PHP and Javascript Internationalization using Gettext and Poedit

  • Post author:Christos Pontikis
  • Post published:November 19, 2013
  • Post category:Web Development
  • Reading time:8 mins read

The term "localization" is used as a synonym of "internationalization", which is the most proper term. Sometimes, internationalization is shortened to "i18N" (meaning "i - eighteen letters -n"). gettext is…

Continue Reading PHP and Javascript Internationalization using Gettext and Poedit
  • 1
  • 2
  • 3
  • 4
  • …
  • 6
  • Go to the next page

Categories

Archives

NewsLetter

Click here to subscribe to our free email newsletter.
Unsubscribe anytime with a click.

LIKE OUR PAGE!

  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Opens in a new tab
  • Contact
  • Privacy
  • Terms
  • Credits
© Christos Pontikis 2013 - 2021
Close Menu