Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. So you don't want to use an RDBMS and you want to somehow use cookies to keep track of user uploads. Sounds terribly inefficient and I don't see it working. How will you separate each users pictures if each user does not have a unique id? Where will you store the images?
  2. You are already inside php tags, you don't need them again.' You need to concatenate the array value since the single index quotes will break the string. $ext = ' <form action="/members/clubs/view-activity.php" method="post" name="venuefrm"> <button type="submit" id="close" class="link"><span>View Activity</span></button> <input name="activity" type="hidden" value="' . $activites['activityID'] . '" /> </form>';
  3. $HTTP_POST_FILES is deprecated and should no longer be used. Use the superglobal $_FILES array instead. You should be checking for the files existence before attempting to copy it. Also, use move_uploaded_file
  4. Then you really have two options, you can integrate the login.php script into the page that you want to call it from, and simply toggle its visibility onclick (I think xyph was after this solution). Or you can use jquery and the .load() function (using the links I provided) to load the script into a specified element onclick. To use jquery you will need to have the library on your server or link to an external repository (google and several others host the lib).
  5. Oh, you want to simply toggle visibility of a cell? I was under the impression that you wanted to inject a page onclick. My mistake. Disregard my post. If you want the element hidden without it taking up it designated space, use display: none;
  6. Well, there are a few misleading and incorrect posts in this thread. My first reply was to make sure that you were using array names in the inputs. If they were not in array format then the code you posted would have been flat out incorrect. Since they are in array format, only your loop needed changing, as PFM and myself suspected. You can either change <= to <, or set i = 1; When looping arrays, I myself like to set the index to 0 as you have done.
  7. http://api.jquery.com/category/ajax/ particularly, http://api.jquery.com/load/
  8. As I suspected, the names are in array format. Which means if you make the change that PFM suggested, it will add the correct amount of rows. If it doesn't, something else is wrong and you should post the updated relevant code.
  9. No where in the code do I see the variable $default being defined. Judging from the error, I would say that it isn't at all, unless it's coming from the required page.
  10. It has nothing to do with the code that i gave you, it has to do with where you put it.
  11. Neither of these statements are true. you can have input names in array format, though it's typically avoided.
  12. This code makes little to no sense. Why are you treating $_POST values as arrays by using count and sizeof, when they should be strings. Why are you using a loop at all? unless you have multiple <inputs>s will array names. But if you are only expecting one row to be inserted, I'd say that's not the case.
  13. In the click function, change children() back to siblings()
  14. Oh, i wasn't sure which span you wanted it attached to. $('.dragbox') .each(function(){ $(this).hover(function(){ $(this).find('h2').addClass('collapse'); }, function(){ $(this).find('h2').removeClass('collapse'); }) .find('h2').hover(function(){ $(this).find('.configure').css('visibility', 'visible'); }, function(){ $(this).find('.configure').css('visibility', 'hidden'); }) .end() .find('span.handle') .click(function(){ $(this).children('.dragbox-content').toggle(); updateWidgetData(); }) .end() .find('.configure').css('visibility', 'hidden'); });;
  15. $('.dragbox') .each(function(){ $(this).hover(function(){ $(this).find('h2').addClass('collapse'); }, function(){ $(this).find('h2').removeClass('collapse'); }) .find('h2').hover(function(){ $(this).find('.configure').css('visibility', 'visible'); }, function(){ $(this).find('.configure').css('visibility', 'hidden'); }) .end() .find('div.dragbox-content span') .click(function(){ $(this).siblings('.dragbox-content').toggle(); updateWidgetData(); }) .end() .find('.configure').css('visibility', 'hidden'); });;
  16. It is absolutely relevant, using a format modifier inside of a LIKE statement will often produce unexpected results. Try this: $sqlCaptainSearch = sprintf ( "SELECT COUNT(*) FROM captain WHERE username LIKE '%s'", "%" . $strCaptainName . "%" ); I'm actually surprised that your original query didn't throw an error.
  17. i'm talking about most of the document. I want to see the <form> and the js used to submit it.
  18. `timeStart` is either a DATE or a DATETIME type field. Which one is it? Also, make sure that `fkEquipID` and `timeStart` are not ambiguous. Also, use mysql_error to debug the query, assuming your RDBMS is mysql.
  19. sure, there are different ways to go about this, it depends on how many td elements you want to style. You can give each <td> a class and use the external style sheet to style them. e.g external css: td.class { height: 20px; background-color: red; } html: <td class='class'>something</td> just incorporate it into the php loop. If you want to style only one td element, you can substitute class for id.
  20. if you are sure that frm is correct, then the variable is either getting overwritten or is not being injected correctly into the document.forms[] call. Post the entire relevant code.
  21. have you checked to make sure that frm is what you expect it to be?
  22. Handling information from a database is a bit different then grabbing data from a static array. But as to your question, using inline styles should typically be avoided on large scale projects, as this will lead to alot more code then is necessary. Typically you want to use classes and id's to style elements using one ore more external style sheets. The author of this code probably just styled them inline for a quick example.
  23. Obviously the number of rows being grabbed is 1. If this is not what you expect to be returned, then something is wrong with your query. It's hard to help any further without actually seeing the query. What data does the user have to enter in order to login?
×
×
  • 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.