close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Undefined variable: row_ error with Security assist.

Thread began 2/25/2015 5:41 pm by rgolfer | Last modified 2/26/2015 1:46 pm by Jason Byrnes | 726 views | 3 replies |

rgolfer

Undefined variable: row_ error with Security assist.

Hi Jason,

Having a little trouble with a show region and security assist. Here is what I am hoping to happen ... it basically is a "old stock" inventory entered by several people who have access to the site. A results page shows the list of available product and the ability of editing and deleting the lines are restricted to "Admin" people on this page.

On the "details" page the edit and delete buttons are to show but only to the person who had entered the item. The way I was going to check this is by security assist comparing the login email and comparing it to the email email addresses entered at time it was added to the database "column - tusedtires.adminby".

Unfortunately I am getting an error message stating the variables are Undefined.
To double check that this info is coming into the page I inserted each of these bindings on line 370 and they show up fine.
<td class="DetailsPage"> <?php echo $row_Recordset1['EmailAddress']; ?> - <?php echo $row_WADAtusedtires['adminby']; ?></td>

Could this be more of an error i made in the security assist rules manager? I created a rule called Oldtiresentry and all it is supposed to do is "restrict" showing this item if the email address do not match ...


case "Oldtiresentry":
$comparisons[0] = array(FALSE, "".$row_WADAtusedtires['adminby'] ."", 2, "".$row_Recordset1['EmailAddress'] ."");
break;

Instead I am getting this Error Message on the page ....


( ! ) Notice: Undefined variable: row_WADAtusedtires in C:\wamp\www\support\webassist\security_assist\helpergroupsrulesphp.php on line 29
Call Stack
# Time Memory Function Location
1 0.0004 363416 {main}( ) ..\tusedtires_detail.php:0
2 0.0236 382400 WA_Auth_RulePasses( ) ..\tusedtires_detail.php:393
3 0.0236 382400 WA_Auth_RuleObject_EvaluateRules( ) ..\helper_php.php:410
4 0.0236 382432 WA_Auth_GetComparisonsForRule( ) ..\helper_php.php:415

( ! ) Notice: Undefined variable: row_Recordset1 in C:\wamp\www\support\webassist\security_assist\helpergroupsrulesphp.php on line 29
Call Stack
# Time Memory Function Location
1 0.0004 363416 {main}( ) ..\tusedtires_detail.php:0
2 0.0236 382400 WA_Auth_RulePasses( ) ..\tusedtires_detail.php:393
3 0.0236 382400 WA_Auth_RuleObject_EvaluateRules( ) ..\helper_php.php:410
4 0.0236 382432 WA_Auth_GetComparisonsForRule( ) ..\helper_php.php:415


Any ides on this one?

Sign in to reply to this post

Jason ByrnesWebAssist

Using security assist access rules and show region is not the correct tool for the job.

the issue is that the require once line for the security assist helper file gets added to the page before the recordset is defined.

But even still, you don't need to create an access rule and use the Security assist show region for this. Instead, use the Show region Utility.

Select the region to show / hide, then go to the Server behaviors panel, click the plus button and go to WebAssist -> Utilities -> Show Region Utility

Sign in to reply to this post

rgolfer

This worked great Jason. Simple and effective. Thanks!

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