devinemke wrote:what is the problem? be specific.
Well, I'm wondering where exactly in this code to place the mail function, and how to phrase it (this IS the newbies forum!):
<?
include("conn.php");
$mode=$_GET["mode"];
if($mode=="add") {
$region=$_POST["region"];
$status=$_POST["status"];
$location = $_POST['location'];
$office = $_POST['office'];
$title = $_POST['title'];
$domain = $_POST['domain'];
$devices = $_POST['devices'];
$risk = $_POST['risk'];
$line = $_POST['line'];
$originator = $_POST['originator'];
$owner = $_POST['owner'];
$segment = $_POST['segment'];
$origtarget = $_POST['origtarget'];
$currtarget = $_POST['currtarget'];
$milestone = $_POST['milestone'];
$lastupdate = $_POST['lastupdate'];
$details = $_POST['details'];
$date = $_POST['date'];
$date = $_POST['description'];
$sql="insert into $branch(region,status,location,office,title,domain,devices,risk,line,originato r,owner,segment,origtarget,currtarget,milestone,lastupdate,details,date,descri ption) values('$region','$status', '$location', '$office', '$title', '$domain', '$devices', '$risk', '$line', '$originator', '$owner','$segment', '$origtarget', '$currtarget', '$milestone', '$lastupdate','$details', '$date','$description')";
$result=mysql_query($sql,$connection) or die(mysql_error());
header("location: index.php");
} elseif($mode=="update") {
$region=$_POST["region"];
$status=$_POST["status"];
$location = $_POST['location'];
$office = $_POST['office'];
$title = $_POST['title'];
$domain = $_POST['domain'];
$devices = $_POST['devices'];
$risk = $_POST['risk'];
$line = $_POST['line'];
$originator = $_POST['originator'];
$owner = $_POST['owner'];
$segment = $_POST['segment'];
$origtarget = $_POST['origtarget'];
$currtarget = $_POST['currtarget'];
$milestone = $_POST['milestone'];
$lastupdate = $_POST['lastupdate'];
$details = $_POST['details'];
$date = $_POST['date'];
$description = $_POST['description'];
$id=$_POST["id"];
$sql="update $branch set region='$region',status='$status',location='$location',office='$office',title= '$title',domain='$domain',devices='$devices',risk='$risk',line='$line',origina tor='$originator',owner='$owner',segment='$segment',origtarget='$origtarget',c urrtarget='$currtarget',milestone='$milestone',lastupdate='$lastupdate',detail s='$details',date='$date',description='$description' where id='$id'";
//echo $sql;
$result=mysql_query($sql,$connection) or die(mysql_error());
header("location: index.php");
}
?>