Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
06-14-2022, 01:26 PM | #1 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 771
|
If statement problem :(
Quote:
All Im trying to get it to do is still display the name, just remove the href link if no website is included in the DB |
|
06-14-2022, 01:34 PM | #2 |
Bollocks
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
|
Because if the condition in the if statement is false, none of the code inside the curly braces will execute.
__________________
Interserver unmanaged AMD Ryzen servers from $73.00 |
06-14-2022, 01:35 PM | #3 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 771
|
Gotcha, thank you!
|
06-14-2022, 01:37 PM | #4 |
Bollocks
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
|
BTW, rather than writing
Code:
<?php echo $website; ?> Code:
<?=$website;?>
__________________
Interserver unmanaged AMD Ryzen servers from $73.00 |
06-14-2022, 01:43 PM | #5 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 771
|
Quote:
I was actually going to post in a few weeks to see where I could shorten some of the code I'm using on my admin system and I'm sure its over-inflated, but I need to get things finished up with it first. |
|
06-14-2022, 02:20 PM | #6 |
I'll make you famous
Industry Role:
Join Date: Oct 2002
Posts: 13,947
|
Be careful using short codes. They require an ini setting that is not always turned on. So code that works on one server may not work on another.
It can also lead to some issues when dealing with xml which also uses an <? ?> Syntax. . |
06-14-2022, 03:47 PM | #7 | |
Bollocks
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
|
Quote:
The short echo tags <?= ... ?> are not dependent on an ini setting https://www.php.net/manual/en/langua...ax.phptags.php and there's no proposal to deprecate them. They are actually line 1 of the PSR-1 coding standard https://www.php-fig.org/psr/psr-1/ Not that anyone actually follows that...
__________________
Interserver unmanaged AMD Ryzen servers from $73.00 |
|
06-14-2022, 04:04 PM | #8 | |
I'll make you famous
Industry Role:
Join Date: Oct 2002
Posts: 13,947
|
Quote:
Interdasting. I learn something new about every 2 minutes. Thanks for that. . |
|