Jump to content

lemmin

Members
  • Posts

    1,904
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by lemmin

  1. Are you running PHP 4? I don't think you can specify function visibility in PHP 4.
  2. Is find_by_sql() returning a User object? It doesn't look like it since you are calling array_shift() on it, which is also confusing. Using array_shift() like that will just return the first value of the array. Is that your intention?
  3. Post the code where you set the cookie and also where you look for that cookie.
  4. Assuming label_part() returns a file resource, the only problem I can guess is that you don't have rlpr installed on the windows machine. That certainly isn't a native function. Windows DOES have the native function, print: Prints a text file. PRINT [/D:device] [[drive:][path]filename[...]]
  5. Does find_by_id() return a User object?
  6. I think you want the value of the select element, not of the option. You should be able to just do this: $('#textboxdip'+counterdip).val($('#Diplomes').val())
  7. It looks like you only have one database, but both your forum and wiki sites should have a separate database. I would create a new database for the wiki. I'm not sure if it installs the database itself or if you import the tables, but if it's the former, it is likely skipping over that step since the database is NOT empty.
  8. If the user checks "Remember Me," set a cookie that will never expire with his username and a unique token that you can store on your server and check authenticity. When the user leaves for a while, his session might time out, but when he comes back, you can log him back in automatically if the token matches what you stored for him. http://us3.php.net/manual/en/function.setcookie.php
  9. I'm guessing you never configured the database on your live server. Does your host provide you with access to an SQL database?
  10. My guess is that the code you put in for auto-suggest is actually using a different element than the original #product_id. jQuery makes it impossible to find out where the error happens so you just have to start error-tracing. Stick an alert on the first line of your #product_id.change() function and see if it fires. If it does, keep moving it down. If not, I think your auto-suggest code needs to be looked at again.
  11. Is $label a file resource when it is passed? Is ics_select() your own function? What does it do? popen() should be returning a resource with the (error) message from your command. Print out the result to see that message.
  12. Assuming the title and description are stored in the database as "title" and "description," you can access the same way you do the album_id: echo '<h2>'.$row['title']</h2><p>'.$row['description'].'</p>';
  13. I believe you've just described caching Take a look at Memcached: http://memcached.org/ http://php.net/manual/en/book.memcache.php
  14. Unless you are referring to the link to his website, no. Where do I find that? If you ARE referring to the link, there isn't much I can gather from the front end about data storage.
  15. I don't understand what your question is. That seems to be exactly what you are doing here: echo '<option value="'.$tier['tier_one'].'" data-cost="'.$tier['tier_one_value'].'">'.$tier['tier_one'].'</option>';
  16. The discrepancy is in one of three variables. You should just print them all out and see if they match the criteria: echo $_FILES['file']['size'].'<br/>'; echo $_FILES['file']['type'].'<br/>'; echo $extension.'<br/>'; Put that after line 21
  17. I can help you if you show me what you need help with. If you don't know where to start, try creating a page with this code: session_start(); print_r($_SESSION); Login to your forum, then navigate to this new page you made. If anything prints out, you have a simple way to access all of those variables from your forum's session. If nothing is there, you will need to research more about how your forum authenticates and stores data.
  18. Includes are done in-line linearly. This means that session_start() isn't being called until AFTER your first access of $_SESSION. In order for the $_SESSION variable to exist, session_start() must be called BEFORE it is accessed.
  19. Are you sure you are including your header in createcat.php?
  20. Though unorthodox and cumbersome, it IS syntactically correct. PHP allows you to put function definitions inside of conditional statements. Thinking about it now, maybe he is not calling the function after defining it. @qwertyportne, Did you replace the call to file_put_contents() with that code? It shouldn't replace the code, but actually be placed above it instead.
  21. Try adding session_start() to the beginning of your file
  22. Assuming your table just has the one field for these values: $q = 'INSERT INTO table VALUES '; foreach ($sm as $value) $q .= '("'.$value.'"),'; $q = substr($q, 0, -1); mysql_query($q); You only need the quotes if the data is a string.
  23. I'm guessing your PHP script doesn't have access to create a new file in the directory specified. You are suppressing errors on the fopen, so it is probably just going to the next statement and returning false. Take the "@" symbol away and see if you get an error.
  24. Ok, try changing the $sql variable to this: $sql = "select * from weight WHERE username = '.$user->username.'";
×
×
  • 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.