I am programming a PHP guestbook for some newbie training. 🙂
Now, what I thought to do was, in a "website" field, link what they typed there automatically when you later read the post. Easy enough, with the variables in a <a href> echo and all. There is one problem, though. If you do that, it links everything, so you just type dkhjfhg as a web and the script links the thing. 🙁
Since the "website" field is optional, and there is a pre-http:// already there, even if they leave it alone, it links too [url]http://,[/url] which is kind of lame 🙁 I thought I'd make the GB so that it detects if there is a proper URL typed, if it is, then link it. But if there is only a "http://" or even a blank field, the script shouldn't link it.
Alas, I have absolutely NO idea how to DO that :rolleyes:
Help is really appreciated, so I can get past this part and continue with more functions for the GB, which I plan to make my project of ascent in the PHP language. 😉