CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 empty record form after submit

Print topic Send  topic

Author Message
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.
View profile  Send private message
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.

View profile  Send private message
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

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.