|
rjks 8/12/2006 |
Hi Lori, function AfterAdd()
|
J
|
Jane 8/15/2006 |
Lori, |
![]() |
paperhog author 8/23/2006 |
Ok this part worked - Thanks a BUNCH global $conn;
|
J
|
Jane 8/24/2006 |
Lori, |
![]() |
paperhog author 8/27/2006 |
Lori, what event you use?
|
J
|
Jane 8/28/2006 |
Lori, global $conn; $strSQLExists = "select from _print_req_details where print_id='print_id'"; $rsExists = db_query($strSQLExists,$conn); $data=db_fetch_array($rsExists); if($data) { // if record exists do something $str1 = "select from _print_req_details where print_id='print_id'"; $rs1 = db_query($str1,$conn); $data1 = db_fetch_numarray($rs1); // to save field value use $_SESSION["value"] variable $_SESSION["value1"] = $data1["FieldName"]; // header("Location: _print_req_details_edit.php?editid=".$data["PrimeryField"]); exit(); } else { // if dont exist do something else $str2 = "select LAST_INSERT_ID() from printing_req"; $rs2 = db_query($str2,$conn); $data2 = db_fetch_numarray($rs2); // to save field value use $_SESSION["value"] variable $_SESSION["value2"] = $data2["FieldName"]; // header("Location: _print_req_details_add.php"); exit();
|
|
spettinato 2/5/2007 |
*** function BeforeAdd(&$values) { // Parameters: // $values - Array object. // Each field on the Add form represented as 'Field name'-'Field value' pair
|
J
|
Jane 2/6/2007 |
Hi, echo "id - ".$values["id"]." echo "name - ".$values["name"]." "; echo "email - ".$values["email"];
|
|
spettinato 2/6/2007 |
Hi, you can do it using the following code: where id, name and emauk are your actual field names.
|
|
spettinato 2/6/2007 |
Ok i solved putting the code in "before record added" event. But now, i want to pass an id to another page. So i think i should insert something in "after record added" events. How can i? Tanx. |
J
|
Jane 2/6/2007 |
To pass one of the field value to another page use $_SESSION variable. $_SESSION["FieldName"]= $values["FieldName"];
|
|
spettinato 2/6/2007 |
I post my solution. function AfterAdd()
echo $_SESSION["id_questionario"];
|