Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. With all of these positive critiques, we'll probably never see this poster again, at least not under this name. Thanx for the support!
  2. "nice try"? My attitude is the same now as it was on my last two posts and will continue to remain the same. If you think I was using sarcasm, apparently you have a hard time recognizing things. Not a good trait in a programmer. I will be sure to pass over your posts in the future.
  3. Sorry to have pointed you in the right direction towards one of the best IT reference manuals in existence. As for adjustments, you seem to need to learn to accept criticism as well as help. I gave you three valid pointers to help you out but you seem to have a problem with being told to read something. Reading is important as any good programmer learns quickly.
  4. IMHO - it is usually easier to start one of these with double quotes and then wrap the attributes in single ones, that way your php vars are properly recognized.
  5. Without looking thru all that code let me state this. You do know that if you set a cookie you cannot retrieve it until the next time you enter that script? The cookies are sent to your session after your next request. I may not be saying it correctly, but if you set a cookie and then try to read it 100 lines later in your code, you will fail. Don't know if that is what you are doing, but if it is, now you know.
  6. And "status" should be giving you an error since you didn't select it. Turn on error checking whenever you are writing new code. It helps the process. (See my signature.) Also - Stop using MySQL* functions. If you bother to read the manual, or ever look at it, you'll see a big red box telling that it is outdated and no longer valid in the current PHP version. Better to stop now than have to come back eventually and re-code. Lastly - don't use this method of retrieving row data from a query result. Fetch a whole row and reduce your resource utilization. For example - if you are using MySQL* functions, then use the MySQL_fetch_assoc() to get a whole array of the fieldnames in your query results with only call to the interface instead of 3. Plus you don't have to keep a row counter. But you should move on to a newer interface - preferably PDO, but that is just my opinion.
  7. did you write this code or copy it from somewhere? So many mistakes. Try fixing the function at the top. You loop thru the query results in there, saving all the rows values in the same variable. This means you only have the last row's information to work with. Why is that? In the main line code you are doing this: while($row_cat_pro=mysqli_fetch_array($run_cat_pro)) { $pro_diametro = $row_cat_pro['diametro']; $link_diametro= "index.php?diametro=$pro_diametro"; echo "<input type='radio' value='" .$link_diametro ."' >" . $pro_diametro . "</option>"; } Why do you echo the start of an input tag and end with a closing option tag??? You do this again later. Do you not know HTML at all?
  8. As a newbie you should make the effort to learn by picking up the manual or a good book and giving it a reading. Look at the syntax sections, how to construct a database 'process' as in: the connection, the query statement preparation, the query, checking the results of the query and then fetching the rows from the query results. All good stuff to learn by yourself and THEN trying to make it work for you and THEN asking for help with it. If you can't understand what you are told, how can we help you?
  9. Once again the failure to include simple PHP error checking during a development costs you time and frustration. You are comparing a datetime var against an integer and that's what I get when I run your script: Notice: Object of class DateInterval could not be converted to int in /home/albany/public_html/homejg/test.php on line 10 See my signature.
  10. So wouldn't that have been a good example to show us?
  11. Maybe I'm confused, but how does this ever get to be zero? Your target is 5 months away.
  12. PS - a header() call following any echo statement (any output) will always fail.
  13. Is $actualpath correct? Looks like it ends in '/uploads/uploads....'.
  14. If you posted my sample at the beginning of this script you will see errors as they occur
  15. You don't check if your query actually executed - poor programming. did you turn on error checking?
  16. Your question didn't say what was wrong. I assume because you stored the message in a non-existent var that the problem was simply a missing message. You could turn on php error checking and see if you any other typos that are causing your failure. See my signature.
  17. Well, your misspelled function name is not a problem since you matched the name to the call. But what about the other line I posted?
  18. Are these spelled correctly? $resopnse["message"] = "User failed to update. Please try again"; } echoRespnse(200, $response);
  19. Actually I don't know how my logic can fail since I ALWAYS name the buttons the same and then use the same logic to handle them, as I showed. And as for the check for request_method - if my search for a $_POST element fails then my code fails, as it should if it doesn't find a defined button.
  20. While what you say makes sense, it is a good constraint for this appl since a player can only play one match a night.
  21. Interesting... minor syntax changes and it works. Funny I've used the methods employed here bedore but this time there must be something unique about it. Here's my now-working code: $q = "select date_format(a.Match_date,'%m/%d/%y') as Match_date, a.Team_no, a.Player1, a.Player2, b.Last_Name as p1ln, b.First_name as p1fn, c.Last_name as p2ln, c.First_name as p2fn, s1.Player_no as scored1, s2.Player_no as scored2 from dart_matches as a join voorhees_data.MMS_Members as b on a.Player1 = b.Roster_no join voorhees_data.MMS_Members as c on a.Player2 = c.Roster_no left outer join dart_match_scores as s1 on s1.Player_no = a.Player1 and s1.Match_date = $qdate left outer join dart_match_scores as s2 on s2.Player_no = a.Player2 and s2.Match_date = $qdate where a.Match_date = $qdate order by a.Team_no"; Thank you very much!
  22. Heres the one that is giving me the problem: Array ( [Field] => Match_date [Type] => date [Null] => NO [Key] => PRI [Default] => [Extra] => ) Array ( [Field] => Team_no [Type] => int(11) [Null] => NO [Key] => PRI [Default] => [Extra] => ) Array ( [Field] => Player1 [Type] => varchar(3) [Null] => NO [Key] => [Default] => [Extra] => ) Array ( [Field] => Player2 [Type] => varchar(3) [Null] => NO [Key] => [Default] => [Extra] => )
  23. Not my first time doing this but I'm missing something today. Gonna really hate it when you point out my problem here. My query: $q = "select date_format(a.Match_date,'%m/%d/%y') as Match_date, a.Team_no, a.Player1, a.Player2, b.Last_Name as p1ln, b.First_name as p1fn, c.Last_name as p2ln, c.First_name as p2fn from dart_matches a, voorhees_data.MMS_Members as b, voorhees_data.MMS_Members as c left outer join (select Player_no as scored1 from dart_match_scores where Match_date = $qdate) as s on a.Player1 = scored1 left outer join (select Player_no as scored2 from dart_match_scores where Match_date = $qdate) as t on a.Player2 = scored2 where a.Player1 = b.Roster_no and a.Player2 = c.Roster_no and a.Match_date = $qdate order by a.Team_no"; The error I keep getting is: Column not found: 1054 Unknown column 'a.Player1' in 'on clause' The thing is my table structure clearly shows the existence of Player1 in my table and have prefixed every occurrence of it in the query, there are no duplicates and yet this is where it keeps stopping no matter what I do. Thanks in advance!
  24. Just my $.02 here. As a general practice I name all of my submit buttons as "name='btn'". All my scripts then do this: if (!isset($_POST['btn']) { handle the first time into your script here, send your output html and exit. } $btn = $_POST['btn']; if ($btn == 'Return') { handle my return (to previous caller) button header() exit() } if ($btn == 'Do This') { } if ($btn == 'Do That') { } // handle unexpected input. echo "Unknown button submitted $btn"; exit(); Obviously, each button has a different label on it and that is how my script knows what to do.
×
×
  • 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.