close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding Dynamic Text

Thread began 7/02/2011 7:53 am by SCVerano | Last modified 7/11/2011 8:07 am by Jason Byrnes | 2388 views | 7 replies |

SCVerano

Adding Dynamic Text

I've already done Create Security Pages with WASA and it was successfully completed.

When I test to add a Dynamic Text to Update.php the values are correctly match to the

account of the user.


I want to add a Dynamic Text to my other PHP filename those are ( home.php and

profile.php ) to be able to view the Information About the user. But I don't have any idea to

do that. Can you please help. Thanks ...

Sign in to reply to this post

Lon WintersBeta Tester

I'm assuming this is information specific to the user who is logged in, such as it will display their name on the home page?

If so, create a recordset on the page from the users table and use the session variable as the filter. You may want to take a look at the recordset on the update page to see how it's set up, you may be able to use the exact same configuration.

Once the recordset is created, drag recordset element from the bindings panel to where you want it to be planed on the page and you should be good to go.

Sign in to reply to this post

SCVerano

Lon,

Thanks for your reply,

I tried your suggestion. But still no luck. After I drag the binded recordset element to my page and testing it from my local server. When I login my account and view the my home.php the Dynamic Text doesn't appear.

Any ideas ? Thanks again Lon, I really appreciate your kindness.

Sign in to reply to this post

Jason ByrnesWebAssist

in stead of creating a recordset to lookup the information, edit the Security Assist authenticate user behavior on the login page.

On the third page of the security Authenticate user behavior, you can select columns fr4om your user table to store in session variables. Click the plus button and select any columns you would like to store.

on the page you wish to show the information, use the bindings from the session collection.

Sign in to reply to this post

SCVerano

Thanks Jason,

It's look like a charm, .. Cheers ..

Another Questions are:

1. ) How about the image retrieval ? I already done uploaded it to my database. Now I want to display my uploaded image to my home.php. To be a primary picture of my user .

2. ) When I changed my User Information in my userupdate.php, why My Dynamic Text doesn't Change when I go to the home.php. I should log-out first and login again to view for some changes information. ? Any help again ?

Thanks again for the Dynamic Text.

Sign in to reply to this post

Jason ByrnesWebAssist

1) So in the users table is a column that holds the file name of the profile image?

again on the login page, edit the authenticate user behavior, on the third step of the wizard, click the plus button and select the profile iamge column to have the file name stored in a session.

then add an image place holder to the home page, and set the source to the path to the image folder and use the session variable value:

<img src="image/path/<?php echo($_SESSION['profileImgSessionName']" />

where profileImgSessionName is the name of the session created by the authenticate user behavior.


2) Updating the name in the database does not change the session value. you would need to add code on the update page to set the session to the new value posted by the update form.

add the following code at line 1 to reset the session:

php:
<?php

if($_SERVER['REQUEST_METHOD'] == "POST") {
  if(isset(
$_SESSION['userName']) && isset($_POST['userName']) && $_SESSION['userName'] != $_POST['userName']) $_SESSION['userName'] = $_POST['userName'];
}
?>




this is assuming the name of the session is "userName" and the name of the form element is "userNmae" you will need to adjust the code accordingly if your session or form element use different names.

Sign in to reply to this post

SCVerano

Hi Jason,

Thank You very much. Everything is on the right track.

Best,

Sly C. Verano

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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...