Jump to content

scootstah

Staff Alumni
  • Posts

    3,858
  • Joined

  • Last visited

  • Days Won

    29

Community Answers

  1. scootstah's post in Query a MySql Database & Insert Results As a HTML Meta Tag was marked as the answer   
    Add the keywords to an array:
    $keywords = array();

    while($rows2=@mysqli_fetch_array($result2)){
    $keywords[] = htmlspecialchars($rows2['query'], ENT_QUOTES);
    }And then implode it:<meta name='keywords' content='<?php echo implode(',', $keywords);?>'>
  2. scootstah's post in rewrite private directory was marked as the answer   
    Why does it matter if they "know"? If you rewrite it gives false impressions.
     
    But, this is what you want:

    RewriteEngine on RewriteRule ^priv(.*)$ index.php?q=$1 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?q=$1 [B,L,QSA]You can change how you want the parameters to appear to index.php. 
    But for the record, can you expand on this?
    If you are routing things through index.php, then only needs to be visible to the public. The entirety of your application should live behind the document root. That is standard practice and the correct way to do things these days.
  3. scootstah's post in My website can't find my javascript folder was marked as the answer   
    It's part of the default installation, for some stupid reason.
     
    Try running these commands on your server:
    sudo a2disconf javascript-common sudo service apache2 restart
  4. scootstah's post in PHP bootstrap contact form modul help please was marked as the answer   
    Where?
  5. scootstah's post in PDO Update Joined tables was marked as the answer   
    Your schema is a many-to-many relationship between games and categories, meaning that many games can have many categories. In your screenshot though you just have a dropdown, as if to suggest that any game can only have a single category. If that's the case you can remove the JTBL_Game_Category table and simple add a Category_ID field to your TBL_Game table.
     
    As an aside, I recommend you use named parameters in PDO instead of ?'s. Once you have a bunch of parameters it's a huge pain to keep track of the order of them and such.
    $sql = "UPDATE JTBL_Game_Category SET Category_ID=:newCategoryId WHERE Game_ID=:gameId AND Category_ID=:categoryId"; $statement = $db -> prepare($sql); $statement -> execute(array( 'categoryId' => $categoryId, 'gameId' => $gameId, 'newCategoryId' => $newCategoryId, ));
  6. scootstah's post in button events was marked as the answer   
    Seems interesting. This is what I came up with: http://jsfiddle.net/ro79zjhh/
     
    It's a little glitchy, sometimes it just flips with no transition.
×
×
  • 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.