Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Is that the entire code? Did you remember to save and upload it if you need to do so?
  2. After $accounts = loadAccounts(); add this line: print_r($accounts); What do you get?
  3. Did you mean to mark this as solved? The error is occurring because that is not a valid key for $_POST. At the top of your page try adding print_r($_POST) and seeing what that array contains.
  4. There's no PHP function inside your string. You have a MySQL function COUNT, but no PHP functions.
  5. Sessions will end when you close the browser, that is the nature of a session. You'll want to store the information in a database on your server.
  6. Good job! functions cannot be inside of strings, otherwise they are just text. Variables ($var) can be inside of a double quoted string, but not a single quoted. Speaking of which, best practice would be to have your query in single quotes. Even better, if you know $id should be an int, use something like intval() rather than the escape string function.
  7. This is basic error checking. You've concatenated your string correctly in one spot, and not the other. You can't just put a function next to a string without concatenating it.
  8. What you're describing would be done with HTML/Javascript, not PHP. PHP has no control over this. You may want to look at the content of the html file it is saying to use as the template.
  9. you don't even need to select that value, you can increment a value by using the column name. After they have successfully logged in, UPDATE `loggedInTimes` = `loggedInTimes`+1 WHERE userID = x
  10. Well look at it. why is your order by black and the rest of your query orange?
  11. Because now you just have random characters outside of your string. Look at it carefully. It may help if you use an editor with syntax highlighting.
  12. You create $day on the line right before your output. $day = date("z"); echo "<p>“".$lines[$day]."”<p>\n"; You'll need to put your code in that area that checks if a day was sent in the URL, and if not use the current day.
  13. So, try it and then when you get stuck ask for help. You haven't posted any code to debug.
  14. The order should be at the end of the query
  15. iframes have not been "best" since 1993. You can do horizontal scrolling effectively with javascript, but really, there's rarely a reason to do so. You might want to post for Design/HTML/CSS help in creating a more effective design?
  16. You'll need to post more information. You can use PHP and HTML to upload any type of file. What are you trying to do with it afterwards?
  17. Is it possible for you to restructure your arrays, when you select them from their source (I assume a DB) so the array key IS the id? Also if you're selecting these from a DB, you could save a lot of work by using a JOIN.
  18. Why not this? UPDATE table SET graded_on = NOW() WHERE event_status = 'Final' AND graded_on = '0000-00-00 00:00:00'
  19. 1. Please see below. 2. What you want to do is incredibly vague. What if someone enters 44? Do they want the house number, or the number of visits?
×
×
  • 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.