AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
getting php to work with relationship tables
AyKay47 replied to DonaldFaulknor's topic in PHP Coding Help
have you attempted to write an sql statement for this yet? if so, please post the code so we can help. -
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 }
-
then $row['image2'] is not empty, without seeing anymore relevant code, I can't help any further.
-
because you are using !== instead of !=
-
use the modulus operator: if ($i % 3 == 0) echo 'this'; }else{ echo 'no'; } http://php.net/manual/en/language.operators.arithmetic.php
-
Can you let me know proper way to write this nested loop?
AyKay47 replied to berde.jitendra's topic in PHP Coding Help
please copy and paste your coding directly onto this thread, encased in code tags. -
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.
-
Can you let me know proper way to write this nested loop?
AyKay47 replied to berde.jitendra's topic in PHP Coding Help
if you would like us to help you further, please provide us with your database structure and the relevant PHP code. -
minor quibble, substitue mysql_num_results() with mysql_num_rows()
-
SELECT query - apply LIMIT condition to unique items only
AyKay47 replied to stubarny's topic in MySQL Help
-
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'] }
-
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){ ?>
-
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.
-
get_meta_tags(): Can Not Connect to Server
AyKay47 replied to The Little Guy's topic in PHP Coding Help
-
don't have to technically, but you most certainly should.
-
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.
-
what I want to know is what exactly you meant by this: this explanation could dictate the proper answer.
-
where are the $_REQUEST values coming from?
-
Can you let me know proper way to write this nested loop?
AyKay47 replied to berde.jitendra's topic in PHP Coding Help
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. -
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"?
-
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.
-
Can you let me know proper way to write this nested loop?
AyKay47 replied to berde.jitendra's topic in PHP Coding Help
this can be accomplished with one query and no nesting, can you post the relevant code above these loops. -
what part of this code do you need help with or do not understand?
-
Can you let me know proper way to write this nested loop?
AyKay47 replied to berde.jitendra's topic in PHP Coding Help
the proper way to write the code would be to not have 6 nested loops. what is the logic behind this? -
Need help in uploading videos of big size files
AyKay47 replied to rahulvicky00's topic in PHP Coding Help
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.