Categories > TinyButStrong general >

Whats wrong with this?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: SarCaSM
Date: 2005-03-03
Time: 22:32

Whats wrong with this?

ok, my problem: I have a variable called $bad_password, and in the template I am trying to make it so if $bad_password is set to true, then we display a row in the table saying the password is bad.  So I have this for my code.

<tr>
<td colspan="4" style="color: #000000; background-color: #FFFFFF; text-align: center">
[onload;block=tr;when [var.bad_password]=1;noerr]The passwords you entered do not match. Please try again.
</td>
</tr>

And sometimes $bad_password is not set, so I have the noerr parameter in there, but for some reason the tinybutstrong error still comes up.  why is this? am I doing something wrong?
By: ny10021
Date: 2005-03-04
Time: 00:33

Re: Whats wrong with this?

it works fine for me.  you can look at my example below -- including the php code:

html page 1
<form action="rrrtest.php" method="post">
<input type="text" name="bad_password" />
<button type="submit">Submit</button>
</form>

php code:
<?php
include_once('/home/virtual/admin34/var/www/html/includes/tbs_class.php');

$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('rrrtest.html');

if ($_POST['bad_password'] = 1){
$bad_password = "1";
}

$TBS->Show();
?>

template html
<table>
<tr>
  <td>[onload;block=td;when [var.bad_password]=1]WITHOUT NOERR</td>
</tr>
<tr>
  <td>[onload;block=tr;when [var.bad_password]=1;noerr]WITH NOERR</td>
</tr>
</table>
By: SarCaSM
Date: 2005-03-04
Time: 01:06

Re: Whats wrong with this?

Thats really odd, exactly what I have, but I still get the TBS error ....
By: Skrol29
Date: 2005-03-04
Time: 01:06

Re: Whats wrong with this?

Hi,

This is because 'noerr' should be on [var.bad_password]
By: ny10021
Date: 2005-03-04
Time: 01:08

Re: Whats wrong with this?

that is strange though, because the code i posted is working for me.
By: SarCaSM
Date: 2005-03-04
Time: 01:10

Re: Whats wrong with this?

You are a god skrol29! thank you, such a wonderful product, and such terrific support.  Also thank you ny10021 for the help.
By: Skrol29
Date: 2005-03-04
Time: 01:27

Re: Whats wrong with this?

Perhaps you've got register_globall set to ON
By: ny10021
Date: 2005-03-04
Time: 01:39

Re: Whats wrong with this?

yes i do. :-)