Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/04/2020 in all areas

  1. Don't use IE? Really. Microsoft doesn't even want people to use IE anymore. I don't think they even install it in Windows anymore. But if you insist, how about a screenshot?
    1 point
  2. If you want to track where someone has been on your site and what path the took, the simplest thing to do is just have some code that runs on every request which captures the current page and stores it into the current session. For example $_SESSION['history'][] = $_SERVER['REQUEST_URI']; Make sure you've started the session, either here or elsewhere. Then when you want to that information, such as in your error handler, just read the current $_SESSION['history'] value and it should contain a list of all the URLs they visited in order from oldest to newest. You might want to enforce a limit on the history so it doesn't grow too large, say maybe only keep the last 50 URLs or so. Personally I've never really needed this kind of information for troubleshooting. Knowing which page the error occurred on and the $_GET/$_POST values is generally enough to resolve any issues.
    1 point
  3. That's why I laid it out the way I did with the comments - so it would be easy for you get the separate feet/inches values if you still wanted to go that way. [edit] Look more closely at my code - you require two substring_index()s to extract the inches. The inner to get the string before the final " and the outer one to get the string after the ' SET feet = substring_index(@height, '\'', 1) * 12 , inches = substring_index(substring_index(@height, '"', 1), '\'', -1)
    1 point
  4. That said, here's a solution INPUT (roster.csv) uniform, firstname, lastname, position, height 101,Freda,Greaves,left out,6'4" 102,Jamie,Oliver,left behind,4'11" SQL LOAD DATA LOCAL INFILE 'c:/inetpub/wwwroot/test/roster.csv' INTO TABLE roster FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 ROWS (uniform, nameFirst, nameLast,position,@height) SET height = substring_index(@height, '\'', 1) * 12 -- feet + substring_index(substring_index(@height, '"', 1), '\'', -1) -- inches TABLE (roster) +-----------+---------+-----------+----------+-------------+--------+ | roster_id | uniform | nameFirst | nameLast | position | height | +-----------+---------+-----------+----------+-------------+--------+ | 1 | 101 | Freda | Greaves | left out | 76 | | 2 | 102 | Jamie | Oliver | left behind | 59 | +-----------+---------+-----------+----------+-------------+--------+
    1 point
  5. You need PHP 5.4+ for short array syntax. Upgrade. 5.3 is dead. 5.4 is dead. Even 5.5 will be dead in a couple weeks.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.