Jump to content

lemmin

Members
  • Posts

    1,904
  • Joined

  • Last visited

  • Days Won

    2

lemmin last won the day on June 21 2017

lemmin had the most liked content!

Contact Methods

  • Website URL
    http://jumpjams.com

Profile Information

  • Gender
    Not Telling

lemmin's Achievements

Member

Member (2/5)

29

Reputation

  1. This is a Gas Buddy type website for beer prices. Feel free to add real or fake data. http://beerzip.com http://beerzip.com/phpfreaks.txt I would like to include weekly circular prices from the big supermarkets, but I've tried ad nauseam to contact anyone at a corporate level who could answer any questions. Any ideas on that level? I appreciate any and all feedback. Thanks
  2. You'll have to do some research then. The wp_count_comments() function accepts a post ID, so I would look around that code area for a variable that might contain that. Once you have that, you can add your logic: $comments_num = wp_count_comments($post_id); if ($comments_num > 5) //show more code
  3. Depending on your goal, you might want to set up a listserv.
  4. So what isn't working? Is there just no output, or is there an error? Have you double checked that the ID you are using IS in the database along with an associated size in the related table?
  5. I'm just saying, I don't know what value $XCart_StockID holds, so it might not be what you expect. It NEEDS to have the value from the "select" element.
  6. You could include a difference in your query that would represent a true or false value: SELECT expenses, payments, expenses-payments diff [...] Then, while looping through them: $style = ($row['diff']) ? 'greenstyle' : 'redstyle'; Or do it all in PHP or all in SQL. You probably won't see much of a performance difference either way.
  7. Can you post the exact values of your variables in the query?
  8. Your logic is checking if the MySQL query result is an integer, which it isn't. You want to check the number of rows: Change, if($result == 1) to: if($totalreg == 1)
  9. You will need a simple HTML form: <form method="POST" action="handler.php"> <input type="text" name="key"/> <input type="submit"/> </form> Then, in the PHP file (handler.php in this case): <?php //mysql_connect() //mysql_select_db() $r = mysql_query('SELECT * FROM tbl_code WHERE key = "'.$_POST['key'].'"'); if (mysql_num_rows($r)) header('Location: success.html'); else header('Location: denied.html'); ?> This is very basic, it should work in perfect circumstances. Don't forget to add error handling and input cleaning.
  10. Have you tried other browsers? I think the problem you are having is stemming from how the browser handles iframes specifically. My suggestion is to switch to AJAX for this kind of thing.
  11. Do any of the other links have drop downs? The drop down part would be controlled by Javascript, so you would have to integrate your PHP without that.
  12. Your code is hard to read in blocks like that. You have derived variable variables without showing their instantiation. Anyway, your form submits the StockID as a value of the "select" select (select named select). After submitting your form, $_POST['select'] will contain the StockID that was selected. You should then be able to use that variable in your query.
  13. Post the new code that throws the Javascript error
  14. Assuming this is for WordPress, you probably want to use the wp_count_comments() function: http://codex.wordpress.org/Function_Reference/wp_count_comments More info can be found here: http://codex.wordpress.org/Function_Reference#Comment.2C_Ping.2C_and_Trackback_Functions
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.