Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Ooooh! And the party grows...
  2. Yes - it will throw a 'notice' IF you have that turned on (and you should only during development!) - but it will not cause a conflict. I'll trust the manual until otherwise informed. The second call will not begin a 'new' session. And eventually (hopefully) the poster will learn how to better organize his modules and code.
  3. Not quite correct JustThatGuy. Per the manual - a second session_start call is simply ignored if the session is already begun.
  4. What line is giving you that error? You didn't say.
  5. 1 - I don't do homework for those who plead as you have done. 2 - I don't look at attachments for code since I hate taking those risks 3 - I do however look at code that is properly posted (see forum rules) on the forum and which the poster has made clear what is what and where he/she suspects his difficulty lies. 4 - I don't use bad language.
  6. Homework? Should of gone to class more.
  7. So - this topic is finished? Please post it as answered then.
  8. You are seeing all the <br> tags echoed out first because you inserted them inside an html table. You can't do that. This code: <td>' . $row['Plaats'] . '</td> </tr> <br> THIS IS BAD '; ; THIS IS NOT NEEDED } should be changed to remove the <br> and the EXTRA ; line. <td>' . $row['Plaats'] . '</td> </tr> '; }
  9. You appreciate our attempts to help you but you can't seem to answer any of our questions. Why? I asked you five question and you didn't answer any of them. You just repeated the same message. Try debugging your code by displaying some values instead of doing the redirect. See what your code is seeing instead of just assuming or wondering why it operates the way it does. That's how programmers think and do.
  10. I see we have a failure to communicate here. Good luck.
  11. So? What specifically happens when it "stops working"? Do you have error checking turned on? Do you get a blank screen? Do you get a wrong outcome? What do you see? Help us out here.
  12. echo out your two amounts in the if statement message to be sure they are what you think they are. Show us more of that code that shows us your error checking is on and shows where you have cleaned up the form code and php code around it. Obviously that is important to see and right now it does not make sense as it is being displayed.
  13. I'm not here to analyze your code for whatever you may have changed. Look at your code yourself and see what you changed and put it back and check that it works. Then make little changes and test them out as any good programmer would do until you get the results you desire. Good luck.
  14. 1 - the withdraw function code - is that in test.php? 2 - you say it won't go past the first if statement in the withdraw function, but there isn't anything AFTER the if statement to go after. ?? 3 - the second block of code is so incomplete and full of errors I won't even go into it. Turn on php error checking and re-run it. (see my signature)
  15. You really have to work on communicating better. What did you break? Where did you break it? Change back to your old code ( you did save a previous version?) and make your changes slowly this time.
  16. Your English is confusing me. You seem to be saying that you have code to do these things, but now you say you don't. Let's try this: When you query the db to ascertain if the user is allowed to access your site include the role value/code in that query. If the query proves the login to be correct, you have the role so you can use it in an if statement to make your script go to the correct next page. Try: if ($role==1) header("Location: role1.php"); elseif ($role==2) header("Location: role2.php"); else echo "Invalid role in db"; exit();
  17. When you have a user level you then want to go to that specific page, correct? So - go there! Why the anchor tags? You say you want to send the user to two different urls based on their role. Where is THAT code? Not in what you have posted so far.
  18. So your login credentials get you access to the security database table. Check the value of the role for that user and do your redirect based on that?
  19. My oop is pretty weak but aren't you specifying incorrect var names in your MySQli call? Don't you want $this->mysqli = new mysqli($host, $user, $pass, $name) since those are the vars you bothered to initialize?
  20. You could have shown us the code since that is what you need help with.
  21. While I don't fully understand what your code is doing, I do not see anything regarding your initial question. In what way are you currently controlling who accesses what with this code?
  22. And be sure that you have php error checking turned on. (See my signature)
  23. A completely blank page returned many times indicates a php failure. In development mode you should ALWAYS have php error checking turned on so you can monitor errors in your code and fix them. Try that. (see my signature)
  24. You want to "combine" 3 existing files, presumably containing different html, into one php(?) file? Why not just use some logic to decide which one to include or which one to actually execute? Something like: if ($pass == 1) { // first pass thru this code - show this html echo (stuff) } elseif ($pass == 2) { // second pass - show different html echo (stuff) } elseif ($pass == 3) { // third pass echo (stuff) } else { echo "Invalid pass switch"; exit(); }
×
×
  • 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.