0
I have a Mysql table called Plans with the fields:
Which is a table of subscription plans of a website, the final template is as shown in the following image:
Where:
- name = Name of Plan
- op1 = First advantage of the plan
- op2 = Second advantage of the plan
- op3 = Third advantage of the plan
- price = plan price
I need to print this information from the Plans table in this HTML, with the same design (CSS) using PHP. Follow the HTML code of this price table, without this link only HTML:
<div class="row">
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="table_three">
<div class="price_table">
<div class="price_table_inner">
<div class="price_header color_carrot">
<h3>Iniciante</h3>
<p>Para Vovós Cozinheiras Iniciantes</p>
<div class="ribbon">HOT</div>
</div>
<div class="price color_carrot2">
<h1>R$ 10,00</h1>
</div>
<div class="service_list">
<ul>
<li>10 créditos de anúncio</li>
<li>Equivalente à 10 compras</li>
<li>Não há validade de expiração dos créditos</li>
</ul>
</div>
<form action="login.html" method="POST">
<input type="submit" value="Investir Agora" name="buy" class="btn color_carrot3" />
</form>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="table_three">
<div class="price_table">
<div class="price_table_inner">
<div class="price_header color_amethyst">
<h3>Intermediário</h3>
<p>Para Vovós Cozinheiras já com clientela</p>
<div class="ribbon">HOT</div>
</div>
<div class="price color_amethyst2">
<h1>R$ 30,00</h1>
</div>
<div class="service_list">
<ul>
<li>30 créditos de anúncio</li>
<li>Equivalente à 30 compras</li>
<li>Não há validade de expiração dos créditos</li>
</ul>
</div>
<form action="#" method="POST">
<input type="submit" value="Investir Agora" name="buy" class="btn color_amethyst3" />
</form>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="table_three">
<div class="price_table">
<div class="price_table_inner">
<div class="price_header color_sunflower">
<h3>Premium</h3>
<p>Vovós Cozinheiras Premium</p>
<div class="ribbon">HOT</div>
</div>
<div class="price color_sunflower2">
<h1>R$ 99,00</h1>
</div>
<div class="service_list">
<ul>
<li>100 créditos de anúncio</li>
<li>Equivalente à 100 compras</li>
<li>Não há validade de expiração dos créditos</li>
</ul>
</div>
<form action="#" method="POST">
<input type="submit" value="Investir Agora" name="buy" class="btn color_sunflower3" />
</form>
</div>
</div>
</div>
</div>
The difficulty is that I want to keep the different colors for each print.
– Ramos
I’ll try here and mark if it worked....
– Ramos
I hadn’t really noticed that, but it’s easy to do.
– Inkeliz
I edited to change the color in each "block".
– Inkeliz
My connection uses $Pdo = new PDO and is giving the error " Warning: mysqli_query() expects Parameter 1 to be mysqli, Object Given in C: wamp64 www temp loja_cook.php on line 109" which is in " $planes = mysqli_query($Pdo, $query);"... I don’t know what error this @Inkeliz is
– Ramos
If you use PDO you cannot use
mysqli_
, use the equivalent of PDO, which is$PDO->query()
and the like.– Inkeliz
How can I pick the selected item from the button?
– Ramos
You can take the
$id
and create ainput
of the kindhidden
and get this on the other page, I edited for that, anyway.– Inkeliz