Post to session varaibles issue

jamo
Posts: 19
Joined: 2011-01-10 18:59

Post to session varaibles issue

Post by jamo » 2011-01-10 19:13

Hi to all I see I'm not the only user of Interakt's great products left!
I'm having some trouble setting post variables to session variables using the last version of Kollection Pro and an update form.
I'm trying to catch the post variables used in the form before update and place the into corresponding session variables with code like this below ...

Code: Select all

$_SESSION['myvar']=$_POST['my_post_var'];
But no matter what I do the variables ar empty, are Interakt's scripts re naming the post variables? or is something else going on? when I set the variable with a static value everything works fine.

Any one help please?

Jimmy

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Post to session varaibles issue

Post by Fred » 2011-01-11 11:21

Hi Jimmy,
Yea interakt is alive and well. Where abouts in Ireland are you?

Back to your problem.
Do you have an active session on the page?
Add this at the start of your page and see if it makes a difference.

Code: Select all

session_start()
Next what you might want to try is move your code down to just above the block of code that process the transaction.

You can also add a bit of debugging code to see if you actually catch the post variable.
Something like

Code: Select all

if (isset ($_POST['my_post_var'])) {
echo $_POST['my_post_var'];
break;
} else {
echo 'Variable not set';
break;
That way you can at least test the functionality without having to complete the post process. It just breaks out of the page.

jamo
Posts: 19
Joined: 2011-01-10 18:59

Re: Post to session varaibles issue

Post by jamo » 2011-01-11 13:13

Hi Fred, I'm in the southeast of the country. I still build all my sites using Interakt's products for now I see little reason to change I just love the flexability it gives me to say "yes" to client requests without having the straightjacket of a one size fits all cms to tie my hands.
I was not a happy bunny when Adobe bought out Interakt I never went ADT either. Recently I was looking at Web Assists extensions but I read some bad press re support and the constant upgrade trail they put you on if you buy in so for now Interakt's offering is still my no.1 platform for building dynamic sites with a smattering of Wordpress here and there where it belongs.

To the problem, the site is an MXKart based site with a customised checkout, there was a prefill order details behaviour applied which was not working as intended this is now sorted and the session issue has been worked around though I cant figure what was wrong exactly.
The session was started and I could set the static variavles like $_SESSION['my_var']="red"; etc but it would not set the post variable values no matter what I tried. My conclusion was that they were being renamed by Interakt's scripts somewhere because I watched the live headers in Firefox and the names were as in the code.

Ps. thanks for the KTML4 Firefox fix from the downloads section 8-) Is there by any chance a Webkit fix? I was looking for an alternative to wswig editor but if there was a webkit fix there would be no need.

Nice meeting you.

Jimmy

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Post to session varaibles issue

Post by Fred » 2011-01-12 11:11

Glad you got it sorted.

I still agree with you it is great to be able to rapidly develop something for a client.

What I did was to create my own CMS that is easily expandable / customisable to fit a clients needs. Bottom line is all dynamic sites are the same. So having my own CMS as a standard starting point made sense to me. It is easily customisable and maintainable because I did the base code myself.

One upgrade to fix some security hole or php upgrade fits all...

On the KTML issues, I changed over to TinyMCE a while ago and it works perfectly and is easy to integrate. Lot less hassle and works on anything.

I will do a tutorial at some point.

jamo
Posts: 19
Joined: 2011-01-10 18:59

Re: Post to session varaibles issue

Post by jamo » 2011-01-12 11:32

Couldn't agree more Fred. I have done the same thing with MXKart, I never bought the MXShop package, anyway you always have to customise several parts of the checkout or admin to deliver on the clients wish list.

Funny I was looking at the same editor (TinyMCE) and was about to try and integrate it into an Interakt driven admin section until I used the fix available here for Firefox.

I have read of security issues with the MX e commerce products because they are now legacy software, however to date I have not heard about any issues from my ecomms clients.

Jimmy

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Post to session varaibles issue

Post by Fred » 2011-01-12 12:11

My biggest problem with FF and the likes was that periodically KTML would crash especially when switching to code view. The other problem was that the insert table procedure did not work properly in FF.

I found that my clients are a lot more happy with TinyMCE.

jamo
Posts: 19
Joined: 2011-01-10 18:59

Re: Post to session varaibles issue

Post by jamo » 2011-01-12 12:23

KTML editor failings were one of the main reasons I was looking at Web Assists offerings some time back. I resisted and was looking at a third party fix as we mentioned earlier.
There will come a point at which it will become unsustainable adding script fixes and mods to the Interakt framework in order to keep it hanging together, but that day is not here yet in my opinion.

I just wish the never sold out to big brother, victims of their own success I imagine, Im sure we would all do the same.

Jimmy

Post Reply