In web programming specifically? I'd say, make sure you know the fundamentals first and foremost.
As a previous poster said, knowing the HTTP protocol well (RFC2616 - be familiar with RFCs in general) will be important (more than you'd think - a misused verb led to Google's standard webcrawlers hosing a site because said site didn't implement forms/links properly), I'd recommend also getting intimate with some of the other building blocks such as SMTP, POP, FTP, SSL, ... you get the picture. They'll come in handy when trying to piece together/troubleshoot a larger solution.
On top of that, know the roles and differences between different server apps (app servers like JBoss/WebSphere; web servers like Apache, nginx), know at least 2 popular database engines (I personally favour MariaDB and SQLite but that's up to you; you might want to look at PostgreSQL or CouchDB for something radically different), after learning HTML and XML/DOM fundamentals, know about cookies and AJAX specifically (which are part of your HTTP knowledge, but revisit later) and a take a web security course, or at the very least read far and wide on the matter. Someone suggested focusing only on back-end - fine if that's what you want to do, but at least be aware of how things behave in theory on the front end. Again, fundamentals.
After (all) that (a fortnight's worth of reading, not counting any experimentation?), the choice of languages to work with these building blocks is entirely up to you. Most commonly mentioned are PHP and Ruby in different setups (honourable mention to JSP), Perl and Python for CGI and general scripting, Ruby on Rails as language+framework...
When staring out and for longevity, choose fairly popular languages that run in open source runtimes (they're durable, they're documented, there are plenty of communities), and stay nimble with frameworks - a previous ask.slashdot showed how some of them can easily get canned despite a strong user base, and frameworks are just a flavour of the year... more likely than not, someone else (project lead, customer, policy...) is going to tell you what framework to use, so just make sure you've mastered your chosen language set.
For iOS devel you're not going to escape Objective C. Android I understand is purely Java. But most things you're likely to want to do that are web facing, you might as well do in a web page.
And, in general, stay nimble. But you knew that, right?