Jump to content

Passing PHP variables


sseeley

Recommended Posts

I am trying to pass a PHP variable after the variable has loaded in PHP but nothing is coming through in the alert I have created to test.  If anyone can help I would be grateful.

 

$drawIdR2 = mysql_result($getEntriesRd2,$v,"tblteamevents.fkDrawId");
$teamNameR2 = mysql_result($getEntriesRd2,$v,"tblcompleteddraw.teamName");
echo "<tr>";
echo "<td align=\"left\" valign = 'top' width = '100' height = '20' style=\"font-family:arial; font-weight:normal; font-stretch:wider; font-size:14px; color:Black;\">";
if($i > $numberBys)
{
?>
<head>
<script language="JavaScript">
<!--
	  function myFunction() {
			var alert1 = "<?php echo $teamNameR2; ?>";
			alert("123");
	  }

			//-->
			</script>
	</head>
	<?php
	$drawIdR1 = mysql_result($getEntriesRd1,$xi,"tblteamevents.fkDrawId");
	echo "<a href = 'javascript:myFunction()' style=\"A:link;color:Purple\">";
	//echo "<a href = 'updateElimination.php?eventId=$eventId&ageGroup=$ageGroupId&round=1&drawId=$drawIdR1' style=\"A:link;color:Purple\">";
	echo $teamNameR1 = mysql_result($getEntriesRd1,$xi,"tblcompleteddraw.teamName");
	echo "</a>";
$xi++;

 

Thanks for any help that anyone can help.

Link to comment
https://forums.phpfreaks.com/topic/206656-passing-php-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.