Topic: DOTmagazine.net programming questions

OK, because i might have more questions in the future while i'm programming DOTmagazine, i thought i might as well make a topic for my DOTmagazine problems in general smile

My first problem here is:
I have a profile page, once i hit the "edit" button the changes has to be submitted and stored in the database.. the user's record has to be updated that is..
well, i'm checking for the website string. If it's not empty and when it does not start with http://, the http:// part has to be added to the string.. this is my code:

if ($website != "" && !stristr($website,"http://") {
 $website = "http://".$website;
}

But somehow it does not work. I just get a blank page sad
It's obvious that the problem is with that code, because when i comment it out the page works again.
I just don't get it, what's wrong with that code??

Re: DOTmagazine.net programming questions

There's an end paranthesis missing in the if condition.

if ($website != "" && !stristr($website,"http://") {

should be

if ($website != "" && !stristr($website,"http://")) {

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: DOTmagazine.net programming questions

whaha...can't believe i missed that, that took me hours to find, and i wouldn't have found it if you didn't tell me, so thanks!! smile