refiking Posted June 22, 2008 Share Posted June 22, 2008 I'm sure this is simple, but I can't find anything wrong. I run the script and the screen is blank. No error message or anything. Please help. <?php //news.php $stories = $_GET['num']; Echo $stories; $news1 = '<p><b>Lehman Brothers CFO and COO Resign With Stock Down 32% in a Week<br></b>A pair of top executives at Lehman Brothers have resigned with shares of the company in freefall. Shares of the company are trading down 3% to $22.87 ahead of the open.<a href="/newsletter/latenews.php"> more ...</a></p>'; $news2 = '<p><b>Treasury's Paulson Says More Liquidity to Financial Institutions to Come</b><br>Speaking at the Women in Housing & Finance's annual meeting in Washington, D.C., Treasury Secretary Henry Paulson said that the U.S. may have to offer more liquidity to more institutions in the future.<a href="/newsletter/latenews.php"> more ...</a></p>'; $news3 = '<p><b>Lehman Brothers CFO and COO Resign With Stock Down 32% in a Week<br></b>A pair of top executives at Lehman Brothers have resigned with shares of the company in freefall. Shares of the company are trading down 3% to $22.87 ahead of the open.<a href="/newsletter/latenews.php"> more ...</a></p>'; $news4 = '<p><b>Treasury's Paulson Says More Liquidity to Financial Institutions to Come</b><br>Speaking at the Women in Housing & Finance's annual meeting in Washington, D.C., Treasury Secretary Henry Paulson said that the U.S. may have to offer more liquidity to more institutions in the future.<a href="/newsletter/latenews.php"> more ...</a></p>'; $news5 = '<p><b>Lehman Brothers CFO and COO Resign With Stock Down 32% in a Week<br></b>A pair of top executives at Lehman Brothers have resigned with shares of the company in freefall. Shares of the company are trading down 3% to $22.87 ahead of the open.<a href="/newsletter/latenews.php"> more ...</a></p>'; IF ($stories == 1){ Echo $news1; } IF ($stories == 2){ Echo $news2; } IF ($stories == 3){ Echo $news3; } IF ($stories == 4){ Echo $news4; } IF ($stories == 5){ Echo $news5; } IF ($stories == 22){ Echo $news2.$news3; } IF ($stories == 23){ Echo $news3.$news4; } IF ($stories == 24){ Echo $news4.$news5; } ?> Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted June 22, 2008 Share Posted June 22, 2008 it should be if not IF and echo not Echo Quote Link to comment Share on other sites More sharing options...
webent Posted June 22, 2008 Share Posted June 22, 2008 I noticed that you weren't escaping some of your hashes in your text... didn't really look at much else. Quote Link to comment Share on other sites More sharing options...
refiking Posted June 22, 2008 Author Share Posted June 22, 2008 I noticed that you weren't escaping some of your hashes in your text... didn't really look at much else. How do I escape the hashes? Quote Link to comment Share on other sites More sharing options...
webent Posted June 22, 2008 Share Posted June 22, 2008 $news2 = '<p><b>Treasury\'s Paulson Says More Liquidity to Financial Institutions to Come</b><br>Speaking at the Women in Housing & Finance\'s annual meeting in Washington, D.C., Treasury Secretary Henry Paulson said that the U.S. may have to offer more liquidity to more institutions in the future.<a href="/newsletter/latenews.php"> more ...</a></p>'; Put a \ before ' whenever they are inline text... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.