0
case 'forward':

$id = $_REQUEST['id'];

    $con = mysql_connect('localhost', 'root', '') or die("error in mysql connect");
    mysql_select_db('database', $con) or die ("error in select db");

    if ($con)
    {
            $query = "select * from signup1";
            $runQuery = mysql_query($query, $con) or die("abc");

            while ($abc = mysql_fetch_assoc($runQuery));
            {
                echo "<div>$abc[ID] $id</div>";

            }
    }
break;

------------------------------------------------------------------------
this shows nothing in browser

5
Contributors
4
Replies
30
Views
4 Years
Discussion Span
Last Post by kaustavbanerjee
0

Try echo '<div>'.$abc['ID'].' '.$id.'</div>';

Also, I would recomment $_GET['id'] rather than $_REQUEST

0

You forgot to enclose index name in single quotes. If you want to use double quotes you also have to enclose the array element in curly braces:

echo "<div>{$abc['ID']} $id</div>";

Edited by broj1

0

try this (as others have also suggested)

echo "<div>".$abc[ID].$id."</div>";

Edited by kaustavbanerjee: small change

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.