close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Redirect if username exist in TWO fields.

Thread began 6/28/2011 7:19 pm by ijk76319396 | Last modified 6/29/2011 7:50 am by ijk76319396 | 1001 views | 3 replies

ijk76319396

Redirect if username exist in TWO fields.

I want to check not only one field but two if a username exists and compare it with only one of the columns in the database. For example I have a form which has field 1= blue and field 2= red. My database does not contain the word blue- but it does contain red in the colors column. How can I alter the redirect so it checks for both blue and red in the database. I was thinking something like the following...

$MM_dupKeyRedirect="../nameused.php";
$loginUsername = $_POST['redfield'][bluefield'];
$LoginRS__query = sprintf("SELECT RESTRCTR FROM dl_rstrctr WHERE RESTRCTR=%s", GetSQLValueString($loginUsername, "text"));
mysql_select_db($database_Xconn, $Xconn);
$LoginRS=mysql_query($LoginRS__query, $Xconn) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);



You can see where I thought adding both the redfield and bluefield follwing $_POST would work. Am I way off here?

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