Topic: advanced html HELP ME!!!!!!! | |
---|---|
<b style='font-size:16px;'></b><p><form method=POST name=addmsg >
user: <input type="text" name="user"> <br> msg: <br> <textarea style='' rows=5 cols=40 name=message ></textarea> <input type="submit" value="Add My Message"> </form> ^^^HERE IS THE CODE I WANT WHAT IM TRYING TO DO IS TO MAKE MY OWN MESSAGE BOURD FOR MY WEB SITE I AM BUILDING STRAIGHT OUT OF HTML. WHAT I WANT IT A USER BOX THEN A MESSAGE BOX AND WHEN YOU CLICK SUMBIT IT POPS THE USER NAME SAY THEY PUT MIKE AND THERE MESSAGE WAS HI I WANT IT TO PUT IT IN A INDAVIDUALE BOX THAT IS LOCKED FROM TAKING OR CLICKIN ON IT TO PUT WORDS IN IT I JUST WANT IT TO POP IT UP IN THAT LOCKED BOX LIKE THIS USER:MIKE MSG:HI |
|
|
|
CAN ANNY ONE TELL ME HOW TO MAKE THE CODE WORK OR WHO I CAN TALK TO TO FIND OUT HOW TO OR JUST SOMTHING THAT WILL HELP ME??
|
|
|
|
I don't have a clue......but didn't want you to feel ignored
|
|
|
|
sp1d3r,
You will need some sort of database to record the messages or they will be lost. My suggestion is MySQL. http://www.mysql.com/ AddMessage.ASP ================================================================ <HTML> <BODY> <b style='font-size:16px;'></b><p> <form method=POST name=addmsg ACTION="MessageBoard.asp"> user: <input type="text" name="user" VALUE="<%=UserName%>"> <br> msg: <br> <textarea style='' rows=5 cols=40 name=message VALUE="<%=Message%>"></textarea> <input type="submit" value="Add My Message"> </form> </BODY> </HTML> ================================================================ MessageBoard.asp ================================================================ <HTML> <BODY> <% Set MyConn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") MyConn.open "PROVIDER=SQLOLEDB.1;SERVER=<SERVER_NAME>;UID=<USER_ID>;PWD=<PASS_WORD>;DATABASE=<DATABASE_NAME>;" SQL_query = "idbUpdateMessages @ciUser = '" & UserName & "', @ciMessage = '" & Message & "'" Set RS = MyConn.Execute(SQL_query) %> <TABLE> <TR> <TD>USER</TD> <TD>MESSAGE</TD> </TR> <% IF RS.STATE = 1 THEN WHILE NOT RS.EOF %> <TR> <TD><%=RS("USER")%></TD> <TD><%=RS("MESSAGE")%></TD> </TR> <% RS.MoveNext WEND RS.Close END IF MyConn.Close %> </TABLE> </BODY> </HTML> ================================================================ Create a database and insert your database server, user, password and database name into the code above. You will then need to create the stored procedure "idbUpdateMessages" to add the new message and return a full list of all messages in the database. This code was done quickly, it should be a pretty good starting point for you, but it probably won't work without tweaking the database stuff (I've never worked with MySQL). |
|
|
|
sp1d3r:
I think you want to do something like a shout box, is that right? An HTML form like you have provides the user the ability to enter data, but you need a couple of other things to make this work: a processing script, a storage method (flat file or database), and a display script. Following are the basic steps that would be involved once everything is set up: 1. user enters name and message into form, clicks submit 2. form sends data to a processing script (using an "action" attribute in the form tag) 3. script validates data and stores the name and message in a database or flat file 4. script returns the user to the originating page 5. originating page makes a connection to the database or flat file and displays the contents You could also add an Ajax implementation so the update happens without reloading the page, but that's an extra development step. You would probably also want to have a way to purge older messages from the system if you are using it as a shout box. If you want an ongoing message board, then it would make no difference. Depending on who your host provider is, they may have some ready-to-go scripts for bulletin boards. It sounds like this process may be entirely new to you, so that might be a good first attempt. Later, you may want to try writing your own scripts. Many hosting companies provide users with access to scripting languages like Perl, PHP, ASP, etc., and some provide access to databases like MySQL or PostgreSQL. If you have PHP available (for example), but no database, you can save the contents of your message board to a flat file. The downside, however, is that the coding is a bit more elaborate to read and write to a flat file than it is to write to a more formal, structured database. PHP5 is packaged with a database called SQLite — which I've not yet had an opportunity to test — but that might be a simpler option for storing the message data. You can post further questions here, or you can send me a note via the mail feature on JSH if you prefer. |
|
|
|
Oops... Spidercmb beat me to it. I'm not a big fan of ASP (the scripting language Spidercmb uses in his example), but it works. I prefer PHP with MySQL, but that's just my personal bias.
|
|
|
|
resserts,
I work in a Microsoft shop, so I've never had a chance at work to play with PHP. I hear PHP is superior, but ASP is a lot easier for me to work with since I use VB 6 to update legacy apps. |
|
|
|
Yeah, if you're already using VB, then ASP is probably easier to use (probably uses a lot of similar programming structures and so forth). I've used ASP only to fix/modify other people's code, but I found the learning curve to be significantly higher than when I learned PHP, and it seemed that comparable tasks (like sending e-mail) were more verbose in ASP than in PHP. I suspect that ASP has some nice features that I never had a chance to experience (because I don't often need to work in ASP).
I've never used it, but ColdFusion is supposed to be very nice. According to a developer I know, coding in ColdFusion reduced his development time by half or more (depending on the type of application he was developing). The obvious downside to using ColdFusion is price — PHP is free, and ColdFusion costs $1300 for the standard edition and $7500 for the enterprise edition. There is also a developer edition, but I didn't see any pricing for it. |
|
|
|
I would think it would be easier to just implement a pre-written board rather than build one from scratch, since so many are free and have tons of modules available. But, there are a lot of online tutorials and script examples, which is where I learned a lot of the php/mysql stuff.
|
|
|
|
Agreed, LostInIndiana. However, he may need to do some script modification to do exactly what he's trying to do — and he'll still need access to a database (unless the script he uses writes to and reads from flat files). The first things he needs to find out are whether his host provider allows server-side scripting, which (if any) databases are available (as well as the information about how to access them), and whether they have ready-to-go bulletin board scripts that will work for his intended purpose. It sounds to me that sp1d3r is looking to implement something like a shout box rather than a separate, full-fledged bulletin board, which may require cannibalizing a script so it works within another page. If that's the case, the code for it should be very simple and relatively easy to port and modify as required.
|
|
|
|
Download and install a script such as PHPBB, if you have PHO and MySQL on your server.
|
|
|
|
well right i didnt think about that when i was trying to write the code alot of code i write i come up with out of my head just from nolidge that iv neard in the past i also know bv 6 i make like over 20 programs from it basicly what i wrote what packet slinker for yahoo matiple pck send from one source through a server to the host and got fun results so i got better and better till it got boring and there was no other programers that could out do my work we know these as BOOTERS!!!!! SO i know my shair but i find html more fun and reward what im doing is building my own page from striat html and php is gay running jpg's off a server based app is so lazy for most no bodys it is so much easier than the code us programers half to use simple to write just one table so go figure but lata all thanks for the posts!!!!!!!!!!!!!!!!!!
|
|
|
|
totage i can tell ur a lamer so go **** off lol learn scrips before u but in on a convo you dont know!!!!
|
|
|
|
Edited by
chrish
on
Thu 11/15/07 10:24 AM
|
|
Hi sp1d3r,
Nice to see you haven't lost your vernacular skills. Totage made a valid point about using a script such PhpBB, using an "off the shelf package" is perfectly valid. If you look at the blogs of many web developers, you would see they use (mainly) Wordpress, which is "off the shelf". Its not lame, its called not re-inventing the wheel. VB6!?!?! 1998 called, they want their programming language back. Knowing VB6 does not qualify you as a developer. It carries no real OOP functionality such as inheritance, or name spaces. A clue to the lameness is in the name BASIC, its an acronym for BEGINNER'S All-purpose Symbolic Instruction Code You a beginner? So you've made over 20 programs? How many ways are there to say "Hello World!". Writing code that comes out of your head is fine for small projects, but any developer worth their salt will tell you that anything more than a simple application will require a level of planning. No other programmer could out do your work? I'll rise to the challenge, post some code, and I will re-factor and improve it, any language, even VB6 which I don't use. It is also apparent you can't find the distinction between the presentation layer (HTML), Middleware (PHP) and Backend (MySQL). This is a basic concept in developing web apps. Assuming you can just have a form, and it automagically updates a page, is a ridiculous concept. The closest you can get is using a framework that supports scaffolding such as RoR (which this site is written in) or CakePHP. Unfortunately your will need to familiarize yourself with some development concepts such a MVC, CRUD and ORM. Seeing as you have difficulty in grasping basic concepts, I don't see much hope for you. You HTML sucks, you should separate the content from the presentation using CSS. Also using uppercase POST without and kind of quotes isn't compliant with the xHTML 1.1 Strict standard. Of course, if you maybe calmed down a bit; wrote your questions clearly and concisely and stopped insulting people who are trying to help; someone might help you. In short, be nice, and people will help. Keep acting as you are, and no one will help, and someone will call you out for the lamer you really are. Ta, ~C P.S. "off the shelf" is just my term for pre-written code, its normally open source, so there isn't really a shelf. P.P.S. I would say I qualify as a reasonable developer, I know PHP, Perl, Python, SQL, (x)HTML, Java, Javascript (both MS and ANSI standard). I have worked as a developer for over 8 years, and have worked on code for some large companies, including insurance companies and vehicle manufactures. I have written internet coms systems, desktop applications, and website backends. I have worked all over the UK, Holland and Australia. P.P.P.S. I hope I haven't just been trolled. |
|
|
|
VB6!?!?! 1998 called, they want their programming language back. VB6 is still a nice language. I use it when I need to do a quick fix. We are primarily a C sharp shop now, but we still have a lot of legacy VB6 apps that must be maintained. |
|
|
|
VB6!?!?! 1998 called, they want their programming language back. VB6 is still a nice language. I use it when I need to do a quick fix. We are primarily a C sharp shop now, but we still have a lot of legacy VB6 apps that must be maintained. VB6 like all tools has a job, and serious development isn't one of them. You say yourself you use it to maintain legacy code, but your probably better off not developing an application from scratch in it. Even more so in this day and age. This is of course, my opinion, and many other people opinions, while just as valid, will disagree. I don't want to start a programming language flame war. |
|
|
|
Hmmmm
The beginning of this thread made me wonder how you "code" when spelling and language (English) is a challenge? To add to the discussion, although I do NOT consider myself to be a developer, there are a lot of great tools and applications out there for just about every skill level and I saw some great suggestions. Especially the ones about not reinventing the wheel. I am certainly an amateur compared to most of the people posting to this thread, but when I take on a project my first step is the "KISS" rule, Keep It Simple Stupid. Much easier to take something off the shelf and tweak it to your needs than to start from scratch. I like my hair to stay on my head, not come out in handfuls from me pulling it. Well, that's my two cents worth. Oh wait, it was more like 1/2 a cent. |
|
|
|
ty so much never siad that im a succesor or skoller but simple put vb6 is a main aplet form basic to most but the format is realy very complickated but it dous the job form what i need yea but what you froly dont know is ther is short form and fast form why you may ask LOOK IT UP MORON c++ serves its perpose as well but i find vb more usfull and bendable and also reliable so go stick some more code up your ass shrish
|
|
|
|
o my thanks is to spidercmb
|
|
|
|
Edited by
chrish
on
Wed 11/21/07 08:11 AM
|
|
ty so much never siad that im a succesor or skoller but simple put vb6 is a main aplet form basic to most but the format is realy very complickated but it dous the job form what i need yea but what you froly dont know is ther is short form and fast form why you may ask LOOK IT UP MORON c++ serves its perpose as well but i find vb more usfull and bendable and also reliable so go stick some more code up your ass shrish Before I respond to this, I want to make sure I understand it correctly. Can you please let me know if I have translated this correctly? I'm assuming English isn't your first language, I'm not having a go at you about spelling. Thank you so much. I never said that I'm a successful programmer or scholar. I simply put that, VB6 is a main applet form of basic to most people. The format is really very complicated but it does the job for what I need. What you probably don't know is there are short forms and fast forms. You may ask why. LOOK IT UP MORON! C++ serves its purpose as well. I find VB more useful and bendable. It is also reliable. Go stick some more code up your ass chrish I'm the first to admit that my English or code isn't perfect, but hopefully this makes things a bit clearer. |
|
|