Adding extra php parameters for sql -


so im making mini webpage has 8 links, 4 males , 4 females in each has 2 pants , 2 pants. ive made 5 php pages , scripted them, males shirts , pants not work. know can make them work? ill post teedetails.php page code , listoftees.php page code since both pants pages samething.

teedetails:

<?php     $selection = $_get["id"];     mysql_connect("localhost", "root", "");     mysql_select_db("clothesshop");     $sql = "select * tshirts tid=$selection;";     $result = mysql_query($sql);     $row = mysql_fetch_array($result); ?>  <!doctype html> <html>     <head>         <link rel="stylesheet" href="boilerplate.css">         <link rel="stylesheet" href="teedetails.css">         <meta charset="utf-8">         <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0">     </head>     <body>         <div id="primarycontainer" class="primarycontainer clearfix">             <div id="box" class="clearfix">                 <img id="image" src="img/300-lacoste_logo.png" class="image" />             </div>             <div id="box2" class="clearfix">                 <p id="text5">                     <a id="textspan" href="listoftees.php?g=women&c=everyday tees">everyday tees </a><br />                 </p>                 <p id="text6">                     <a id="textspan1" href="listoftees.php?g=women&c=fashion tees">fashion tees </a><br />                 </p>                 <p id="text7">                     <a id="textspan2" href="listofpants.php?g=women&c=corduroy pants">corduroy pants</a><br />                 </p>                 <p id="text8">                     <a id="textspan3" href="listofpants.php?g=women&c=artist pants">artist pants </a><br />                 </p>             </div>             <div id="box3" class="clearfix">                 <p id="text9">                     men                 </p>             </div>              <div id="box4" class="clearfix">                 <p id="text16">                     <a id="textspan4" href="listoftees.php?g=men&c=long sleeve tees">long sleeve tees </a><br />                 </p>                 <p id="text17">                     <a id="textspan5" href="listoftees.php?g=men&c=fashion tees">fashion tees</a><br />                 </p>                 <p id="text18">                     <a id="textspan6" href="listofpants.php?g=men&c=original straight pants">original straight pants</a><br />                 </p>                 <p id="text19">                     <a id="textspan7" href="listofpants.php?g=men&c=cargo pants">cargo pants</a><br />                 </p>             </div>             <article>                 <h1><?php echo $row["tname"]; ?> // <?php echo number_format($row["tprice"], 2); ?>;</h1>                 <img src="img/<?php echo $row["tbig"]; ?>" alt="">             <p id="text14"><?php echo $row["tdesc"]; ?></p>             <p>                 <span class="infohdr">category:</span><?php echo $row["tcat"]; ?>                 <span class="infohdr">colors:</span><?php echo $row["tcolors"]; ?>                 <span class="infohdr">sizes:</span><?php echo $row["tsizes"]; ?>             </p>         </article>     </div> </body> 

listoftees.php: "

<?php     $gen = $_get["g"];     $cat = $_get["c"];     mysql_connect("localhost", "root", "");     mysql_select_db("clothesshop");     $sql = "select * tshirts tgender='$gen' , tcat='$cat';";     $result = mysql_query($sql); ?> <!doctype html> <html>     <head>         <link rel="stylesheet" href="boilerplate.css">         <link rel="stylesheet" href="listoftees.css">         <meta charset="utf-8">         <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0">     </head> <body>     <div id="primarycontainer" class="primarycontainer clearfix">         <div id="box" class="clearfix">             <img id="image" src="img/300-lacoste_logo.png" class="image" />         </div>         <div id="box2" class="clearfix">             <p id="text5">                 <a id="textspan" href="listoftees.php?g=women&c=everyday t shirt">everyday tees </a><br />             </p>             <p id="text6">                 <a id="textspan1" href="listoftees.php?g=women&c=fashion t shirt">fashion tees </a><br />             </p>             <p id="text7">                 <a id="textspan2" href="listofpants.php?g=women&c=corduroy pants">corduroy pants</a><br />             </p>             <p id="text8">                 <a id="textspan3" href="listofpants.php?g=women&c=artist pants">artist pants </a><br />             </p>         </div>         <div id="box3" class="clearfix">             <p id="text9">                 men             </p>         </div>         <div id="box4" class="clearfix">             <p id="text16">                 <a id="textspan4" href="listoftees.php?g=men&c=long sleeve">long sleeve tees </a><br />             </p>             <p id="text17">                 <a id="textspan5" href="listoftees.php?g=men&c=fashion t shirt">fashion tees</a><br />             </p>             <p id="text18">                 <a id="textspan6" href="listofpants.php?g=men&c=original straight pants">original straight pants</a><br />             </p>             <p id="text19">                 <a id="textspan7" href="listofpants.php?g=men&c=cargo pants">cargo pants</a><br />             </p>         </div>         <?php while ($row = mysql_fetch_array($result)) {?>             <article>                 <a href="teedetails.php?id=<?php echo $row ["tid"]; ?>">                 <img id="image3" src="img/<?php echo $row ["tsmall"]; ?>" class="image" />                 <h2 class="itemname"><a href="teedetails.php?id=<php echo $row ["tid"]; ?>"><?php echo $row ["tname"]; ?>"></h2></a>                 <h3 class="price">$<?php echo number_format($row["tprice"], 2); ?>"></h3>                 <p class="desc"><?php echo $row ["tdesc"]; ?>"></p>             </article>         <?php } ?>     </div> </body> </html> 

and yes there women's tag. didn't work on site reason, div id box1 , text 1


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -