Upon applying for a job, I was given a "tester". One of the questions was what does the php function ?header? do. I have not seen this syntax nor has it come up on any google search I've attempted. Could someone here please educate me on this item? Thanks

ok, sorry i just thought you went crazy with question marks.

i don't think there is such a function in php. if it existed, php.net would have documentation for it.


header is nothing but a php function its using to redirect from one page to another page

mysql_select_db("associates") or die("unable to select");
    if($_FILES['userfile']['size'] > 0)

            $file_dir = "photos";
            foreach($_FILES as $file_name => $file_array) 
            $fileName = $_FILES['userfile']['name'];
            $fileSize = $_FILES['userfile']['size'];
            $fileType = $_FILES['userfile']['type'];
            $tmpName  = $_FILES['userfile']['tmp_name'];
            $fileName = $empid.".jpg";
            if (is_uploaded_file($file_array['tmp_name'])) 
                    $test=move_uploaded_file($file_array['tmp_name'],"$file_dir/$fileName") or die ("Couldn't copy");

//echo "<img src='".$_SESSION['photopath']."'/>";
//echo "<a href='#' onclick='refreshParent()'>close</a>";

 $query = "UPDATE `jos_employee` SET name='$username', designation='$design', date_of_joining='$dofjoin', experience='$exp', contact='$contact', remarks='$remarks' ";
$query.= "photo_url ='$photo'";


$query.=" WHERE emp_id=$empid";


i think the aboe programme is usefull to you i think

Edited 3 Years Ago by Nick Evan: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.