Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 13, 2012, 04:00:38 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
149700
Posts in
21103
Topics by
7538
Members
Latest Member:
ionline
WebsiteBaker Community Forum
English
Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
(Moderator:
Argos
)
How to include non-file variables in a droplet
Pages: [
1
]
Go Down
Author
Topic: How to include non-file variables in a droplet (Read 572 times)
webkitchen
Offline
Posts: 8
How to include non-file variables in a droplet
«
on:
May 29, 2010, 05:24:50 AM »
I am loving WB, but am not that good with PHP. There probably is a very easy way to do this:
I want to store some values in a hidden code section of a page and then retreive them as variables in a droplet.
So for example.
Code section of page contains
$name="xxx";
$address="yyy";
I want to run a droplet that uses these variables at the start of the droplet.
I know how to get the contents of the code section from the database but I want to do the equivalent of php 'include' using from the database (code section) contents.
Maybe someone can point me in the right direction.
Will I have to use serialize to retrieve and store the data and if so, can anyone give me a simple example.
Many thanks
Rodney
Logged
Ruud
Board member
WebsiteBaker Org e.V.
Offline
Posts: 2094
Re: How to include non-file variables in a droplet
«
Reply #1 on:
May 29, 2010, 11:14:46 PM »
You could use sessions..
in the code section use:
$_SESSION
[
'name'
] =
'xxx'
;
in your droplet use:
if(isset(
$_SESSION
[
'name'
])) {
$name
=
$_SESSION
[
'name'
]
}
Logged
Professional WebsiteBaker Developer
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...