thomas2340
Posts: 55
|
Posted: 07/14/2012, 9:27 PM |
|
Hi,
after pressing submit in a record form the form is empty for a new record, is it possible to get the last record shown after submitting ?
i tried this in the after insert event but it doesnt work:
global $last_kontakt_id;
$last_kontakt_id = mysql_insert_id();
header("Location: " . $FileName."?". CCAddParam(CCGetQueryString("QueryString", ""), "kontakt_id", 0) );
thanks for your answers.
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 07/15/2012, 3:18 AM |
|
In the after execute insert event: declare variable-
Name: last_kontakt_id
Initial Value: mysql_insert_id
Then in the after insert event: declare variable-
Name: last_kontakt_id
Initial Value: $last_kontakt_id
Then in the after insert event: custom code-
global $Redirect;
$Redirect = "pagename.php" . "?last_kontakt_id=" . $last_kontakt_id;
_________________
Central Coast, NSW, Australia.
|
|
|
DataDoIT
|
Posted: 07/15/2012, 8:30 AM |
|
What MM says. For more detailed explanation and usage: http://www.codechargesupport.com/blog/index.php?action=More&post_id=2
|
|
|
|