CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Session Variable

Print topic Send  topic

Author Message
skysigma

Posts: 24
Posted: 01/02/2011, 2:21 PM

Hi

I'm developing a activation page by which the user actives his/her account. This page is reacheable only by clicking a link on the confirmation email.
The parameters passed throught link are :
- id_user
- email
- password

In this activation page, the user, after having provided a few additional information (included on the USER table), is redirected to his/her home page.
The problem is that the home page works with session variable and I'm not in condition to set the session variable on the actication page.
I tried putting the following costume code on AFTER UPDATE or AFTER EXECUTION UPDATE:

global $DBConnection1;
$SQL = "SELECT LAST_UPDATE_ID() FROM user";
$DBConnection1->query($SQL);
if ($DBConnection1->next_record()) {
CCSetSession("Last_update_ID",$DBConnection1->f(0));
}
$DBConnection1->close();
$Last_update_ID = CCGetSession("Last_update_ID");
echo $Last_update_ID;
exit;

But in this way the link to the home page doesn't work.

I also tried adding Dlookup Action in AFTER UPDATE:

Expression: 'last_update_id()'
Domain: ''
Criteria: ''
Connection: Connection1
Type of traget: Session
Target: SesVar

And Declare Variable

Name: Redirect
Type: Text
Initial Value: "Home.php?user_id=".$SesVar

But on the URL I see user_id=0

Does anybody know how to solve this issue?
Thanks for your support

Marco
View profile  Send private message
waspman2

Posts: 1
Posted: 01/03/2011, 6:18 AM

when the user registers create a unique id for the account. it's that you add to the return link. when they come back use the id to find the users original registration record. simply set a field in the record to yes to confirm when they return with a custom script or ask them to add more information etc.
View profile  Send private message
damian

Posts: 838
Posted: 01/22/2011, 5:24 AM

i use a timestamp + userid as it is much harder to guess and hijack...
i change group membership to new value after activation or have an activation field in user table..
then after successful activation return user to login page so they can login with activated account details and have the login page return them somewhere restricted to the logged in users.

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
Waspman

Posts: 948
Posted: 01/22/2011, 7:14 AM

So you're sorted then? - Put resolved in the title
_________________
http://www.waspmedia.co.uk
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.