Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. You are asking to include a filename of db.php in a folder above your current one. Yet - you are showing us the contents of your root folder. Isn't the db.php supposed to be one higher?
  2. Tell us what happens with your code. Show us your code in these particular areas. Add some debugging to help you diagnose the problem (echo statements!). Help us to help you. Your saying that something "can't proceed' or "can't show" is not at all helpful. Do some work on your own to find out why things aren't happening. That's how a programmer makes things happen.
  3. People here don't like clicking on things that they don't know. That's why you need to post the code that your errors are in. Usually the line number in the error message will help you locate that area.
  4. How about this: foreach ($data as $value) { if (!is_null($values['DateBooked'])) $db = date('d-m-y',strtotime($values['DateBooked'])); else $db = ''; // Now use $db to output your date booked entry $training .= '......
  5. I don't see where you have started to use is_null.....
  6. For the benefit of others who may come here with the same problem - how about telling us what your solution was?
  7. You have a different type of array in #2. Have to modify your code to be more flexible. Good luck. I haven't the time to do your homework for you.
  8. Blocked? Look closely at your expression contents. Then figure out what level of that multi-dimension array you want to access. You are currently assuming that $i has numeric indices. No. It has 2 named elements - 'type' and 'children'. Work with that knowledge
  9. Yes? What is your question? And - is this some kind of homework? My guess is you access an array with php code. Have you written any yet this semester? PS - are you studying recursion at this time?
  10. You never get back your money that you wagered. So what you are using as an example is NOT correct still. If the odds are 2 to 1 that means you win twice as much as you bet. So the result is 100 But in actually all you did was get your money back and a 50 profit which is a 1 to 1 bet, not 2 to 1. So if the odds are even (1 to 1), what do you get back? Just the 50 that you bet? Are you sure about this? What county is there, cause I never want to gamble there!
  11. Over and over you keep saying the wrong numbers. If you bet 50 and win, you get back that 50 as well as the winnings. 500 goes down to 450 but if you win you get back your bet as well as the 100 in winnings which yields 600, not 550.
  12. Add "limit 8" to your query.
  13. I kind of thought he was combining logic from what could be different pages into one target page. I was trying to reverse that idea.
  14. Oops - left out a line if ($_POST{'btn'] == 'Do X') { header("Location: DoX.php"); exit(); } if ($_POST['btn'] ..... { header(....); exit(); } You have to an exit after the header call.
  15. Another way of doing it is if you have a list of buttons on your index page then check for the value of the button coming from $_POST in the index logic and do a header command to jump the the appropriate page for that button. Works for me. // we have a post button to check if ($_POST{'btn'] == 'Do X') header("Location: DoX.php"); if ($_POST['btn'] ..... header(....);
  16. It's still a script that won't execute. Look at the first commented out block. At its end there is a block of plain text that php will see as an error since it's not valid code nor is it a comment itself. Plus - it's written horribly. PHP tags all over the place - poor programming skills. You are correct tho. If one knows this squid thing then it may make sense. Perhaps you need to post this on a forum that pertains to squid rather than just plain php to find out how to do what needs to be done.
  17. Obviously without knowledge of this package that you are using how could anyone help you? Besides - looking at this 'script' I don't think it would ever run. It is not written properly since there are lot of non-PHP lines there that are not commented out. And what is with all of the strike-through lines? I would think that if this were really 'the' script, there would be some line somewhere that tells you that something needs to be inserted there. Are you sure you are posting the right thing or have looked hard enough to find that script?
  18. Well I was trying to point out that your option statements have an error in them and was wondering what DID show up on the screen. Do you see the error for page4?
  19. Not sure what you are pointing out. But - does that code display 'page 4'?
  20. Your query is trying to insert 5 values into 4 columns.
  21. Too many questions in one post. #1 - when you have required parms and optional ones, you must declare the required ones first.
  22. A csv file does not produce an array. It is a string with commas. Your upload would produce that file on your server. I was asking what that file really looked like since there seemed to be something wrong with the format. But - if you are not having an issue any longer my work here is done.
  23. The original idea was to have my php script do this thing. I have no access to do windows things on my host's server which is probably not a windows one. Anyway - I think we've beat this topic to death.
  24. I don't do linux so this means nothing to me. Anyway - my host does not provide any interface to cpanel and its cron feature so this idea is not possible. Thanks for the input people.
  25. Perhaps you might try doing the upload and seeing what the contents of the file are.
×
×
  • 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.