Code:
<?
$sql ="
SELECT * from disc_codes" ;
$result4 = mysql_query($sql);
while ($row = mysql_fetch_array($result4)) {
$id=$row['id'];
$vend =$row['vend'];
}
?>
<?=vend?> displays the correct value when placed in the html: (abcde), however:
Code:
<script type="text/javascript">
function calc_disc()
{
if(<?=$vend?> == <?=$vend?>)
{
alert("Values Match")
}
}
</script>
returns an error of:
Error: 'abcde' is undefined
Code: 0
Did I make a typo? Even so, I'd think that because I'm comparing the same 2 things, it'd work.
Last edited by sydcomebak; 06-13-2005 at 09:51 PM..
|