This topic is locked

Refresh Detail View After Insert

4/9/2013 2:34:45 AM
PHPRunner General questions
S
SimonMueller author

Hello,

is it possible to refresh a detail table after inserting a new record.

Currently it will show the newly added record but neither the edit button nor detail links are displayed for this one record.

If I close the detail view and open it again the buttons and detail links are displayed correctly.
I use the current build 15275.
Simon

R
Rigmantas 4/23/2013

Hi,

Found someone a solution?

This need after inline multiple records added, when using checkbox list.

///////////// This from phprunner help is for add page but not for inline add page

global $conn;

if ($values["fieldname"])

{

$arr = explode(",",$values["fieldname"]);

// This is the name of the multi check box or

// list select field, its value becomes $arr

for ($i=0;$i<count($arr);$i++)

{

$strInsert = "insert into TableName (field) values ('".$arr[$i]."')";

// add more fields from the add page to be inserted into database

db_exec($strInsert,$conn);

}

header("Location: MyPage_list.php");

// Exit and Redirect to the list page after updating database

exit();



}

///////////////////

Best regards

Rimantas