Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. have you attempted to write an sql statement for this yet? if so, please post the code so we can help.
  2. if you want a code block to run if the image is empty, then your conditions are the opposite of what they should be: if(empty($row['image2'])) { //run this code }else { //move along to another image condition }
  3. then $row['image2'] is not empty, without seeing anymore relevant code, I can't help any further.
  4. because you are using !== instead of !=
  5. use the modulus operator: if ($i % 3 == 0) echo 'this'; }else{ echo 'no'; } http://php.net/manual/en/language.operators.arithmetic.php
  6. please copy and paste your coding directly onto this thread, encased in code tags.
  7. I need help to remove the validation checks that force users to fill in all fields. And how to send a copy of it back to the original sender as well as me on sumbit. while(list($key, $val) = each($_POST)) { if ($key == "Submit") { //do nothing } else { $body .= "$key:\n $val\r\n"; // Checks if $val contains data if(empty($val)) { echo ("<b><p><li>One or more required fields have not been filled in.</li></p> <p><li>Please go <a href='javascript: history.go(-1)'>Back</a> and try again</li></p></b>"); exit(); } } this bit here checks if all fields have been filled out, you can replace this bit with whatever validation you want. you can CC the email to you and the original sender in the $headers part of the email.
  8. if you would like us to help you further, please provide us with your database structure and the relevant PHP code.
  9. minor quibble, substitue mysql_num_results() with mysql_num_rows()
  10. yes, because you are attempting to use a variable that has not been declared previously. If you cannot fix this, we would need to see the relevant code above this line where these variables are declared. i hope that isn't a copy paste, if so, syntax is wrong. if(isset($_GET['see'])) { //do whatever with $_GET['see'] }
  11. again: you must check that $_POST or $_GET array values are set by using isset before attempting to use them in your code, if you have attempted to use isset() and the error is still showing, you re doing something wrong and should post that code here. An undefined variable error indicates that you are using a variable that you have not yet given a value. <?php if (($weeknr != $previousweek) || $firstweek){ ?>
  12. from the manual: Warning It is very important to note that the line with the closing identifier must contain no other characters, except possibly a semicolon (. That means especially that the identifier may not be indented, and there may not be any spaces or tabs before or after the semicolon. It's also important to realize that the first character before the closing identifier must be a newline as defined by the local operating system. This is \n on UNIX systems, including Mac OS X. The closing delimiter (possibly followed by a semicolon) must also be followed by a newline. you have tabbed your closing identifier.
  13. don't have to technically, but you most certainly should.
  14. if (isset($_REQUEST["league"]) && isset($_REQUEST['league_id']) && isset($_REQUEST['team'])) { $league = $_REQUEST["league"]; $league_id = $_REQUEST["league_id"]; $team = rawurldecode($_REQUEST["team"]); }else { $league = $random_league; $league_id = get_league_id($league); $team = random_team($league_id); } again, you should be using the proper $_GET or $_POST method.
  15. what I want to know is what exactly you meant by this: this explanation could dictate the proper answer.
  16. where are the $_REQUEST values coming from?
  17. you are talking to me as if I have seen your code, it sounds to me like a mysql join for this, but without seeing any code, this is as far as I can go.
  18. well, a header is the logical way to go about doing this. There are other methods, like a meta redirect and such, but why would you say that headers are "cumbersome"?
  19. are all of the errors "undefined index"? This error normally occurs when an array index is referred to that does not exist.. $_REQUEST["league"] in this case, like you did with $_REQUEST["team"], you must check for the array value being set before assigning the value to a variable.
  20. this can be accomplished with one query and no nesting, can you post the relevant code above these loops.
  21. what part of this code do you need help with or do not understand?
  22. the proper way to write the code would be to not have 6 nested loops. what is the logic behind this?
  23. This seems very helpful information, but there is one confusion... where to find the php.ini file on the server. i am using window hosting for the website and using tomcat server... use phpinfo to find the location of the correct php.ini file, and then check the relevant settings.
×
×
  • 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.