Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. you know - if you want help you have to show us the code.
  2. Just because YOU want to add a new piece of data to your email does not mean you can alter the syntax of the function call. The manual will show you what the arguements of a function are and that's the way it is. To add a piece of information to your email you probably want to put it into your message area. Think about it.
  3. So that means your setting is not taking effect. Have to bring it up with your host. It's not godaddy, is it?
  4. Can't hurt to check your attempt to set it correctly. You can also try this: After the date_default_..... command insert these lines. print_r(phpinfo()); exit(); I would then save this entire script under a new name (in new folder?) and test it out before deleting it. (You don't want the world to see the output of this) Once you have the output onscreen, do a find for 'timezone' and see if your setting appears.
  5. My point was: You should check the outcome of the timezone set command to see if it worked or not. That could explain why your time is off by an hour. The default is UTC (or GMT) and that is probably one hour behind you in Belgium, no?
  6. That setting returns a Boolean value. Test it and be sure it's happening. Does your host allow you to modify the .ini file or are you hosting yourself?
  7. HTH! For future reference (and learning) - you need to study the manual (or some php language reference) and pick up on the syntax errors that were pretty pervasive in your code. The PHP manual is your best reference for looking up on how to use each function in PHP so you should make that link a shortcut cause you will find a need for it constantly. (I still do after almost 4 years of using php.) And most importantly - get rid of any reference to 'MySQL*' functions in your mind. Everything needs to be "mysqlI" or "pdo" now. Good luck in your future devl projects
  8. This is all a guess. But if that is truly the problem (did you installation recently do a major upgrade?), then each file will have to be edited by hand unless you have a tool that will do this for you.
  9. Parms (parameters or arguments) go inside a function call's parentheses. And all arguments are separated by commas.
  10. I'd guess that it is an include (or require) trying to bring in a module repeatedly. Perhaps this is something that changed in a newer version and is now showing as an error whereas it didn't before. Probably have to change all the includes/requires to the "_once" form.
  11. ok - so add "$link" as the only parm to mysqli_error() and as the first parm to the mysqli_query call.
  12. I included a reference to $votes in the query by mistake. It should be "Votes = Votes + 1" still. (is 'votes' really capped in the table?)
  13. So many little things..... 1 - in your connect you had a semi in the middle. 2 - in your connect you are including the dbname, so you don't need to do a select db 3 - your check if 'song' was set had a semi in the middle again. 4 - the code incrementing votes is flawed; you haven't looked up the current value so why add now? 5 - you connected with mysqli but you escaped with MySQL corrected code (hopefully) session_start(); error_reporting(E_ALL | E_STRICT | E_NOTICE); ini_set('display_errors', '1'); .. .. .. $host="localhost"; $user="*****"; $pwd="******"; $dbname="jingleko_reloader"; $link = mysqli_connect($host,$user,$pwd,$dbname) or die(mysqli_error()); $song = mysqli_real_escape_string($link,$_GET['Song']); $songSafeHtml = htmlspecialchars($_GET['Song']); if (mysqli_query("UPDATE voting SET Votes= $Votes WHERE Song = '$song'")) echo "You voted for $songSafeHtml"; else die(mysqli_error()); Please try this verbatim.
  14. turn on php error checking as well. error_reporting(E_ALL | E_STRICT | E_NOTICE); ini_set('display_errors', '1'); Place these right after you session_start line or at the beginning of all of your php code
  15. Besides the previous post, you might make your code easier to read and your (coding) life easier in general if you do this: <div class = 'header'> <?php if (isset($_SESSION['popo']) && $_SESSION['popo'] == "POPO") { echo "<h2><br> POPO IS GREAT </br></h2>"; } else { echo "<h2><br> POPO IS LATE </br></h2>"; } ?> </div> If you simply must intermingle your html and your php, avoiding the on/off on/off on/off method of doing it is easier in general.
  16. You have 3 vars defined that don't connect to anything $ISBN10 $ISBN_Arr $ISBNARR Perhaps that is your problem, or at least the beginning. If you turned on php error checking/display you would probably see some error messages that would help you clean up your code. error_reporting(E_ALL | E_STRICT | E_NOTICE); ini_set('display_errors', '1'); Put this at the top of your script. Be sure to turn off display_errors once you put this into production.
  17. Why do you re-create the array every time you begin???
  18. If you haven't found the sql error yet, may I suggest that you probably can not use DESC when doing ORDER BY RAND(). Logically, how can you have a random sequence, but then say you want it in a specific order?
  19. really? If you need to be taught how to use google to find things, then your php learning curve is going to be a very, very long one. I suggest you give it a try again. Type in "php check for alphabetic".
  20. Have you tried to google this problem? Very first response to a simple search returned the exact php function you need.
  21. If you look at the manual under $_FILES there is a user-added note concerning exactly this issue. Apparently you haven't provided a file to be uploaded, so the FILEs array isn't created.
  22. What is wrong with your NEW code? You didn't tell us. If there is a line number in the message, please indicate that in your next code posting.
  23. 1 - read the rules and post using the proper tags. 2 - how about giving us a couple of your error messages? 3 - php statements must end with a semi 4 - separate your html code from your php code and you won't leave php mode on while you are typing html and vice versa. Coders who mingle html/js/php in their scripts are just asking for pain and confusion.
  24. Can you post all that code so we can see it too?
×
×
  • 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.