Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: T_ELSE Error - Blind to where i'm going wrong

Started 3 weeks, 6 days ago by ProcalX
Hi, I have this code with an SQL query that i've written. I'm tired and can't see where i'm going wrong, i'm getting a "T_ELSE" error on the first else command before the loop starts. I'm pretty sure it's to do with my structure of opening and close correctly. If someone could point out where i've gone wrong and possibly what to look out for I would be very greatful. PHP Code:...
Site: PHPBuilder.com  PHPBuilder.com - site profile
Forum: Newbies  Newbies - forum profile
Total authors: 3 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: phpbuilder.com

Other posts in this thread:

laserlight replied 3 weeks, 6 days ago
Indent your code properly and the mistake should become obvious In particular, each else block should be indented at the same level as its corresponding if block.

Kudose replied 3 weeks, 5 days ago
I agree with laserlight, but if it isn't obvious ... why do you have two else's and one if?

ProcalX replied 3 weeks, 5 days ago
Can you please point out to me where i'm going wrong, I can't see it and need someone to tell me idiot proof descriptions of what I have done wrong and the way I should be doing it?

laserlight replied 3 weeks, 5 days ago
This is your code when it is indented more sensibly: PHP Code: <?php $conn = mysql_connect ( "localhost" , "1234" , "1234" ); mysql_select_db ( "12345" ); $id = $_POST [ "id" ]; $t = $_POST [ "song" ]; $a = $_POST [ "artist" ]; $y = $_POST [ "year" ]; $q = $_POST [ "quantity" ]; $p = $_POST [ ...

 

Top contributing authors

Name
Posts
laserlight
2
user's latest post:
T_ELSE Error - Blind to where...
Published (2009-11-09 13:37:00)
This is your code when it is indented more sensibly: PHP Code: &lt;?php $conn = mysql_connect ( "localhost" , "1234" , "1234" ); mysql_select_db ( "12345" ); $id = $_POST &#91; "id" &#93;; $t = $_POST &#91; "song" &#93;; $a = $_POST &#91; "artist" &#93;; $y = $_POST &#91; "year" &#93;; $q = $_POST &#91; "quantity"...
ProcalX
2
user's latest post:
T_ELSE Error - Blind to where...
Published (2009-11-09 12:05:00)
Can you please point out to me where i'm going wrong, I can't see it and need someone to tell me idiot proof descriptions of what I have done wrong and the way I should be doing it?
Kudose
1
user's latest post:
T_ELSE Error - Blind to where...
Published (2009-11-09 01:03:00)
I agree with laserlight, but if it isn't obvious ... why do you have two else's and one if?

Related threads on "PHPBuilder.com":

Related threads on other sites:

Thread profile page for "T_ELSE Error - Blind to where i'm going wrong" on http://www.phpbuilder.com. This report page is a snippet summary view from a single thread "T_ELSE Error - Blind to where i'm going wrong", located on the Message Board at http://www.phpbuilder.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity