close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

server validation to restrict login

Thread began 10/22/2009 3:28 pm by JBWebWorks | Last modified 10/23/2009 11:18 am by JBWebWorks | 1862 views | 3 replies

JBWebWorks

thanks Jason,

i accomplished what i wanted but did it a little differently.
Once i figured out the COUNT()recordset

//sql is---
SELECT items.account_ID, COUNT(*)
FROM items INNER JOIN accounts ON items.account_ID = accounts.account_ID
WHERE accounts.account_screen_name = var1
GROUP BY items.account_ID

I used PHP if/else statement to
hide the submit button on the item post page and replace with a statement

<?php if ($row_rs_count['COUNT(*)']<"10"){ ?>
<input type="submit" name="submit1" id="submit1" value="Post Your Item for Sale" />
<?php }
elseif ($row_rs_account['account_validated']=="goldaccount"){ ?>
<input type="submit" name="submit2" id="submit2" value="Post Your Item for Sale" />
<?php }
else { echo ('<h2>Your account has reached the limit of 10 items. Upgrade your account to <a href="Gold-Member.php">Gold Member</a> for unlimited item postings</h2>');
}
?>

then i used Universal Email to send an email to the account holder encouraging them to upgrade their account to be able to post unlimited items

<?php
if ((($row_rs_count['COUNT(*)']>="10" && $row_rs_account['account_validated']=="basicaccount"))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".$row_rs_account['account_email'] ."";include("WA_Universal_Email/WAUE_post-item_1.php");
$RecipientEmail = "webmaster@bubbasmobileyardsales.com";include("WA_Universal_Email/WAUE_post-item_1.php");

//Send Mail All Entries
if (""!="") {
header("Location: ");
}
}
?>

thanks again for WebAssist Support,
Jim Balthrop

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