Page 2 of 2
Re: "Blonde" question about making posts using PHP
Posted: Mon Sep 22, 2008 7:27 am
by jaoudestudios
I dont think that will be it, as php is happy to have 2
echos on one line as long as there is a semi colon separating the 2 lines of code.
Worth a try though, let us know.
PHP is very forgiving, try Actionscript 3!

Re: "Blonde" question about making posts using PHP
Posted: Mon Sep 22, 2008 7:56 am
by Stryks
Yeah .... these problems can be a pain to see ... but the problem isn't the separation of the lines ... it's in this bit.
The missing single quote makes PHP see something like ...
Code: Select all
'Time2]; echo "</font><br><font color='
... as the array index, so that semicolon is never seen, and because the closing array bracket never gets found it just continues along until it finds the next parsable command, which happens to be the echo on the next line.
At least, that's the way I visualize it when I come across these issues.
But I'd be interested to know if it does actually fix the issue.
Cheers.
Re: "Blonde" question about making posts using PHP
Posted: Mon Sep 22, 2008 12:31 pm
by jaoudestudios
Sorry I did not realise there was a missing quote. Yes that will be the problem! Well spotted

Re: "Blonde" question about making posts using PHP
Posted: Mon Sep 22, 2008 4:26 pm
by phpnewbie3
Thanks Stryks!
Of course everything works now!
If I knew we have to look in the previous line for error not in the one what it says in the error message that would've been spared tons of time to me.
Funny thing is though that when I looked at your first post where you did not shown that specific bit of the line where the ' was missing, I needed to look about 30 secs to realize what is missing. My first reaction was that nothing's missing, lol...
Anyways, now I got a crazy taste to become advanced in time in PHP.
It's just too useful for someone who likes to build his own sites.