good day to all, 
Sir/Madam my $_GET['criteria_id']; not working, cant display.

////// this is the code i use to display the data from table "criteria" and the colum are: [criteria_id, criteria] and the name of my database: autotab 

<?php
            require_once 'connect.php';
            $idz=$_POST['criteria_id'];
            $wh=mysql_query("select * from criteria");
            while($loop=mysql_fetch_array($wh)){
                $ca=$loop['criteria_id'];

                echo    
                        '<div class="loop"><a href="?cont=ssw.php&id='.$loop['criteria_id'].'">'.$loop['criteria'].'&nbsp;.'.$loop['criteria_id'].'</a></div>';

            }    //the <a href=""></a> is good but when i click it to call the ssw.php which i want this criteria_id and criteria will display to the page ssw.php it doesn't work.
            ?>
///////////////// please take a look of this code below of home.php and ssw.php ///////////////

-----------
home.php -code.

<?php session_start();?>
    <?php
        if(isset($_GET['cont'])){
            $Cont=$_GET['cont'];
        }
        else $Cont='home.php';
    ?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Araw ng Talusan - Beauty Pageant</title>
</head>

<style>
body{
    margin:0;
    padding:0;
    background:#000;
}
div .loop{
    background:#333;
}
div .loop a{
        color: #fff;
        text-decoration: none;
    }
         div .loop a:hover{
        color:#0C3;

        font-size:13px;
    }
    div .side{
            background:#333;
            color:#0C3;
            text-decoration: none;
            font-size:13px;
    }
    div .side a{
         text-decoration: none;
         color: #fff;
    }
    div .side a:hover{
          color:#0C3;
        }


</style>

<body>
<div id="table" style="padding:20px; table-layout:auto; background:#181818">
<table width="100%" align="center" bgcolor="#fff">


        <tr>
            <td valign="middle" bgcolor="#339999"><div class="araw" style="padding:10px"><h1 style="color:#BBB">Search for Miss Araw ng Talusan 2014</h1></div></td>
            <td valign="middle" width="150px" bgcolor="#000000">
            <div class="wel" style="padding:10px 0 0 0; width:150px; color:#FFF" align="center">Welcome Admin:</div>
            <div class="jud" style="padding:0 0 10px; width:150px" align="center"><h3 style="color:#FFF">#1</h3></div></td>
        </tr>

            <tr><td colspan="3"> <div class="head" style="border-bottom:dotted thin #000"> </div></td></tr>

        <tr>
        <div class="cont"><td valign="top" align="center" style="height:480px; background:#fff; padding-right:5px; padding-left:5px; padding-bottom:5px; padding-top:3px">
            <?php require_once $Cont; ?>
        </td></div>

        <td bgcolor="#ffffff" valign="top" style="overflow:scroll transparent; font-size:12px">
        <div class="side" style="background:#666; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #fff; border-left:dotted thin #010">
            <a href="?cont=candidates.php">Add Candidates</a></div>
        <div class="side" style="background:#666; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #fff; border-left:dotted thin #010">
            <a href="?cont=category.php">Add Category</a>
        </div>
        <div class="side" style="background:#666; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #fff; border-left:dotted thin #010">
            <?php
                                                    require_once 'connect.php';
                                                    $resz="select * from judge";
                                                    $ersz=mysql_query($resz);
                                                    $susz=mysql_num_rows($ersz);

                                                    echo '<font color="yellow">'.$susz.'</font>';
                                                ?>&nbsp;<a href="?cont=judge.php">Add Judge</a></div>

        <div class="side" style="background:#666; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #010; border-left:dotted thin #fff">
        <?php
                                                    require_once 'connect.php';
                                                    $re="select * from criteria";
                                                    $er=mysql_query($re);
                                                    $su=mysql_num_rows($er);

                                                    echo '<font color="yellow">'.$su.'</font>';
                                                ?>&nbsp;Select Category<font color="#00CC33">&#9662;</font></div>
        <div class="list" style="background:#fff; text-align:right; padding-right:5px; border-bottom:dotted thin #010; border-left:dotted thin #010">
            <?php
            require_once 'connect.php';
            $idz=$_POST['criteria_id'];
            $wh=mysql_query("select * from criteria");
            while($loop=mysql_fetch_array($wh)){
                $ca=$loop['criteria_id'];

                echo    
                        '<div class="loop"><a href="?cont=ssw.php&id='.$loop['criteria_id'].'">'.$loop['criteria'].'&nbsp;.'.$loop['criteria_id'].'</a></div>';

            }
            ?>

        </div>
        <div class="side" style="background:#666; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #fff; border-left:dotted thin #010">
         <?php
                                                    require_once 'connect.php';
                                                    $res="select * from contestant";
                                                    $ers=mysql_query($res);
                                                    $sus=mysql_num_rows($ers);

                                                    echo '<font color="yellow">'.$sus.'</font>';
                                                ?>&nbsp;View Candidates<font color="#00CC33">&#9662;</font></div>
        <div class="list" style="background:#fff; text-align:right; padding-right:5px; border-bottom:dotted thin #fff; border-left:dotted thin #010">
            <?php
            require_once 'connect.php';
            $whs=mysql_query("select * from contestant");
            while($loops=mysql_fetch_array($whs)){
                $ca=$loops['con_id'];

    echo    
    '<div class="loop"><a href="?cont='.$loops['con_id'].'">'.$loops['fname'].'&nbsp;'.$loops['mname'].'&nbsp;'.$loops['lname'].'&nbsp;.'.$loops['con_id'].'</a></div>';

            }
            ?>
        </div>

        <div class="side" style="background:#666; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #010; border-left:dotted thin #010">Report</div>
         <div class="side" style="background:#069; color:#FFF; text-align:right; padding-right:5px; border-bottom:dotted thin #010; border-left:dotted thin #010"><a href="home.php">HOME</a></div>
        </td>
        </tr>

</table>

<div class="footer">
<table width="100%" align="center">
<tr>
<div class="1"><td style="color:#EEE; font-size:14px; padding:2px; padding-left:2px">&copy; 2014 - Municipality of Talusan Zamboanga Sibugay. All right reserved</td></div>
<div class="1"><td align="right" style="font-style:italic; color:#EEE; font-size:14px; padding:2px; padding-right:2px">Desgin by: nelbeth3.6.10&trade;</td></div>
</tr>
</table>
</div>
</div>

</body>
</html>
-------

-----
ssw.php -code

<?php  $get_id=$_GET['criteria_id']; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Araw ng Talusan - Beauty Pageant</title>
</head>

<body>
<div class="ssw">
<table>

<tr><td>Category name:&nbsp;<?php require_once'connect.php';


                    $ids=$_GET['criteria_id'];
                    $leave_query=mysql_query("select criteria_id, criteria from criteria WHERE criteria_id='$ids'")or die(mysql_errno());
                    $roww=mysql_fetch_assoc($leave_query);
                    $do_id=$roww['criteria_id'];
                    $tax_dec=$roww['criteria'];


                    echo $do_id;

                ?></td></tr>

<tr>
<td>ID of criteria</td>
<td>Candidate #</td>
<td>Candidate Name</td>
<td>Fitness and Style 40%</td>
<td>Stage Projection 30%</td>
<td>Beauty and Poise 20%</td>
<td>Audience Impact 20%</td>
<td>Total 100%</td>
</tr>

<tr>
<td><input type="text" name="criteria_id" value="<?php echo $do_id; ?>" /></td>
<td><input type="text" name="c_number" /></td>
<td><input type="text" name="c_fname" /></td>
<td><input type="text" name="fs" /></td>
<td><input type="text" name="sp" /></td>
<td><input type="text" name="bp" /></td>
<td><input type="text" name="ai" /></td>
<td><input type="text" name="total" readonly="readonly" /></td>
</tr>

<tr>
<td colspan="7"><input type="submit" name="submit" value="SUBMIT" /></td>
</tr>


</table>
</div>
</body>
</html>
-----
> <?php
> require_once 'connect.php';
> $idz=$_POST['criteria_id'];
> $wh=mysql_query("select * from criteria");
> while($loop=mysql_fetch_array($wh)){
> $ca=$loop['criteria_id'];

I see you are trying to get a post value, but I don't see a form in your code?

Sidenote: The way you are writing your code will make it really hard to debug and troubleshoot. You should think about seperating your html from you php.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.