0
I’d like to pull some information from my database called "website", inside it would connect to the table: "posts" and in it wanted to show the information as: "id, updated, title, Description, link, image" 3 limit and fit my code. I am using codeigniter.
<div class="blog-item col-md-4 col-sm-6 mb-30" style="position: absolute; left: 0px; top: 0px;">
<article class="post-wrapper">
<div class="thumb-wrapper">
<a href="blog-single-fullwidth.html"><img src="link da imagem.jpg" class="img-responsive" alt=""></a>
</div><!-- .post-thumb -->
<div class="blog-content">
<div class="case-studis-border"></div>
<header class="entry-header-wrapper">
<div class="entry-header">
<div class="entry-meta">
<ul class="list-inline">
<li>
<a href="Link">DATA</a>
</li>
</ul>
</div>
<h2 class="entry-title"><a href="link">Título</a></h2>
</div><!-- /.entry-header -->
</header><!-- /.entry-header-wrapper -->
<div class="entry-content">
<p>Descrição</p>
<a href="link">ler mais</a>
</div><!-- .entry-content -->
</div><!-- /.blog-content -->
</article>
</div> <!-- /.col-md-4 -->
Did you connect to mysql? or is that what you’re wondering?
– rray
That’s what I doubt
– Everton Gouveia
What is the right way to connect to the Mysqli database and Using PDO is the safest way to connect to a PHP BD?
– rray
You need to make a Connection Class; An Example Persistence Class: "Usersby" in this class that will run the "SELECT * FROM USER" query this will depend on which framework you are using, Codeigniter, Symphone, PDO and etc. Then you will have to pass the data to the View. First of all, what PHP solution are you working on? @Evertongouveia
– Diogo Henrique Fragoso de Oliv
I am using codeigniter, but I am very apprentice in php, with a lot of help, I am having other problems with url too
– Everton Gouveia
But I wanted to pull really simply.
– Everton Gouveia