php - How do i get databasevalues in my website by using a var? -
we doing project using flipcards show questions , flip on see answer. have use database , managed add category , questions , answers database.
but want questions , answers out of database , place them on our flashcards. cant seem right.
this have :
index.php
foreach($acategories $acategory) { $name = $acategory['id']; echo "<div class='col-md-3 col-xs-6'><a href='/oefenen/vraag-1' name='$name' class=\"btn btn-info\">".$acategory['name']."</a></div>"; }
oefenen_controller.php
public function indexaction() { $odatabase = new database(); $this->userloggedin(); $acategories = $odatabase->getcategories(); $this->set("acategories", $acategories); $avragen = $odatabase->getvragen(); $this->set("avragen", $avragen); }
in index.php tried use name='$name' values out of database, doesnt seem work. on our cards shows hard coded questions used examples, not questions try out of database.
is there understands our question , knows how ? or maybe can on our way ?
Comments
Post a Comment