close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Application help needed

Thread began 4/07/2009 6:30 am by gwh362692 | Last modified 4/07/2009 9:35 am by gwh362692 | 3777 views | 8 replies |

gwh362692

Application help needed

Hi everyone,

I'm creating an application where people can register for an event. I planned for there to be 3 pages to this application. I've started by creating the registration page where the user fills in their contact details. I built this using security assist. This works well and on the press of the submit button it inserts all the details into a visitors table and redirects to the second page of the application.

I'm onto this second step now trying to create the second page. At the top of this page I'd like for the information that they just filled out on the previous page to be visible as 'static' information just so that they can confirm that everything was entered correctly. When I used the security assist wizard on the previous page, it created a visitors_Profile.php page where users could update their information, so I planned to have a link to this profile page on the second page of my application so that if their details need updating they can do it on this profile page. I'm having problems though figuring out how to get the current user's data from the database table onto the page in a 'static' form. Can someone tell me which parts of the super suite I'd use to accomplish this? Maybe provide brief instructions how to get it done? Would it include using session variables or something?

Appreciate any help.

Sign in to reply to this post

Ray BorduinWebAssist

Instead of SecurityAssist, you should probably use dataassist. Security Assist is mainly about login and if you don't want login, DataAssist is a better solution for database manipulation in general.

You may want to redo your registration page with dataassist, or at least remove the insert record server behavior currently applied and apply the one from dataAssist instead.

This will automatically store the newly inserted record ID into a session variable that you can then use to filter a recordset on your second page that will allow you to display the newly inserted results.

Sign in to reply to this post
Did this help? Tips are appreciated...

gwh362692

Thanks for the reply,

The thing is that I actually do need login because on the registration page itself, as well as there being a form for new registrations, there will also be a smaller form for people who have previously registered to log in. The application will be used over and over again as this not-for-profit organisation offers events to its members throughout the year, so as events come up people will either register or login as the case may be.

Originally Said By: Ray Borduin
  ... or at least remove the insert record server behavior currently applied and apply the one from dataAssist instead.  



If I apply the one from dataAssist will everything else stay intact, ie. everything that I'd done through the security assist wizard?

Originally Said By: Ray Borduin
  This will automatically store the newly inserted record ID into a session variable that you can then use to filter a recordset on your second page that will allow you to display the newly inserted results.  



I understand how to create a recordset but can you explain briefly how I'd use the session variable to filter the recordset? Which dialogue box do I do this in?

Sign in to reply to this post

Ray BorduinWebAssist

1) yes everything else will stay intact.

In the simple recordset interface you can choose to filter from a session variable directly from the dropdown and enter the session variable name.

Sign in to reply to this post
Did this help? Tips are appreciated...

gwh362692

Ok great.

Just one other thing - when I used the security assist wizard it created a separate visitor_login.php page. I mentioned earlier that I wanted this login form to be on the same page as the new registration form. Can you tell me how to move this login form so that it's actually on this first rego page? If I just copy and paste the code how would I know where to place the php code so that it doesn't mess with the code already on the rego page?

Sign in to reply to this post

Ray BorduinWebAssist

Just copy and paste the form and set the form action to submit to the original page... You don't need to move any php code if the form submits to the page with the php code.

Sign in to reply to this post
Did this help? Tips are appreciated...

gwh362692

Originally Said By: Ray Borduin
  Just copy and paste the form and set the form action to submit to the original page... You don't need to move any php code if the form submits to the page with the php code.  



Just need a bit more clarification - sorry I'm a real beginner - you were saying to set the form action to submit to the original page – The following is the current form action:

<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" name="WAATKLogInForm" id="WAATKLogInForm">


...how do I change the code so that the action is submitting to the rego page? Is this right - I mean the rego page is the page with the php code right? I'm confused.

Also are you saying that I don't need all this extra code below? I was following the tutorials in the Introduction to SecurityAssist solution recipe to encrypt the passwords - won't I need all this on the other page?



<?php require_once("WA_SecurityAssist/WA_SHA1Encryption.php"); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<?php require_once('Connections/localhost.php');?>
<?php require_once('Connections/localhost.php');?>
<?php require_once('Connections/localhost.php');?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?><?php
if ((((isset($_POST["autologinoption"]))?$_POST["autologinoption"]:"") != "")) {
setcookie("AutoLoginPWD", "".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if ((((isset($_POST["autologinoption"]))?$_POST["autologinoption"]:"") != "")) {
setcookie("AutoLoginUN", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if ((((isset($_POST["remembermeoption"]))?$_POST["remembermeoption"]:"") != "")) {
setcookie("RememberMePWD", "".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if ((((isset($_POST["remembermeoption"]))?$_POST["remembermeoption"]:"") != "")) {
setcookie("RememberMeUN", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if (isset($_POST["LogIn_x"]) && !isset($_POST["remembermeoption"])) {
setcookie("RememberMePWD", "", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if (isset($_POST["LogIn_x"]) && !isset($_POST["remembermeoption"])) {
setcookie("RememberMeUN", "", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => $localhost,
"database" => $database_localhost,
"tableName" => "visitors",
"columns" => explode($WA_Auth_Separator,"VisitorUserName".$WA_Auth_Separator."VisitorPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"") ."".$WA_Auth_Separator."".WA_SHA1Encryption(((isset($_POST["userpassword"]))?$_POST["userpassword"]:"")) .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"VisitorID"),
"sessionNames" => explode($WA_Auth_Separator,"VisitorID"),
"successRedirect" => "rego_step2.php",
"failRedirect" => "visitors_EmailPW.php",
"gotoPreviousURL" => FALSE,
"keepQueryString" => TRUE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
<?php
if((((isset($_SESSION["VisitorID"]) && $_SESSION["VisitorID"] != "")?"LoggedIn":"") == "")&&(((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") != "")&&(((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") != "")){
$WA_Auth_Parameter = array(
"connection" => $localhost,
"database" => $database_localhost,
"tableName" => "visitors",
"columns" => explode($WA_Auth_Separator,"VisitorUserName".$WA_Auth_Separator."VisitorPassword"),
"columnValues" => explode($WA_Auth_Separator,"".WA_SHA1Encryption(((isset($_POST["userpassword"]))?$_POST["userpassword"]:"")) ."".$WA_Auth_Separator."".((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"VisitorID"),
"sessionNames" => explode($WA_Auth_Separator,"VisitorID"),
"successRedirect" => "rego_step2.php",
"failRedirect" => "",
"gotoPreviousURL" => FALSE,
"keepQueryString" => TRUE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

<form action="loginpage.php" >

Sign in to reply to this post
Did this help? Tips are appreciated...

gwh362692

Got it now - thanks!

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