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
Hi, you can try this functionality by using the href in <a> tag as <a href="javascript:functionName(yourModifiedURL)"....>link </a> Code (markup): Upon execution, the javascript function functionName with the URL will be called, where in you can use that to create a new window and then set the received url as its target URL. you can try this one. If you want to have some other javascript functionalities, you may check my blog at : http://www.dsaravanan.wordpress.com/javascript regards, d_s.