Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. 1) Use double quotes for the echoing string so your variables can interpolate. 2) Use single quotes for attributes. 3) You didn't close the 'a' tag with '>'. 4) You can use curly brackets to escape associative arrays. Not tested: echo "";
  2. Almost anywhere, but take a look at this thread: http://www.phpfreaks.com/forums/index.php/topic,54859.0.html
  3. Please read the previous posts before replying.
  4. One more, "Thank you very much!", and you're there.
  5. I share the same feelings. A reminder that you should never use shorthand () PHP tags for a couple reasons but mainly portability. Use full <?php opening tags.
  6. Did you receive and error?
  7. You can just use the more conventional style of UPDATE: UPDATE settings SET`status` = '$status' where id=1 Don't need single quotes around '1', assuming id is an integer.
  8. Change these sections: 1. // Validate the email address: if (!empty($_POST['email'])) { $e = mysqli_real_escape_string ($dbc, $_POST['email']); } else { $e = FALSE; $password = ' You forgot to enter your email address!'; } 2.
  9. Sorry, I don't understand the issue here. Where is the div? You can put HTML in PHP variables and echo it out later if you wish.
  10. He only specified present or past. So I think it's safe to speculate that he doesn't allow users to choose a date in the future, but if he does, then good point.
  11. Welcome, that's great to hear. There are a lot of intelligent and helpful people here.
  12. Checks if $day matches the current day. Something like this: $day = "Monday 29 June 2009"; $now = date("l j F Y"); echo ($day==$now) ? "today" : "not today"; ?>
  13. NP. You probably don't know but there is a "Topic Solved" button in the bottom left.
  14. Read about "interpolation", you were ending your string with the double quote. You can use curly brackets to escape arrays. echo " | edit";
  15. Echo out your variables and queries to see where these variables are being treated as literals. What does the mysql_cleaner() do?
  16. You can name it whatever you want, something that's logical. Remember when you store these values in the database to use these two functions INET_ATON() and INET_NTOA(). One is for inserting the IP and one is for extracting it. Storing IP's as pure VARCHARs would restrict you in certain functionality. Good luck.
  17. How are you inserting this into your DB? I think the cause of the problem is prior to this.
  18. Can you post some code on how you're using this? Sounds like you have interpolation issues.
  19. $_SERVER['REMOTE_ADDR'].
  20. Take out the parenthesis. Read the syntax for updating - UPDATE.
  21. * crickets *
  22. What do you mean remove a row? Why don't you just set the value to the default value, null, blank, etc...?
  23. Well that's not a native function. I don't see any definitions or includes, maybe you're looking for another function?
  24. function seventyFive($bag) { echo $bag * .75; }
  25. No, just remove the semi-colons after the if/elseif statements. You should also indent everything in the blocks like you mentioned.
×
×
  • 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.