Markie
Posts: 251
|
| Posted: 12/24/2008, 2:34 AM |
|
I have made a small php file with notepad, just a few lines of code.
Is it possible to show CCS variables with this php file during a session ?
For example, my php file contains:
<?php
echo "hallo $username";
?>
in the browser, I would like to show the username of the user who is logged in with the CCS login form.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
Markie
Posts: 251
|
| Posted: 12/24/2008, 3:46 AM |
|
Wow, this was simple and I have solved it myself!
my php code:
<?php
//Include Common Files @1-82042FB9
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "index.php");
include_once(RelativePath . "/Common.php");
include_once(RelativePath . "/Template.php");
include_once(RelativePath . "/Sorter.php");
include_once(RelativePath . "/Navigator.php");
//End Include Common Files
$username = CCGetUserLogin();
echo $username
?>
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 12/24/2008, 3:46 AM |
|
Hi Markie
Not sure I understand what you are trying to do.
Of course you can echo any ccs variable in a php file.
Not sure what your implementation issues are here?
This example php file you have here is exacuted from where? Within a ccs script or just stand alone on the fly?
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
Markie
Posts: 251
|
| Posted: 12/24/2008, 3:47 AM |
|
Hi John, thanks for your reply
as you can see, my problem is solved
Merry Christmas, my friend
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
datadoit
|
| Posted: 12/24/2008, 2:55 PM |
|
or:
$username = $_SESSION['UserLogin'];
|
|
|
 |
asawyer13
Posts: 46
|
| Posted: 12/27/2008, 7:20 PM |
|
datadoit,
Does CCS automatically set up certain Session variables, or is this something you did yourself?
I was trying to find a list of ones that are created, but didn't see anything.
Alan
|
 |
 |
damian
Posts: 838
|
| Posted: 12/27/2008, 7:24 PM |
|
The following are all default session variables created by CodeCharge Studio:
UserID - the primary key field value of the logged in user
UserLogin - login name of the user currently logged into the system
GroupID - security level/group of the user currently logged into the system
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
|