close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

recordset from $_SESSION

Thread began 3/10/2010 11:42 am by JBWebWorks | Last modified 3/11/2010 10:33 am by JBWebWorks | 2109 views | 6 replies |

JBWebWorks

recordset from $_SESSION

i have a login page and authenicate user server behavior
last part sets session variable ['client_ID']

when the person logs in it redirects to correct page.

On that page i would like to display
Welcome (first name) (last name) on that page.

i set up a recordset

$var1_rs_client = "-1";
if (isset($_SESSION['client_ID'])) {
$var1_rs_client = (get_magic_quotes_gpc()) ? $_SESSION['client_ID'] : addslashes($_SESSION['client_ID']);
}
mysql_select_db($database_connauto, $connauto);
$query_rs_client = sprintf("SELECT * FROM client_info WHERE client_info.client_ID = %s", GetSQLValueString($var1_rs_client, "int"));
$rs_client = mysql_query($query_rs_client, $connauto) or die(mysql_error());
$row_rs_client = mysql_fetch_assoc($rs_client);
$totalRows_rs_client = mysql_num_rows($rs_client);

can't get the recordset to populate?

thanks for your help,
Jim B

Sign in to reply to this post

Jason ByrnesWebAssist

whenever you use a session, always include the following code before referencing the session variable:

<?php if(!session_id()) session_start(); ?>

no need to use a recordset for this.


on the login page, double click the authenticate user server behavior. on the third step, select the First name and last name columns to be stored in session variables once the user name logs in, instead of the recordset, you can display the sessions that are created.

Sign in to reply to this post

JBWebWorks

thanks Jason

one other question about Security Assist

on a single login form can i apply more that one authenticate user behavior with each behavior tied to a different db table?

Sign in to reply to this post

Jason ByrnesWebAssist

yes, you would probably want to have different login forms for that though.

Sign in to reply to this post

JBWebWorks

thanks for your help, Jason.

got the session working fine.

reason i want to have the 3 authenticates is i have 3 different types of people logging in, clients, reps and dealers, and i have their information in 3 different tables.
When each logs in i want them to go to 3 different pages.

Is there a different way i should be thinking about this?

Sign in to reply to this post

Jason ByrnesWebAssist

No, not with your currant set up having them in three separate tables.

Sign in to reply to this post

JBWebWorks

as always, thanks for your help

I ended up with 3 different forms and a separate security assist authenticate for each form and it works correctly.
I used a checkbox show/hide function to show the correct form when the person checks which checkbox reflects their status.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...