Jump to content

Beeeeney

Members
  • Posts

    193
  • Joined

  • Last visited

Everything posted by Beeeeney

  1. Is this problem that you're having now going to be a problem again at some point in the future?
  2. It's not the sort of place where people can pop in and have code written for them as they please. This place is to help people become better at programming.
  3. I skimmed the code over too quickly, it seems. Just saw that he said it's displaying those errors before they even submit everything.
  4. Well nobody here is just going to write it for you. At least show that you've made an effort and the help you get will be astounding.
  5. http://www.phpfreaks.com/tutorial/basic-pagination
  6. Have you first attempted to solve this yourself?
  7. Those errors are detailing the EXACT problem. In plain English.
  8. Near the bottom? Near the bottom? Also you haven't closed a set of parenthesis.
  9. No. If you can't figure it out from what I just said then you need to go and learn.
  10. That code I just posted will tell you what's wrong if it fails.
  11. As far as I'm aware, that's one big syntax error. Where your "die" command is concerned, you need to tell it to query the database and if it fails, then use "die" and display a MySQL error. <?php $result = mysql_query("SELECT id, product_id , amount FROM product_amount WHERE amount<=5.0000") || die("Invalid query:" . mysql_error()); ?>
  12. Just build a form that lets the user enter some data into a text area, and catch the information in a variable. Then echo the variable. Very simple to do, you could learn how to do it with a quick tutorial.
  13. Code is run from top to bottom. You're checking if a password and username have been set and telling it to echo that before anyone gets a chance to enter any data.
  14. If you know literally nothing of PHP, you're gonna have a hard time understanding the answers that you get given here. Assign a variable to the current date, then use if() to echo something when it's a certain date, or whatever. Example: <?php $date = date(); //Put your date format in the parenthesis if ($date="") { //Again, where the quotes are, put what date you need it to be to echo whatever you need it to echo "Merry Generic Holiday!"; } elseif ($date="") { echo "Happy other Generic Holiday"; } else { echo "It's a normal day, have fun with your mediocre life"; } ?> Or something. You can learn about date formats on PHP.net
  15. Just use an if.. else statement and use two variables. One for the single line of text and one for the text with the line breaks. Then if div size is whatever, then echo $variable1, else echo $variable2.
  16. At least go learn the basics of PHP.
  17. Try <?php send me dat email wen criteria is met, yo ?> Let me know how you get on.
  18. *facepalm* I have the code for the three dropdowns. One is for Day, one is for Month and one is for Year. I have three separate bits on the form where a date needs to be entered. Date of Birth, Date of Issue and Date of Expiry. I need to validate them separately with Javascript, but I am using the same code for each instance that the date needs to be entered on the form. Now because of this, when the Javascript tries to validate, it won't be able to determine which one of the three is wrong. I need to have separate code for each date entry, but I wanted to know if there was a way to do it that didn't involve me repeating the code three times or making three separate include files.
  19. You were missing some quotation marks. $aUnits = array('pic1.jpg' => '1', 'pic2.jpg' => '2', 'pic3.jpg' => '3');
  20. Sorry if I seem vague. I need to validate the three separate date entries with Javascript, to stop the form being submitted if the field returns as not selected. My code for generating the dropdowns for selecting Day, Month and Year is in a separate include file. Now, if I were to validate this part of the form with Javascript, it would try to validate all three different date entries with the one Javascript statement. Basically I need to have three different <select><?php generate dropdowns?></select>, so I can validate them separately, without having three different include files.
  21. Have you tried putting PHP tags around your PHP code?
  22. Where are you including anything?
×
×
  • 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.