Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Did you read the link? Because if that's really the contents of your file, it's quite obvious where the problem is. Whitespace before <?php.
  2. Typically rather than imploding an array's values and storing it in one row, you would have a new row for each value, and link them back to the parent row with an ID. You also have the foreach() syntax wrong in your example. foreach($array AS $key=>$value){}
  3. In the future, just post the relevant code. The error is telling you it's expecting a mysql resource object, but you have supplied a boolean (true/false). Usually that means your query failed. You'll need to use mysql_error() to get the more useful error message. Also echo out the query to see if the problem is evident there.
  4. Are you saying you want the top 2 for each "supplies" column? If that's not the case, then what you want isn't clear to me anyway.
  5. You assign the result of the query to $task_sum. You never try to fetch a row, and then you try to use $row without creating that variable. Since you are doing a group by, keep in mind that you could get more than one row as the result of this query, so if you just fetch one row and echo it, you don't know what project_name it is with. Turn on error reporting and you should at least get a notice for the $row array.
  6. I've only seen it today and I use Chrome at work. If I get time to go on the forum tonight at home I will use Firefox and try for a while to see if it happens. It did not happen when I was using Safari on my iphone this morning but I was only on for a few minutes so not sure.
  7. Those errors are both from me, so that is correct anyway. I changed my email this morning and then messed up my new password.
  8. Just to add, I did in fact do the clear cookies/cache etc dance. It's happened to me 3 more times. Is no one else having this problem? :/ Weird.
  9. Your function doesn't do anything. It especially doesn't return a value. dbconn($strHostName, $strDbName, $strUserName, $strPassword) will always evaluate to false until you add something to your function, particularly a return statement.
  10. You need to turn error_reporting on in your php.ini, if you don't see errors from this page. $field1 cannot be both an integer and an array. I think you need to read some basic PHP tutorials because you don't seem to understand at all what you're doing.
  11. Google Chrome has JS debugging tools but I don't know how to use them. Hopefully a mod will move this to the right forum and you can get the right help then.
  12. So why would you expect these two lines to echo the SAME number? This is what I mean by thinking it through. Look at what you're doing. Finally, if you don't set up your error reporting, this is the last help I am offering on this post. You can find all of these bugs with proper error reporting turned on, and you would be able to read messages explaining it so no one here has to type them for you.
  13. What happens when you use Firebug to debug it? Do you have a copy of this on a public server?
  14. No. Where you have <td><font face="Arial, Helvetica, sans-serif"><?php echo $field1; ?></font></td> Does that output the IDs as you expect them?
  15. I don't see anywhere where you actually use javascript to create the editor. I'm familiar with tinyMCE more, but you have to have a script that says "make the textbox with the id of X be an editor". If that's not the issue, check your paths. This needs to be moved to third party, and it's definitely not PHP
  16. Twice today I've been logged out while trying to reply to a thread. After the first time I changed my password. It just happened again a moment ago. I remember this being an issue a LONG time ago but this is the first it's happened since I came back, and it's twice in a few hours.
  17. Change: $output_array = array('error' => TRUE, 'message' => 'Incorrect username and password combination!'); To: $output_array = array('error' => TRUE, 'message' => 'Incorrect username and password combination! This was attempt number: '.$failed_logins.' out of '.(int)$this->config->item('failed_login_limit')); And see if you're getting the right number by your count.
  18. Lines 55-71 else { if (!is_numeric($failed_logins)) { $this->session->set_userdata('failed_logins', '1'); } else { $failed_logins++; $this->session->set_userdata('failed_logins', $failed_logins); } $this->users_model->increase_login_attempt($this->input->ip_address(), $post_username); $output_array = array('error' => TRUE, 'message' => 'Incorrect username and password combination!'); if($failed_logins == (int)$this->config->item('failed_login_limit')){ $output_array = array('error' => TRUE, 'message' => 'Your account is currently locked, we appologize for the inconvienence. You must wait 30 minutes before you can login again! An email was sent to the owner of this account! Forgotten your username or password? <a href="forgotusername">Forgot Username</a> or <a href="forgotpassword">Forgot Password</a>'); } } This is the quick/dirty way to fix it IMO. Not tested. I'd suggest turning those error messages into variables or using a templating system.
  19. <td><a href="maint_update.php?id=<? echo $rows['id']; ?>">update</a></td> 1. Don't use short tags, use <?php not <? 2. You don't have $row defined anywhere. 3. You need to turn on error_reporting to E_ALL so you can see this stuff as errors/notices. 4. You have $field1=mysql_result($result,$i,"id"); at the very start of your loop, so you can use $field1. Although you should go through and rename all of those to be USEFUL names, since you can't remember what $field1 is by the time you need it. 5. Look at mysql_fetch_assoc, specifically the examples on that page.
  20. the id is blank in your code because there is no id in your URL, and you're using $id=$_GET['id']. You need to find the code that generated that URL, and look for where the $id is set there. Trace back to where you create it in the first place.
  21. Is it that you don't understand why there is no ID in your URL, or that you don't understand why with a blank ID your query fails?
  22. So you don't see a problem with your URL being "maint_update.php?id=" ??
×
×
  • 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.