Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by AyKay47

  1. any code?

    Starting from scratch or if I can find one online

    I am pretty sure I am going to make it 2 tables

    One table will have all the info for each day

    the other table will be the view and it will update each day, connected to the first table

     

    so what does this have to do with mysql?

  2. 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?

  3. 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>'; 

  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. Do you have several fields with the same name? That doesn't work. Each field is unique and needs its own name that will then be posted.

     

    Hence, you should neither loop on POST variables. They are atomic strings.

     

    Neither of these statements are true.

    you can have input names in array format, though it's typically avoided.

  8. 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');
    });;

  9. $('.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');
    });;

  10. I am really not trying to be a jerk here. 

     

    The query itself is $strCaptainSearch = "SELECT COUNT(*) FROM captain WHERE username LIKE '%s%%'";

     

    However I did not feel that this part of the code was revelant.  My apologies.  Does this help now?

     

    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.

  11. Thanks AyKay47.

    I do plan on using an external style sheet in my project.

    But my real question is can I style the <td> in the stylesheet or should it be done inline?

     

    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.

×
×
  • 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.