ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Awesome, I tried the nl2br tag (sorry, it seemed the easiest lol) and it worked.
Now, another question begs to be asked. When I try to translate HTML into plaintext, I'm using the code
However, this code results in this on the actual posting page:
Warning: No ending matching delimiter '>' found in /drive2/fpgshttpd/speakfree/forum/replyinsert.php on line 156
Now, remember, I don't want to DELETE the tags, I want to simply make them so a browser won't recognize them as tags. I thought that replacing the < symbol with it's HTML code would accomplish that... but apparently it doesn't.
Edit: Also, you are still using preg_replace in that but not using a regular expression for your pattern. Either convert that to a regular expression or use str_replace. Or maybe there is some other sort of HTML encoding function in PHP as well.
Now, here's the thing. I have this forum and I want people to have the ability to upload their own avatar. I want the avatar to be stored in an SQL table, but I don't think this is at all feasible. I saw something about the SQL type "blob" being able to hold images and such, but if I wanted to make a table like
USERNAME | AVATAR
and have AVATAR actually hold the physical image rather than a link to the image, would that be possible at all? And what about delivery to the HTML page? Could a PHP variable be an image? I'm just so confused about how to make this work effectively. If you have any idea at all, please let me know
To display the image you probably want to create a second php file called "avatar.php" which is called from the image's src tag and takes a parameter like "user=123", you can then lookup user 123's image and send it back to the browser.