hi all,
i need to print the value in sql2.but it is not printing it. but if i execute the same query in mysql it is giving the value. so please check this.
thank u.

$sql2="select allocatedmemory from projects where projectname='$projectassign'";
    mysql_error();
    $d=mysql_query($sql2);
    $data1=mysql_result($d,0);
     echo '$data1';
$sql2="select allocatedmemory from projects where projectname='$projectassign'";
    mysql_error();
    $d=mysql_query($sql2);
    $data1=mysql_result($d,0);
     echo '$data1';
echo '$data1';

should be:

echo $data1;

Quotation problem.
Use this:
echo $sql2="select allocatedmemory from projects where projectname='".$projectassign."'";

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.