This topic is locked
[SOLVED]

 Display last record entered

10/17/2013 1:37:12 PM
PHPRunner General questions
Graphix author

Hi all

This is my first post ☺️ whilst I know MySQL/SQL quite well I'm a total noob with PHP!

I purchased phprunner a couple of days ago and I'm loving it 😉 I have created my first

Application complete with charts, I do have an issue though when I add a new record I would

Like the last record entered displayed underneath the form whilst I know how to do this

With a MySQL query I have no idea how to display it on a php form 😳

Can anyone help me please?

Sergey Kornilov admin 10/17/2013

A few ideas of how you can make it work.

  1. Use AfterAdd event to save entered values in session variables. Example can be found at http://xlinesoft.com/phprunner/docs/speed_up_data_entry_using_events.htm

$_SESSION["Date"] = $values["Date"];

$_SESSION["Employee"] = $values["Employee"];


2. Add a 'PHP code snippet' to the Add page where you want to display the previous record.
Use something like this in that code snippet:

if ($_SESSION["Date"])

echo "Date: ".$_SESSION["Date"];

if ($_SESSION["Employee"])

echo "Employee: ".$_SESSION["Employee"];
Graphix author 10/18/2013



A few ideas of how you can make it work.

  1. Use AfterAdd event to save entered values in session variables. Example can be found at http://xlinesoft.com/phprunner/docs/speed_up_data_entry_using_events.htm

$_SESSION["Date"] = $values["Date"];

$_SESSION["Employee"] = $values["Employee"];


2. Add a 'PHP code snippet' to the Add page where you want to display the previous record.
Use something like this in that code snippet:

if ($_SESSION["Date"])

echo "Date: ".$_SESSION["Date"];

if ($_SESSION["Employee"])

echo "Employee: ".$_SESSION["Employee"];




Thank you that worked very well <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=72427&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> just bought a PHP manual LOL