Unfamiliar syntax

Reply

Join Date: Nov 2007
Posts: 23
Reputation: scottholmes is an unknown quantity at this point 
Solved Threads: 0
scottholmes scottholmes is offline Offline
Newbie Poster

Unfamiliar syntax

 
0
  #1
Nov 20th, 2008
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
Scott Holmes
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: Unfamiliar syntax

 
0
  #2
Nov 20th, 2008
it sends raw HTTP headers.

A nice Google Search will give you all you need.

remember, php.net has almost everything.

also, here is more info on headers http://www.faqs.org/rfcs/rfc2616
Last edited by kkeith29; Nov 20th, 2008 at 12:21 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 23
Reputation: scottholmes is an unknown quantity at this point 
Solved Threads: 0
scottholmes scottholmes is offline Offline
Newbie Poster

Re: Unfamiliar syntax

 
0
  #3
Nov 20th, 2008
I know what header() does, I don't know what ?header? does.
Scott Holmes
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: Unfamiliar syntax

 
0
  #4
Nov 20th, 2008
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.
Last edited by kkeith29; Nov 20th, 2008 at 5:26 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 11
Reputation: punjabivirsa3 is an unknown quantity at this point 
Solved Threads: 1
punjabivirsa3 punjabivirsa3 is offline Offline
Newbie Poster

Re: Unfamiliar syntax

 
0
  #5
Nov 21st, 2008
hey

header is nothing but a php function its using to redirect from one page to another page <?php
mysql_connect("localhost","root","rootwdp");
mysql_select_db("associates") or die("unable to select");
if(isset($_POST["update"]))
{
$empid=$_POST['empid'];
$username=$_POST['uname'];
$dofjoin=$_POST['date'];
$design=$_POST['design'];
$exp=$_POST['exp'];
$contact=$_POST['contact'];
$pname=$_POST['pname'];
$photo=$_POST['userfile'];
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'];
$file_array;
$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");
}
}
if(@$test)
{

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

$remarks=$_POST['remarks'];
$query = "UPDATE `jos_employee` SET name='$username', designation='$design', date_of_joining='$dofjoin', experience='$exp', contact='$contact', remarks='$remarks' ";
if($test)
{
$query.= "photo_url ='$photo'";
}
else
{

}

$query.=" WHERE emp_id=$empid";
$run=mysql_query($query);
//header("Location:index.php?option=com_testingofupdatedelete&page=$currpage");
header("Location:index.php?option=com_completedetailsofassociate");

}?>
i think the aboe programme is usefull to you i think
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC