About
Pricing
Community
Teams
Start Free Trial
Log in
doctorbill
asked on
7/31/2015
PHP code IF
This code causes my page to be blank
The correct SQL statements and database connections are in place:
--------------------------
----------
----------
------
<?php if ($row_unpaid['Paid'] == "Paid") {
echo <td colspan="12" align="center" class="body_bold_black"><a
name="paid" id="paid"></a>Invoice Database (paid)</td>; } ?>
<?php if ($row_unpaid['Paid'] == "Pending") {
echo <td colspan="12" align="center" class="body_bold_black"><a
name="unpaid" id="unpaid"></a>Invoice Database (Unpaid)</td>; } ?>
--------------------------
----------
----------
------
PHP
10
4
Last Comment
doctorbill
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Julian Hansen
7/31/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
doctorbill
7/31/2015
ASKER
No error
The page is just blank
doctorbill
7/31/2015
ASKER
If I run your statement the page is still blank
SOLUTION
Ray Paseur
7/31/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
doctorbill
7/31/2015
ASKER
I get this:
Notice: Undefined variable: details in C:\xampp\htdocs\TickTock_i
nt\invoice
Database_p
ending.php
on line 470
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
doctorbill
7/31/2015
ASKER
Thanks Ray - this has sorted it for me
I did not have a variable correctly referenced
SOLUTION
Dave Baldwin
7/31/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
doctorbill
7/31/2015
ASKER
This is now working:
--------------------------
----------
----------
--------
$heading = 'Invoice Database (Unpaid)';
$paidheading = 'Invoice Database (paid)';
<td colspan="12" align="center" class="body_bold_black"><a
name="unpaid" id="unpaid"></a>
<?php if ($row_Unpaid['Paid'] == "Paid") {
echo $heading; } ?>
<?php if ($row_Unpaid['Paid'] == "Pending") {
echo $paidheading; } ?></td>
SOLUTION
Ray Paseur
8/1/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
doctorbill
8/9/2015
ASKER
thanks
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
The page is just blank