Jump to content

fastsol

Moderators
  • Posts

    827
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by fastsol

  1. I simply added the display and vertical-align attr to your code and tested fine in firefox.

    <div style="height:40px;width:300px;margin-top:15px;clear:both;border:solid;display: table-cell;vertical-align: middle">
            <input type="button" value=" Update Teams " style="">
        </div>
    
  2. You can use the wildcard in front and behind the queried parameter like this

    SELECT * FROM fruits WHERE name LIKE '%a%';
    

    But yes it would return anything with an "a" in it anywhere in the column you're searching.  The other thing that can done is to not send the request to ajax until there is at least 2-3 characters typed so there is a general reference to what they are looking for at that point.  That will also increase the likelyhood of returning more relevant items.

     

    This seems to be similar to what you are trying to do - https://www.youtube.com/playlist?list=PLfdtiltiRHWGJA_SN2O9t5DSlz7PTwAru

  3. Session is the wrong way to do this.  It either won't show anything for someone that doesn't have a valid session going or will show the data of the person viewing as the author, which is obviously wrong.

  4. Simplest would be to store that data in the db when you publish the article.  Then just display it with the other data you already are doing.  Just make sure to set the publish_date column in the db to either datetime or timestamp.

  5. You need to put the mysqli_real_escape_string on the $premio not on the $_POST in the foreach call.

    foreach($_POST['premio']  as $premio){
    echo $premio . '<br />';
    $query1 = mysqli_query($con, "INSERT INTO premio (idPremio, premio, idArtesao) VALUES (DEFAULT, '".mysqli_real_escape_string($premio)."', '$id')");
    }
    
  6. Google searching to help you, I found a couple possibly helpful things. First is a link about a similar question that was asked.

    https://productforums.google.com/forum/?hl=en#!category-topic/customsearch/implementation/FSbNd4JZyws

    Second is info taken from this page https://developers.google.com/custom-search/docs/context

    The part I found useful was this

    "language. Specifies one of the supported languages to display in the user interface. Specifying a language will boost results in that language, but will not filter out results in other languages. If not specified, Custom Search will use en (English). If the value is null, Custom Search will use the language of the locale of your user."

  7. You would also need to make sure when they post a form or something that edits the project info, that you validate before editing said info that the person is allowed to do so. Just because they were allowed to see the page doesn't mean they didn't change a URL car or change a hide field value maliciously before submitting the form. So just like any form, you need to validate their ability to have submitted said form with said info.

  8. I can't speak for many scripting languages besides js and php, but the methodology of how certain values are handled is usually similar amongst languages.  If the value is a number of some kind then usually you can get away with not wrapping it in quotes.  But a string value always needs quotes cause the language won't understand what it is unless it by chance happens to be a standard function or something of the language, which if that happens you're up a creek anyway cause really unexpected things will happen.

     

    It really comes down to experience and lots of failures and making it work.  Once you fail enough and see the kinds of errors that are thrown in your failed attempts, you will start to remember the ways you fixed them and not code that way again (or at least not as much).

  9. I downloaded the new phpstorm 9 trial 2 days ago to see if I like it enough to buy a license.  I am trying to figure out how to have the project files pane on the left indicate when a file has been changed or is different than the web host.  From what I have been reading, this might not be possible, which seems rather dumb as I would think this would be a standard feature of such a high level program.  Also I want to get an additional color theme but the folder you are supposed to put the xml file in is not there in the new 9 version.

     

    I have emailed the support team twice with questions and have not heard back from them, typical.  Another company that wants your money but won't answer a single question you have about said product.  You can call a "sales" person but they're dumb as rocks about actual features or usage.

     

    Any insights?

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