Click to See Complete Forum and Search --> : making basic webpage


bakaal
06-05-2003, 01:11 PM
Hi, i'm fairly new to the more complicated aspects of creating web sites. I an understand of how it works..but dont know how to implement it best. So i'm asking you guys for help. I would like to have a page where people can post names, id#, etc. then have it put either on the same page or put it on another page and eventually i would like to make it sortable and other options. i made a basic form to take in the info and then used javascript to post, but if you refresh, all info is lost. What would be the easiest way to do this? cgi/php?? this is very basic and for fun so i dont plan on spending any money for hosting or bying expensive database software etc. if there is any help you can give or a place you could point me too with these kinds of answers that would be great. i have some familiarity with Javascript, html, c+ so i'm not to worried about having to do some scripting. thanks for any and all help.

Jona
06-05-2003, 01:16 PM
You can use CGI, PHP, ASP, or JSP (but we don't have a forum for JSP... YET ;)). You will need a server that supports this, because you cannot do it on your own computer (unless you've got quite an advanced server on your local computer that can CHMOD and I don't think you'll find that for PHP, but possibly for CGI). Anyways, since you want to do this for free, you can get a free Web host that supports PHP like: http://t35.com/ or http://lycos.co.uk/

Finding a free host that supports CGI is extremely difficult, and when you do find one they don't have all of the modules installed most of the time. Here are a few, regardles: http://lycos.com/ (note: lycos.co.uk only supports PHP, and lycos.com only supports CGI/Perl) and http://netfirms.com/ (but you have to use FTP).

You also have the option of using ASP. I don't know about you, but I personally prefer the afforementioned two languages over ASP because of the syntax involved. In any case, http://brinkster.com/ supports ASP for free (rhyme).

Jona

bakaal
06-05-2003, 01:19 PM
i have host that has mysql/php/cgi support :), i got that covered

Jona
06-05-2003, 01:25 PM
LOL, you could have saved me a lot of time right there.. :p

All right, so take a pick. If you want to do it in PHP, I can help ya. If you want to do it in CGI or ASP--go post in the respective forum, because I'm lost at that point. :) I could probably figure it out with CGI, but... I know I can do it in PHP. And if khaki read this she might be able to help you if you choose ASP.... But..

Jona

khaki
06-05-2003, 01:41 PM
And if khaki read this she might be able to help you if you choose ASP.... But.. your starting to write startlingly like me now Jona sweetie.... and that's probably a bad thing (?)

anyway...
I do have some ASP stuff that I need to get to a couple of other people here (Cary, Richard... and...Brenda?)...
but it looks like bakaal is using PHP not ASP (he didn't mention IIS support).

But there is always room for more in my leaky boat...
so if ASP is your thing... you can help bail while I try to figure out if I can help you integrate forms, ASP, and databases.

Just let me know.
;)

Jona
06-05-2003, 01:44 PM
Um... I'm not going to even really reply to ya, khaki... We'll end up off topic. *Starts Yahoo messenger* (I don't know if it's mine or your fault. :rolleyes: )

In any case, I just realized that Bakaal didn't say anything about ASP (or IIS) support. :p Silly me. :rolleyes:

Jona

bakaal
06-05-2003, 02:02 PM
yes, my 2 viable options are php/cgi-perl..i'm reading some info right now on what i think will be easier to make what i want..things are looking towards php, but i need to install apache first so i dont have to upload to test..cuz i'm sure i'm gonna make alot of mistakes :) this whole project is just for fun and furthering my own knowledge and seeing if i can do it. plus i'm in college so $$$ is out of the question. lol

Jona
06-05-2003, 02:04 PM
Yes, do what you need to prepare. When you decide which language to use, and have everything properly prepared, I can help. :)

I think... :D
Jona

bakaal
06-05-2003, 03:24 PM
blah!!! apache is going to just be a pain in the neck i know..anyone know of nice small server that i could use to test code/scripts on?? i run win xp pro.

Jona
06-05-2003, 03:26 PM
Aprelium Webservers. (http://aprelium.com/)

Jona

bakaal
06-05-2003, 03:49 PM
your a world of help, and quick responses to. god bless..if you want to know what i'm thinking in advance cuz it seems like you might be like my mini-tutor for some stuff..here goes. their is a game that is played over the internet. its at www.edrugtrader.com.. its PARODY and yes i know its politically incorrect but its fun and i like it anyways, i'm in a gang their and was just trying to make it easier to rob people from other gangs and such. this way other people from my gang can come to page, put in names of ppl that robbed them and id#'s, then instead of scrolling through a list of people to try and find to rob, their is a link right there. Thank you for the help, i knew it was something simple that i just wasnt looking at. here is my original script, how hard would it take to move the javascript objects thru php...heres my script so far that i've done.


<html>
<head>
<title>People to rob</title>
<script type="text/javascript">
function display() {
document.getElementById('container').innerHTML += document.form1.user.value + '

ID#'+document.form1.uid.value +'<a href="http://www.edrugtrader.com/rob.php?uid=' +

document.form1.uid.value + '"> Rob</a>Posted by:' + document.form1.yourname.value
}
</script>
</head>

<body>

<form name="form1">
<p>
<b> Your EDT name</b>
<input type="text" length="20" name="yourname">
</p>
<b>User's Name who robbed you</b>

<input type="text" length="20" name="user">
</p>
<p>
<b>THeir Id number</b>
<input type="text" length="5" name="uid">
</p>
<p>
<input type="button" value="Display" onclick="display()" />
</p>
</form>

<h1>People to rob.</h1>

<div id="container"></div>

</body>
</html>

spufi
06-05-2003, 04:02 PM
You might want to put a Doctype and charset meta tag in there too. :D

Jona
06-05-2003, 04:02 PM
Looks all right (if you're not worried about it working in all browsers and stuff like that because you don't have a DTD or charset or anything--and it looks like you're mixing XHTML up with HTML), but we're going to just use PHP, aren't we? We don't really need to use Javascript for any of the form submission or anything. We can just use the form and use PHP to print the values to the page statically. I'll make one online and then you can look at it and tell me what you think.

Jona

bakaal
06-05-2003, 04:03 PM
but i worked so hard on the javascript..lol

bakaal
06-05-2003, 04:20 PM
also like is said...i wasnt to sure how to implent it..i thought i would have to use javascript to write to a database(mysql) and then use the php to read and sort it how i wanted.

Jona
06-05-2003, 04:25 PM
I'm not sure if this is what you wanted, but it seemed simple enough: http://members.lycos.co.uk/deton/rob.php

Jona

bakaal
06-05-2003, 04:51 PM
kind of, if you copy my html code, thats basically how i wanted it. like i wanted the names to stay on the page...just moved down. the hardest part is going to be sorting it. I was hoping to be able to keep track of id#'s as they are input, then list the ones that get put in the most higher on the list..and then another section that is maybe 10 of the newest added ones.

so like:
___________________
forms for info
___________________

last 10 names added

___________________

names of people who have been added the most

Jona
06-05-2003, 05:00 PM
Yes, that will need a database--personally, I'd use MySQL. The server on which I showed you the test-script does have a MySQL database, but it will take me a while to get all of that functionality working due to the fact that I've never used a MySQL database--I'm actually quite new to PHP, believe it or not. :)

Jona

bakaal
06-05-2003, 05:02 PM
yes, thats basically the only option i have because thats what the host supports

Jona
06-05-2003, 06:06 PM
Well, just so you know, I wouldn't expect this script to be done within 3 days.. Heh, for one I've never used MySQL; secondly, getting this stupid host (that sucks rotten eggs but is free) to work is extremely difficult. The phpMyAdmin app causes errors! :eek:

I'll figure it out somewhere along the line.. :rolleyes:

Jona

bakaal
06-05-2003, 06:52 PM
lol, i dont expect you to do it for me. i just wanted some general direction to go in. i should just go in the php forum and see if i can have someone at least just make the page i have, except using php instead of javascript.

Jona
06-05-2003, 07:36 PM
What you do is log in to phpMyAdmin and create a table. Name it.. "users" and then create another table for "passwords" (I *think*). Then you have to take a good look at MySQL documentation and PHP MySQL database integration. Whew, that said, good luck. Post in the PHP forum concerning your question. I have accomplished reading from a MySQL database--that's it, though. I haven't been able to write to the database as of yet..

Jona