Jump to content

Sql in homefeatured.tpl


royal27

Recommended Posts

I want to put this in homefeatured.tpl but is not showing me the code

 

 

$coduri = mysql_fetch_array(mysql_query("SELECT codurideaccess FROM marked_cards_factory_product WHERE id_product='".$product.id_product."'"));
if($_POST["codurideaccess"]=="$codurideaccess[0]")
{
echo "something";
}else{
echo "or give error";
}

 

 

i also tried this one but still dont work,how should i do it?

 

<?php
$coduri = mysql_fetch_array(mysql_query("SELECT codurideaccess FROM marked_cards_factory_product WHERE id_product='".$product.id_product."'"));
if($_POST["codurideaccess"]=="$codurideaccess[0]")
{
echo "something";
}else{
echo "or give error";
?>

Edited by royal27 (see edit history)
Link to comment
Share on other sites

could you give an example?I want something like this

 

$coduri = mysql_fetch_array(mysql_query("SELECT codurideaccess FROM ps_product WHERE id_product='".$product.id_product."'"));

if($_POST["codurideaccess"]=="$coduri0]")

{

echo "Here will be the add to cart button";

}else{

echo "here will be the access form for enter the code";}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...