if (($code == $securitycode) && (strlen($code) > 4)) {
echo 'code is good';
}
so the session is $_SESSION['code']
Thanks
Well that's a (__!__) i thought i may get some one that knows about this :(
Well it now looks like i will have to pull it all out and forget about it :chomp:
Well that's a (__!__) i thought i may get some one that knows about this :(
Well it now looks like i will have to pull it all out and forget about it :chomp:
I just got it working ... now my framework might be different then yours but as long as you have the $_SESSION['MyVar'] = 'something'; stored, you will just need to use the session_start() and then $something = $_SESSION['MyVar'] in your scripted called by AJAX.
I use AJAX in much the same way I use roll overs ... it's a small script included at the top of my page that just swaps the content of an ID w/ a PHP script results. I haven't gotten deep into the forms side of things which I feel is where AJAX really excels. In fact w/ all the issues I'm seeing w/ PHP and AJAX I'm not really sure I want to change my whole architecture. AJAX doesn't play well w/ PHP OO, in my opinion. i personally like to write all my own code so using plug ins like XOAD are cool but not my style. I'm looking into XOAD now to see if it is something I really want to get into, but like I said it's a major change from a pure PHP site. My biggest Issue is how calling PHP scripts in AJAX works ... I store commonly used site configuration info in a single array, connection to DBs have to happen on each script call, that requires passing of connection info, decentralizing my connection scripts to each php script that talks to the DB, and if you have more then one DB you're talking to it becomes a nightmare. I have ZENDCORE running on an IBM system i and connect to DB2 and MySQL. I'm in the process of looking how to integrate AJAX into that mix.
I've been thinking lately of proposing the Question to other programmers to see if they really think AJAX is worth the fight w/ PHP ... I'm just not sure.
Here is some code that may help .. "echo"'s are included for debuging.
This is loaded in a PHP function script included at the top of my main script.