Hellp for php values passing to javascript, so u can create a pop-up window

Discussion in 'PHP' started by bumdeal2, Apr 14, 2010.

  1. #1
    Hey guys i have a php form like so,

    <?php
    include('auth.php');
    include('database_access_param.php');


    $db_link=mysql_connect($hostname, $dbuser, $dbpassword) or die("Unable to connect to the server!");

    $quesid=1; mysql_select_db($dbname) or die("Unable to connect to the database.");
    $cat=movie;
    $totalCorrect=0;

    $ssql="select * from quiz where cat='".$cat."'";
    //echo $ssql."<br>";




    $sresult=mysql_query($ssql);



    print('<html>');
    print('<table class="report" width="50%" border="1" align="center" cellpadding="2" cellspacing="1"');
    print('<body><br><br>');
    print('<head><title>Movies Category</title>');
    print('<form action="ha.php" method="post" onSubmit="return checkme()">');
    print('</head>');




    if(mysql_numrows($sresult))
    {



    print('<tr><th>QuizId:</th><th>QuizTopic:</th><th>PlayGame:</th></tr>');


    while($row = mysql_fetch_row($sresult))
    {
    $qid = $row[0];
    $Quiz_Topic = $row[1];
    $cat= $row[2];
    $score= $row[3];






    echo'<tr><td>'.$qid.'</td><td>'.$Quiz_Topic.'</td><td align=center><a href="index.php?qid='.$qid.'&quesid='.$quesid.'&Quiz_Topic='.$Quiz_Topic.'&totalCorrect='.$totalCorrect.'&boxaction=PlayGame">Play Game</a></td></tr>';









    }

    }
    else
    {
    print('<tr><th colspan=3>No Record Found!</th></tr>');


    }
    print('</body>');
    print('</html>');


    print('</table>');



    i was wondering how youd go about passing the values where the playgame is to a new script that opens a windon pop-up thatll contain the values passed fromt his script.:)thanks
     
    bumdeal2, Apr 14, 2010 IP