Jump to content

Endrick

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Endrick

  • Rank
    Member
  1. Hello How can i add google recaptcha to this code https://github.com/Tutorialwork/Tutorials/blob/master/PHP Rechtesystem/addnews.php
  2. https://prnt.sc/tv3vpm thats my datatable
  3. $query = 'SELECT * FROM convoy_part WHERE user_convoy= :I'; $start = $bdd->prepare($query); $start->execute(array(':I' => $_GET['id'])); $result2 = $start->fetch(); <div class="col-lg-12"> <div class="block margin-bottom-sm"> <div class="table-responsive"> <table class="table"> <thead> <tr> <th scope="col">#</th> <th scope="col">User</th> <th scope="col">Datum</th> <th scope="col"><a class="btn btn-primary" href="convoy_user.php?id=<?php echo $result2['user_convoy']; ?>&action=part" role="button">Teilnehmen</a></th> </tr> </thead> <tbody> <?php while($result2 = $start->fetch()){ ?> <tr> <th scope="row"><?php echo $result2['id']; ?></th> <td><?php echo $result2['name']; ?></td> <td><?php echo $result2['date']; ?></td> </tr> <?php } ?> </tbody> </table>
  4. Do anyone have an idea how can i fix this
  5. I think you get me wrong, the list has a problem getting the data from the one in the quote. Code of List: <table class="table"> <thead> <tr> <th scope="col">#</th> <th scope="col">User</th> <th scope="col">Datum</th> <th scope="col"><a class="btn btn-primary" href="convoy_user.php?id=<?php echo $result2['user_convoy']; ?>&action=part" role="button">Teilnehmen</a></th> </tr> </thead> <tbody> <?php while($result2 = $start->fetch()){ ?> <tr> <th scope="row"><?php echo $result2['id']; ?></th> <td><?php echo $result2['name']; ?></td> <td><?php echo $result2['date']; ?></td> </tr> <?php } ?> </tbody> </table>
  6. ok changed it but can someone help me with this problem in the quote
  7. https://prnt.sc/tsp8tt whats wrong here. The list get the data from this code $query = 'SELECT * FROM convoy_part WHERE user_convoy= :I'; $start = $bdd->prepare($query); $start->execute(array(':I' => $_GET['id'])); $result2 = $start->fetch();
  8. @jodunno finally can you help me quickly with that $s2 = $bdd->query("SELECT * FROM convoy_part WHERE user_convoy= :I"); $start = $bdd->prepare($s2); $start->execute(array(':I' => $_GET['id']));
  9. works. Thank you very much
  10. yes it works now we just have to add it to my code
  11. if I use this code in an other file, it comes ... https://prnt.sc/tslrop $host = 'localhost'; $yourdbnamevar = 'mytestdb'; $your_db_username = 'root'; $your_db_password = ''; $attributes = array( PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC ); $fake_id = 1; $connection = new PDO("mysql:host=$host; dbname=$yourdbnamevar; charset=utf8mb4", $your_db_username, $your_db_password, $attributes); $query = 'SELECT convoy_name, convoy_organizer FROM convoys where id = :id'; $start = $connection->prepare($query); $start->execute(array(':id' => $fake_id)); $result = $start->fetch(); echo $result['convoy_name'] . '<br>' . $result['convoy_organizer'];
  12. my code looks very similar but something must be wrong https://hastebin.com/daxesemuni.xml
×
×
  • 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.