| | #1 |
| Reckless Abandon Join Date: 2013 Location: //localhost
Posts: 821
Thanks: 597
Thanked 446 Times in 289 Posts
|
I've spent the last 4 hours trying to maneuver around a 500 code, to no avail. I'm trying to get the homepage to display the_content() and a paywall page to show the PayPal subscribe buttons and a small blurb of copy. Here's the code I'm using right now: PHP Code: |
| |
| | #2 |
| Reckless Abandon Join Date: 2013 Location: //localhost
Posts: 821
Thanks: 597
Thanked 446 Times in 289 Posts
|
Edit. Figured it out. The { in the first line was throwing me off.
|
| |
| | #3 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Nebraska, USA
Posts: 313
Thanks: 70
Thanked 244 Times in 102 Posts
|
Conditional statements like this... PHP Code: I know that you have gotten this particular issue figured out, but I just want to comment on it because this issue is pretty common. Developers will switch back and forth between the standard and alternative syntax within the same application. They'll have one control statement that uses brackets - the standard control statement syntax... PHP Code: PHP Code: -Noah |
| No Pitch For The Moment - Just A Nice Hello. So... 'Hello' Feel free to PM me if you have any questions about my posts. I'd like to hear from you! | |
| |
| The Following User Says Thank You to noah.whitmore For This Useful Post: |
| | #4 |
| Reckless Abandon Join Date: 2013 Location: //localhost
Posts: 821
Thanks: 597
Thanked 446 Times in 289 Posts
|
That's my problem, I think. I've never actually taken the time to learn the structure of PHP. I've always just hacked code together until I don't get errors lol -- my downfall! Thanks for the in-depth explanation. Do you happen to know a resource tailored to helping beginners get their bearings in PHP? |
| |
| | #5 | ||
| HyperActive Warrior War Room Member Join Date: 2009 Location: Nebraska, USA
Posts: 313
Thanks: 70
Thanked 244 Times in 102 Posts
|
That's how we all start, haha. I wish that someone would have explained a few basic principles to me early on...
First off, people put it down pretty often because they really dumb stuff down, but I really think that w3Schools is a great resource for beginners. They have a pretty good PHP turorial - PHP 5 Tutorial Also, here's one of the tutorials that I used when I first learned PHP - PHP Tutorial - Introduction - it's pretty solid! If you want to get info straight form the source, try out the official PHP documentation's 'PHP: A simple tutorial' - PHP: A simple tutorial - Manual - it gets a little 'wordy' though which is why I wouldn't necessarily recommend it to an absolute beginner. However, after you learn PHP, you will find yourself referencing the official documentation about 100 times each day - PHP: PHP Manual - Manual - there is a search field in the top right corner of the official docs page that you can use to search for specific PHP functions. I must have used that search box 100,000 times by now. - Noah | ||
| No Pitch For The Moment - Just A Nice Hello. So... 'Hello' Feel free to PM me if you have any questions about my posts. I'd like to hear from you! Last edited on 29th Mar 2016 at 07:53 AM. Reason: Just correcting formatting | |||
| |
| The Following User Says Thank You to noah.whitmore For This Useful Post: |
| | #6 |
| Reckless Abandon Join Date: 2013 Location: //localhost
Posts: 821
Thanks: 597
Thanked 446 Times in 289 Posts
|
Right on, gracias! I'm not completely new -- grew up on VB, ASP, HTML, SSI and CSS. Tried learning CGI and Perl then PHP came around and I abandoned it. As far as PHP goes, I dunno what does what, or the syntax to use, so I guess I'm a newb to it lol Finally in a spot where I can devote some hours to actually learning code again. I'd love to be able to crank out SaaS that solve my own problems, then sell them to other people. |
| |
|
| Bookmarks |
| Tags |
| blurbs, conditional, content, statement, switch |
| |