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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Showing the field value 1 or 2 as Text...

Thread began 4/06/2011 6:28 pm by Paul | Last modified 4/08/2011 9:44 am by Jason Byrnes | 731 views | 3 replies |

PaulBeta Tester

Showing the field value 1 or 2 as Text...

Login page created with SA.

I have recordset variable 'mem_type' which is either a 1 or a 2, depending on the users selection during registration and 'mem_type' id definitely returning the correct value for the user type.

I've tried the following

php:
<?php echo ($row_idSellers['mem_type'] == 0)?'Buyer':'Seller'?>



Where idSellers is my recordset.

But it always returns 'Seller' where the 'mem_type' is either 1 or 2

Am I missing something here?

Thankyou.

Sign in to reply to this post

Jason ByrnesWebAssist

your condition is comparing against a value of 0:
$row_idSellers['mem_type'] == 0

only if the mem_type equals 0 will it show "Buyer"

any other value besides 0 will trigger it to show "Seller"


if the values being stored in the mem_type are either 1 or 2, then you need to use one of those values in the comparison, by using 0 for the comparison, you are telling it to always write Seller.

Sign in to reply to this post

PaulBeta Tester

Of course. Thank you Jason.
Issue resolved!

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it's working

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