This code runs fine and creates a link for each record in my record set with Name-=”Open” I hard coded the link to point to record 7 but I need to be able to dynamically grab the actual record number. If Name <>”Open” then the cell says “In Progress” without a link.
<td>
<?php
$v1 = $row_Recordset1['Name'];
?>
<?php
if ($v1 =="Open")
{
echo ('<a href="VacationS ignUp.php?Vacat ionID=7">Signup </a>');
}
else
{
echo "In Progress";
}
?>
</td>
Below, I am trying to get it to work where I replace the 7 in the above code with a php call to get the current record number. I want to make a php call to get the record number of the current record in the repeat area. I can’t seem to get the syntax correct when I have a php call inside my php if…else statement the Hyperlink works fine if I test it in the field as a standalone entry. The problem line is highlighted below.
I get a blank page when I run this version. Any help on how to fix this would help me keep some of my hair(-:
<td>
<?php
$v1 = $row_Recordset1['Name'];
?>
<?php
if ($v1 =="Open")
{
echo ('<a href="VacationS ignUp.php?Vacat ionID=<?php echo $row_Recordset1['VacationID']; ?>">Signup</a>');
}
else
{
echo "In Progress";
}
?>
</td>
<td>
<?php
$v1 = $row_Recordset1['Name'];
?>
<?php
if ($v1 =="Open")
{
echo ('<a href="VacationS ignUp.php?Vacat ionID=7">Signup </a>');
}
else
{
echo "In Progress";
}
?>
</td>
Below, I am trying to get it to work where I replace the 7 in the above code with a php call to get the current record number. I want to make a php call to get the record number of the current record in the repeat area. I can’t seem to get the syntax correct when I have a php call inside my php if…else statement the Hyperlink works fine if I test it in the field as a standalone entry. The problem line is highlighted below.
I get a blank page when I run this version. Any help on how to fix this would help me keep some of my hair(-:
<td>
<?php
$v1 = $row_Recordset1['Name'];
?>
<?php
if ($v1 =="Open")
{
echo ('<a href="VacationS ignUp.php?Vacat ionID=<?php echo $row_Recordset1['VacationID']; ?>">Signup</a>');
}
else
{
echo "In Progress";
}
?>
</td>
Comment