crossfuse Posted March 3, 2009 Share Posted March 3, 2009 okay i'm learning PHP in my college class and i'm making a program as an assignment and well...it's quite frankly pissing me off that's the website to the program and can someone point out my problem? http://cpsc.maconstate.edu/students/justin.ham/debt.html <html> <body> <title>Debt</title> <?php $debt = $_POST["debt"]; $income = $_POST["income"]; $totdebt = $_POST["totdebt"]; { $totdebt = ($debt / $income) * 100 ; if ($totdebt < 15); { print ("Credit is approved."); } elseif ($totdebt < 30); { print ("Credit is borderline."); } elseif ($totdebt > 30); { print ("Credit is NOT APPROVED."); } } ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/147812-solved-syntax-error-parse-error-help/ Share on other sites More sharing options...
Maq Posted March 3, 2009 Share Posted March 3, 2009 Take the ; out of the end of your if statements... i.e. if ($totdebt should be: [code]if ($totdebt You also have random '{' after your $todebt variable, the closing one as well. Quote Link to comment https://forums.phpfreaks.com/topic/147812-solved-syntax-error-parse-error-help/#findComment-775849 Share on other sites More sharing options...
crossfuse Posted March 4, 2009 Author Share Posted March 4, 2009 Awesome! That actually WORKED!! lol Thanks buddy Quote Link to comment https://forums.phpfreaks.com/topic/147812-solved-syntax-error-parse-error-help/#findComment-775932 Share on other sites More sharing options...
Maq Posted March 4, 2009 Share Posted March 4, 2009 Awesome! That actually WORKED!! lol Thanks buddy np, with a syntax highlighter it would be a lot easier to pick up on these kind of errors. Please mark as [sOLVED] Quote Link to comment https://forums.phpfreaks.com/topic/147812-solved-syntax-error-parse-error-help/#findComment-776004 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.