This topic is locked
[SOLVED]

 neeed help with email verification & different homepages

1/16/2007 6:34:37 AM
PHPRunner General questions
D
datapimp author

I've been stuck on 2 problems which I'm hoping I could get some help on.
First I want to direct different user's type to a different page after they have logged on successfully. Example if a customer logged on they would go to a customer homepage, a wholesaler to a different homepage and a dealer to another home page. The user type is defined in one SQL accounts table.
My other question / problem is when I'm getting customers to register a new account I want to add some sort of email verification scrip so after they register, an email is send to them to activate there account. So they can't login till they have done this. Also I was thinking about thinking about including an ant-bot random number / letters they enter which is in a picture. I'm sure you seen it when you great new accounts with a lot of another sites.
Any help would be great... starting to do my head in a bit .. especially with email verification / ant-bot script.

Thanks in advance 

Alexey admin 1/16/2007

Hi,
you can use After Successful Login event to direct users to different pages.

Here is the sample code:

if($data["UserType"]=="customer")

{

header("Location: customers_list.php");

exit();

}

if($data["UserType"]=="wholesaler")

{

header("Location: wholesaler_home.php");

exit();

}



where UserType is your actual field name in Login table.
PHPRunner doesn't perform email verification. You can do this with a custom PHP script and PHPRunner events.
There is a number of free scripts for displaying anti-bot pictures.

This technology is called CAPTCHA.

Here is the script your can use.

http://www.puremango.co.uk/cm_php_captcha_script_113.php
Use BeforeRegister event to check if entered word is correct.

D
datapimp author 1/16/2007

wow .. thank you very much. You have saved me a lot of time <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=14621&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
i guess u learn something new every day

D
datapimp author 1/17/2007

Hi,

you can use After Successful Login event to direct users to different pages.

Here is the sample code:
where UserType is your actual field name in Login table.
PHPRunner doesn't perform email verification. You can do this with a custom PHP script and PHPRunner events.
There is a number of free scripts for displaying anti-bot pictures.

This technology is called CAPTCHA.

Here is the script your can use.

http://www.puremango.co.uk/cm_php_captcha_script_113.php
Use BeforeRegister event to check if entered word is correct.


Hi
I've just been trying this scrip out the but i keep getting an error
Undefined variable: data
...for the life of me i can't figure out what i'm doing wrong... any1 have any ideas ? Below is the full scrip. usertype is the field name in Login table:
function AfterSuccessfulLogin()

{

if($data["usertype"]=="customer")

{

header("Location: chp_list.php");

exit();

}

if($data["usertype"]=="host")

{

header("Location: dhp_list.php");

exit();

}

}

J
Jane 1/17/2007

Hi,
sorry, here is the correct code:

function AfterSuccessfulLogin()

{global $data;

if($data["usertype"]=="customer")

{

header("Location: chp_list.php");

exit();

}

if($data["usertype"]=="host")

{

header("Location: dhp_list.php");

exit();

}

}

D
datapimp author 1/17/2007

thats betters.. that worked
thank you very 4ur help <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=14658&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />