| | |
Unfamiliar syntax
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
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.
•
•
Join Date: Nov 2008
Posts: 11
Reputation:
Solved Threads: 1
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
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
![]() |
Similar Threads
- Dummy Question (Python)
- Readme (DaniWeb Community Feedback)
- Regular Expressions (C#)
- more syntax questions (Java)
- unfamiliar syntax (Java)
- Simple question (Python)
- YaBasic: The beginners choice (Computer Science)
Other Threads in the PHP Forum
- Previous Thread: PHP WebDAV for Microsoft Exchange Server
- Next Thread: uploading to ftp server my directory hae some problom
| Thread Tools | Search this Thread |
.htaccess apache api array autocomplete beginner binary body broken cakephp class cms code convert cron curl database dataentry date date/time display duplicates dynamic ebooks email emptydisplayvalue error execute explodefunction file firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include ip javasciptvalidation javascript joomla keywords limit link login mail matching mediawiki menu methods multiple mycodeisbad mysql network number object oop paypal pdf php phpincludeissue query random recursive redirect remote script search securephp server sessions shot source sp space speed sql subdomain subscription system table tag tutorial tutorials upload url validator variable vbulletin video web white youtube






