Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Ajax file upload tutorial

Step 1 - AJAX file uploadAJAX file upload tutorialFirst of all I have to say that to create a pure AJAX file upload system is not possible because of security limitations of JavaScript. All of the Ajax upload systems I know use some third party tool/package or only mimics the AJAX feeling. Even so it makes file upload process a bit nicer. In the next section I will present you a solution which imitates the AJAX process, but uses a normal upload process and iFrames.The concept: Create a simple HTML form for file uploadSet the target to an iFrame which is on the actual page but not visibleC...

6,682 0       PHP AJAX TUTORIAL FILE UPLOAD IFRAME


  Optional arguments in PHP function

In PHP, we can define our own functions which can accept optional number of arguments. In this kind of functions, the optional argument should be set with default value.Fox example, the next code example will illustrate this:<?php function func($name,$type=NULL) { echo "$name $type"; } func("Hello"); echo "<br />"; func("Hello","world"); echo "<br />";?>Here $type is an optional argument. It must be set with a default value either NULL or some other value. Quite simple.Right! In other programming languages, we can achieve similar effects. This is very convenient if we...

4,504 0       PHP OPTIONAL ARGUMENTS USER DEFINED FUNC


  SSL in PHP for WAMP

Sometimes when we need to use email service provided by WAMP, we need to use some remote mail server such as Gmail. In Gmail, if we want to use the SMTP server to send email and want to use port 465, then the SSL connection should be setup. But by default in WAMP, the ssl is not usable. So to allow use SSL, what we should do is go to system tray and click PHP->PHP Extensions->php_openssl. Then now you can use Gmail to send email easily....

45,656 1       PHP EMAIL GMAIL SSL WAMP SMTP


  Square bracket in checkbox name

0down votefavoritei have a form with checkboxes like this:    <input type=\"checkbox\" name=\"type[]\" value=\"1\" />Fast Food<br>    <input type=\"checkbox\" name=\"type[]\" value=\"2\" />Table Service<br>    <input type=\"checkbox\" name=\"type[]\" value=\"3\" />Cafeteria<br>when i use the brackets in the name (type[]), my php works:    $type=$_POST[\'type\'];    echo \"types are:\";for ( $counter = 0; $counter < sizeof($type); $counter += 1) {    echo \"<br>\".$type[$counter];}but my jav...

5,561 0       PHP SQUARE BRACKET JAVASCRIPT ARRAY OF N