-1
I have a code in PHP and when viewing the page it cuts the text data.
echo '<div id="tabs-2">
<p><b>Ficha de Aptidão Médica:</b></p>
<p>Trabalhador (1) Validade:';
if ($exibe['MedicaValidade'] != '0000-00-00')
{
if (strtotime($exibe['MedicaValidade']) < time())
{
echo '<span style="color:red">'.$exibe['MedicaValidade'].'</span>';
echo 'Anexo :<a href="MostrarMedica.php?id='. $exibe['id'].'"> Ver PDF</a>';
} else {
echo $exibe['MedicaValidade'];
echo '<a href="MostrarMedica.php?id='.$exibe['id'].'"> Ver PDF</a></p>';
}
}
'<p>Trabalhador (2) Validade:';
if ($exibe['MedicaValidade2'] != '0000-00-00')
{
if (strtotime($exibe['MedicaValidade2']) < time())
{
echo '<span style="color:red">'.$exibe['MedicaValidade2'].'</span>';
echo '<a href="MostrarMedica2.php?id='. $exibe['id'].'"> Ver PDF</a>';
} else {
echo $exibe['MedicaValidade2'];
echo '<a href="MostrarMedica2.php?id='.$exibe['id'].'"> Ver PDF</a></p>';
}
}
He shows up like this, disorganized.
I want to put:
Worker (1) Validity: 2014-30-05 Annex: SEE
Worker (2) Validity: 2014-30-05 Annex: SEE
And always show more if the date is different from 0000-00-00
.
Thank you very much. But the one thing that didn’t work out which is when the validity is 0000-00-00 I don’t want it to show anything
– ChrisAdler
Just move inside the if
– gmsantos
This php is no longer used...because you don’t make a php like it should be .. with structure with functions and flames by ajax ;) and put what you want
– usersantos