Jump to content

jcbones

Staff Alumni
  • Posts

    2,653
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by jcbones

  1. If this is only to check if the user has NEW mail, I would run a COUNT() query, specifying the user and messageRead = 'NO'. If the count is more than 0, return the message (and the count holds the amount). PS> get rid of the while statement.
  2. $addressData = file_get_contents($file);
  3. Does the page source reveal that the sub_id is set in the select box?
  4. Try this, and let us know: <?php require_once '../../connectDB.php'; require_once '../include/functions.php'; $sql = " SELECT * FROM tb_item ORDER BY itm_id asc"; $result = mysql_query($sql) or die(mysql_error()); ?> <form> <h1>Items</h1> <table width="75%" border="1" align="left" cellpadding="5" cellspacing="1"> <tr> <th width="100" align="left">Item ID</th> <th width="100" align="left">Parts</th> <th width="100" align="left">Sub-Process</th> <th width="100" align="left">Confirmation</th> </tr> <tr> <?php while ($row = mysql_fetch_array($result)) { extract($row); ?> <td><?php echo $itm_id; ?></td> <td><?php echo $itm_parts; ?></td> <td> <select name='cboSub' id='cbosub'> <option value='' selected>---- Choose Process ----</option> <?php createComboBox($sub_id); ?> </select> </td> <td> <a href='processItem.php?itm_id=<?php echo $itm_id; ?>'> <img src='../images/modify.png' width='20' height='20' alt='confirm'/> </a> </td> </tr> <?php }; ?> </table> </form> <?php /** * Create combo box for sub-process */ function createComboBox($id) { $sql = " SELECT * FROM tb_sub_process ORDER BY sub_id asc"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { extract($row); $select = ($id == $sub_id) ? 'selected="selected"' : NULL; echo "<option value='$sub_id' $select>$sub_name</option>"; } } ?>
  5. Throw us a bone here, where is it located, and what is the column name.
  6. Bottom right of the thread, there is a button to mark it solved.
  7. Are you talking XML, because PHP doesn't send FORMS, only POST or GET. PHP has a POST_MAX_SIZE limit in it's php.ini, so there is a limitation that you can send TO PHP. But, you are sending to a java file, and I'm not sure about that one. To POST data without a form, you would use cURL functions, but that still wouldn't put it in a <form>...</form> setting, but rather in the POST array (like all other POST data is sent).
  8. I'm pretty sure the timestamp hash would be per user, and is a way the site is keeping people from doing what you are trying to do (as that must match your session, or cookie). Have you contacted the site? They can create a workaround to this: API
  9. 1. Make sure your database column for the datetime is set to timestamp. 2.Change your insert to: $sql="INSERT INTO $tbl_name (name, email, comment, datetime) VALUES ('$name', '$email', '$comment', CURRENT_TIMESTAMP())"; This will use MySQL's Date functions. Thereby, it will always be in the correct timestamp format. 3. Change your select to: $sql="SELECT id, name,email,comment, DATE_FORMAT(`datetime`,'%b-%d-%y %r') as datetime FROM $tbl_name"; This would be the best way, IMHO. Reference: MySQL Date Functions
  10. MasterACE's solution will work. My suggestion is that you don't need to run get_footer() in every different senerio on the page. Rather, run it at the bottom of the page, as it is served no matter what. If there is ever a function that you must include in every if/else statement, putting it below all of the statements will get the same effect, but with less code.
  11. I suppose this is for wordpress? Does the footer.php file exist in your theme directory? Have you tried moving the get_footer() function BELOW the else statement?
  12. Ummm, from the MySQL manual.
  13. I have found fusion charts to be easy to use. They look great also.
  14. Let us see what you currently have.
  15. If he hasn't opened a connection, then his query wouldn't work. So the fix is to open a connection.
  16. Post the full code.
  17. I normally use camelCase, even in my variables. I have seen many people use underscores though. It is really down to personalPreference, IMHO.
  18. The most common for small to medium sites, is MySQL. Which is also my suggestion. Most Linux hosts have this database installed. MySQL PHP functions PHP Object MySQL Tutorial
  19. The problem here is the xml file. If it were a database, you would have date functions to help you pull only the valid info. Being that it is xml, I don't know of a way for you to check dates, other than looping the data, until you find the one that you want.
  20. I thought Mj did a great job on this whole thread. Can't we all just get along?
  21. x = <input type="text" name="x" size="5" value="<?php print $x; ?>"/> y = <input type="text" name="y" size="5" value="<?php print $y; ?>"/>
  22. Post your code here, please put them inside of the ... brackets
  23. extension should be .php Xamp Start-up list <-follow this page from start to bottom, if you still have questions, come back I'll be glad to help you.
  24. Basic Pagination. This is the default tutorial here, probably one of the best out there.
  25. It all depends on your needs. I created a class that handles input's (not the whole form), then I have a validation class that automatically validates the inputs. This takes loads of work off of me, as I only need to set the validation rules for the inputs. It is also written in a way that I can add any javascript that I need as well. The question isn't "is is worthwhile", the question is "can you make it open ended enough".
×
×
  • 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.