Computer Science Canada

Shoutout box

Author:  Lanks [ Wed Jun 18, 2008 5:08 pm ]
Post subject:  Shoutout box

i am somewhat new to html, trying to get a webpage going actually, i was wondering what would be a good code for a shoutout box or something similiar

thanks

Author:  Tony [ Wed Jun 18, 2008 5:24 pm ]
Post subject:  RE:Shoutout box

HTML only describes a document. Things like "this is a block of text" or "this is a link".

If you want someone to actually post to a shoutbox, you will need to have a submit form and something on the server-side to process the said request.

Ruby, PHP, Java... whatever you are running on your server. Though assuming you don't want to be bothered with building anything yourself, I'm pretty sure that there are 3rd party, hosted, options that will require you to simply embed some JavaScript into you page (and that will take care of the rest).

Author:  Lanks [ Wed Jun 18, 2008 5:31 pm ]
Post subject:  Re: Shoutout box

okay thank you for the quick reply i will look around google for some java script i can use

Author:  jeffgreco13 [ Thu Jun 19, 2008 9:46 am ]
Post subject:  Re: Shoutout box

if you're planning on using a shout box JavaScript is not the correct option. JavaScript is low level client side scripting, that really can't help you much other than form validation.]

Give me some info on the server you are using... find out if PHP is insalled, or even CGI support.

EDIT: Tony's referring to a "Form Handler" btw

Author:  Aziz [ Thu Jun 19, 2008 9:52 am ]
Post subject:  RE:Shoutout box

Yes, there's free scripts out there that you can sign up for a guestbook/shoutbox/whatever, stick some javascript on your page, and it works. I'm assuming he doesn't have a host with scripting.

Author:  jeffgreco13 [ Thu Jun 19, 2008 9:57 am ]
Post subject:  Re: Shoutout box

Yeah you're right Aziz... I just REALLY hate those 3rd party programs because there's so little customization you can do. But hey if you don't care having a little ad from them on your site go for that option.

Tag Board[/url]

Author:  Aziz [ Thu Jun 19, 2008 10:32 am ]
Post subject:  RE:Shoutout box

I don't think he came here to learn to program =/. Why don't you make one, add an ad for you, and then give it to him? Profitssss

Author:  jeffgreco13 [ Thu Jun 19, 2008 10:37 am ]
Post subject:  Re: Shoutout box

that could work... if he wants that i suppose i could help with that... im awfully lazy right now tho lol

Author:  Lanks [ Thu Jun 19, 2008 3:48 pm ]
Post subject:  Re: Shoutout box

i wouldn't mind learning php or whatever i would need to do it. for now im trying this tut http://www.trap17.com/forums/Shoutbox-Made-Easy-t8292.html

i keep getting this error though

Quote:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'me_me'@'XXX.XXX.XX.XXX' (using password: YES) in /www/vndv.com/m/a/s/XXXX/htdocs/kshoutbox.php on line 99

Warning: mysql_close(): no MySQL-Link resource supplied in /www/vndv.com/m/a/s/XXXX/htdocs/kshoutbox.php on line 259
There was an error!
Unable to connect to MySQL!



i am using zymic's free webhosting which has mysql, php, and phpmyadmin

[/quote]

Author:  jeffgreco13 [ Fri Jun 20, 2008 9:07 am ]
Post subject:  Re: Shoutout box

K so you know that to connect you need to specify the "localhost" on the correct port right?

$connect = mysql_connect("localhost:port","username","password");

Also what might be happening is you haven't actually set a username with a password for your MySQL database yet.
Try logging on to your admin panel and see if there's any options for creating a MySQL database using a wizard or something.. that way you can physically see what you are making, then you will be able to set a username and password.

You could use that script but here's a simpler suggestion.
http://www.w3schools.com/PHP/php_mysql_intro.asp
Make your own script using the tutorials from that site. It will teach you everything you need to know.

index.html
- contains the form asking for name, email, comments, whatever
- This form should submit to the iframe
- contains an iframe linking to shoutbox.php

shoutbox.php
- should contain an if statement at the top checking if there is any input being sent.
- if there is it adds it in the database, REMEMBER TO USE PRIMARY KEY
- Once it gets thru that process it will echo the results onto the page. Use a loop.

Author:  Lanks [ Fri Jun 20, 2008 10:53 am ]
Post subject:  Re: Shoutout box

im going to take a stab at making my own, i have verified that yes i did create a database with a user and set the privileges, but what do i put as the localhost:port Question is it just my website?
thanks

Author:  jeffgreco13 [ Fri Jun 20, 2008 11:13 am ]
Post subject:  Re: Shoutout box

wellll you might not need a port so just put "localhost" << that exact word not an address. If it doesn't work then you might need to specify a port... usually the port will show up in the address bar when u login ur admin section if it doesnt then you probably dont need to put one in the php

Author:  Lanks [ Fri Jun 20, 2008 12:06 pm ]
Post subject:  Re: Shoutout box

thank you *adds karma point* is it okay if i pm you with any other questions?

Author:  jeffgreco13 [ Fri Jun 20, 2008 2:45 pm ]
Post subject:  Re: Shoutout box

sure thing hit me up ill help u out

Author:  smithsan [ Sat Dec 20, 2008 2:38 am ]
Post subject:  Re: Shoutout box

planning on using a shout box JavaScript is not the correct option. JavaScript is low level client side scripting, that really can't help you much other than form validation
-----------
smithsan
*censored*

Mod Edit: Seems like a bot, copy what's already been said to make a valid-looking post, and post a 'hidden' link.

Author:  Zeroth [ Sat Dec 20, 2008 9:38 am ]
Post subject:  Re: Shoutout box

smithsan @ Fri Dec 19, 2008 11:38 pm wrote:
planning on using a shout box JavaScript is not the correct option. JavaScript is low level client side scripting, that really can't help you much other than form validation
-----------
smithsan
Paid Surveys


Wrong.
Javascript is not low level. Javascript is in fact considered a VHLL(Very High Level Language). The qualifications: full OO, functions as first class objects, anonymous functions, lambda, High level datastructures like hashtables are available as a basic data type(Map). Javascript is an incredibly powerful language that does far more than you think. However, its weak point is differing implementations(IE vs Firefox vs Opera vs Safari). Take a look at frameworks like say, jQuery, Dojo, Scriptaculous, Mootools... etc. They do some incredible, incredible stuff.

Author:  jeffgreco13 [ Sat Dec 20, 2008 5:05 pm ]
Post subject:  Re: Shoutout box

I find it interesting how many people are so turned off by JavaScript because there are warnings everywhere that it shouldn't be trusted because it's client-side. JavaScript is simple, effective and most of all HERE TO STAY! While server-side scripting (PHP,Ruby,ASP) is the ideal way to securely execute code, it requires a page to reload and the server to run thru its process again (unless AJAX is used in which case it still demands server execution). JavaScript comes in handy when it comes to small, unobtrusive methods, like form validation and such. Can you imagine having to reload a new script every time just to make sure a user's email was entered properly?

JavaScript has a white flag over it because it is client-side scripting, but with the release of managed and regularly updated JS frameworks like Zeroth said, JavaScript just got a whole lot funner.

After looking into jQuery there's no way I can ever see myself coding another site without using a JS framework, where it's needed.

Author:  Insectoid [ Sat Dec 20, 2008 6:15 pm ]
Post subject:  RE:Shoutout box

smithsan, try not to resurrect half-year-old threads.

Author:  Lanks [ Sat Dec 20, 2008 6:25 pm ]
Post subject:  Re: Shoutout box

I would like to point everyone to the 4th post made by jeffgreco13, specifically the underlined words

Quote:
if you're planning on using a shout box JavaScript is not the correct option. JavaScript is low level client side scripting, that really can't help you much other than form validation.]

Give me some info on the server you are using... find out if PHP is insalled, or even CGI support.

EDIT: Tony's referring to a "Form Handler" btw


okay, now lets compare to the post smithsan made in a dead thread

Quote:
planning on using a shout box JavaScript is not the correct option. JavaScript is low level client side scripting, that really can't help you much other than form validation


can we copy paste or what! Claping

Mod edit: Nice catch!


: