Forums

URGENT! - Displaying php variables on page2 'Message'

SwingeyP 26 Jan, 2021
Hi all,

I have the following code:
$stid = oci_parse($conn, 'select JOOMLAID, SITEID,SITENAME from LFT_SITEDETAILS where JOOMLAID =' .$ID);
oci_execute($stid);
while (($emp = oci_fetch_array($stid, OCI_BOTH)) != false) {
$Paul = $emp['SITENAME'];
$this->set("Thing", $Paul);
$Site_ID = $emp['SITEID'];
$this->set("referencesiteid", $Site_ID);
}

echo 'Site ID TOP ', $Site_ID;

Which reads back the SITEID form an oracle table. It works just fine and displays the site ID.
How can I assign Site_ID so it can be displayed on a 'page2' message action?

What I am trying to do is create a reference number when the user submits the form.

Max_admin 30 Jan, 2021
Answer
when you run this code you will be able to use {var:Thing} on the same page, if you want to save this variable to the next page then you need to store it in a session variable, use the Variables action for that!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.