Jump to content

Jim R

Members
  • Posts

    988
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jim R

  1. That's how WordPress uses it, and the page it redirects from to process the form uses the same file. What should it show when I print that?
  2. I'm not sure I follow, but with that echo there, this is the result: ABSPATHresources/con.php
  3. It is correct. The file exists. It has the right permissions. It's the same file being used by many other queries in other functions and files on the same site. EDIT: Hold on...I misread what you wrote.
  4. The file that allegedly doesn't exist... include(ABSPATH ."resources/con.php");
  5. That's not it. There is a trailing / in the ABSPATH. This is line of code in a file that is included for several functions which are currently working as expected, as well as similar instances on other sites I've developed.
  6. This is a strange one, as I have many forms on my various sites, and on this site, the file in question is used by several functions. Ultimately, I'm wanting it INSERT values from the form, which I'll eventually add more of. Form is process and is stent to rn_process.php, which is the code listed below. include(ABSPATH ."resources/con.php"); $grade = $_POST['grade']; $position = $_POST['position']; echo $grade.$position; $query = "INSERT INTO a_rankings_select (username,userID,grade,position) VALUES ('" .$username. "', '" .$userID. "', '" .$grade. "', '" .$position. "')"; It echoes the correct $grade and $position when I comment out the INCLUDE. So I know it's passing the correct values. However, when the INCLUDE is active, I get the following error: resources/con.php is a file I link to many times, and it's work in those instances. It's certainly not executing the INSERT.
  7. I appreciate that, but I'm trying to avoid typing all of that in the future, especially in regards to a player's name.
  8. The function itself is in a separate file. There are four things I''m using about 10 times over, and a couple of them I tinker with. Every time I make a change, I have to alter all instances.
  9. I didn't have the variables in both where I created the functions and where I used it. Thank you!
  10. Ehhh...I'm self taught, and it's a hobby. I run into learning curves.
  11. I did not want the DIV in there. I removed it. No change. It looks like the function isn't getting the data into it. I tried putting the variables between the ( ), but that just threw an error.
  12. I'm using this line a lot on my site. It would be nice if I didn't have to change it 10 times over when I decide to change something. Can I wrap that into a Function and use it in a While loop? echo '<div><a href="/tag/'. strtolower($nameFirst) . '-' . strtolower($nameLast) .'">'. $nameFirst . ' ' . $nameLast .'</a>, '; I have this above it in the While loop. $nameFirst = $row['nameFirst']; $nameLast = $row['nameLast']; My function predictably looks like this... function player_name () { echo '<div><a href="/tag/'. strtolower($nameFirst) . '-' . strtolower($nameLast) .'">'. $nameFirst . ' ' . $nameLast .'</a>, '; }
  13. Ugh...I hate typos. Thanks, as always. I figured it was something simple.
  14. I need to match the city and school in two tables (CONCAT) so I can determine whether or not they use the toggle column. Toggle is in a_schools city and school are in both The others are in a_players (I'm sure someone will ask why a_players table doesn't have/use teamID, but it's not effective for my people (or me) to enter names.) With LEFT JOIN it gives me the list I should get, 15 rows. However, the toggles are all NULL. Two should have "1". Here is the query: SELECT nameFirst,nameLast,feet,inches,p.city,p.school,grade,position,grouping,rankPos,toggle FROM a_players p LEFT JOIN a_schools s ON CONCAT(p.city,p.school) = CONCAT(s.school,s.school) WHERE position ='3' AND grade='23' AND grouping ='2' ORDER BY rankPos
  15. Correct. I do apologize for not being clear. I'll change it to wrap.
  16. http://wolomarketing.com One the desktop, I have a checkerboard pattern set up with two columns and four rows. Navy | Light Blue *Light Blue | Navy Navy | Light Blue *Light Blue | Navy * Class name: .row-reverse On the phone, it shows as one column as... Navy Light Blue Light Blue Navy Navy Light Blue Light Blue Navy I would like it to show up as... Navy Light Blue Navy Light Blue Navy Light Blue Navy Light Blue This was my last effort at reordering the DIVs. The DIVs leading with Light-Blue has a class name of row-reverse. .row-reverse < .span_12 { display: flex; flex-flow: row; flex-wrap: wrap; }
  17. I thought I noted that as the trigger, but I guess I didn't.
  18. As always, I appreciate the input from others. At its worst, it teaches me which questions to ask, which is always helpful.
  19. For anyone else who comes across this issue here is the answer: ORDER BY (CASE WHEN s2.use IS NULL THEN s2.school ELSE s2.city END)";
  20. Tags, which initially drive the query, are generated by WordPress via Posts, so at some point I still have to match tag name with school name, and since the tags aren't always schools--players too--I have to determine which it is before I can go forward.
  21. Definitely sure. I have triple checked.
  22. OK...I'll likely relent and combine some city/school into school name. Maybe create a trigger in the database. (I guess I could do that.) But check this one out: https://www.courtsideindiana.com/tag/carmel/ Only Hamilton Southeastern has City filled. The rest are NULL, but Zionsville shows up second. WTF? I checked for white spaces in the columns. There appears to be nothing irregular about the data.
  23. I have no problem printing it out how I want it. Asking for help on how to better order/sort it. Order By likely isn't the answer, but creating an array and sorting the array might be. Just not sure of the syntax.
  24. Can't I query it out and sort it on the backend rather than creating all that extra data input? Can't I sort an array? That's what I was seeking initially, trying to get some syntax help.
  25. There are parts of the site regular users don't get to see, and the city breakdown is helpful without it being repetitive.
×
×
  • 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.