Log In · Register

 
 
Closed TopicStart new topic
web help!, ok so i just started...
chauna1212
post Sep 16 2006, 11:49 AM
Post #1


Senior Member
****

Group: Member
Posts: 140
Joined: Apr 2006
Member No: 399,166



ok i just started and i was wondering if sum peoples coul help me with some questions i have.




1. how do i make tables?
2. how do i get it so people could comment my site
3. how do i make a form..that actually works =/
4. any suggestions of places i culd go to learn php or html or wht ever i need to learn



ps. srry if any of these were posted..i looked and i didnt see anything about it so yea
thnx!!
 
freeflow
post Sep 16 2006, 01:39 PM
Post #2


t-t-t-toyaaa
********

Group: Official Member
Posts: 19,821
Joined: Apr 2004
Member No: 11,270



1. http://pixelfx.org (tutorials > html > regular tables)
2. http://haloscan.com or get a blogging program like wordpress, cutenews, kiwiblog, moveable type or b2.
3. http://pixelfx.org (tutorials > html> email forms)
4. http://www.w3schools.com/
http://www.lissaexplains.com/
http://pixelfx.org
 
chauna1212
post Sep 16 2006, 05:10 PM
Post #3


Senior Member
****

Group: Member
Posts: 140
Joined: Apr 2006
Member No: 399,166



thnk you soooo much
if any1 finds more...plz let me kno =]]
thnx again!!!
 
IceMouse
post Sep 16 2006, 10:26 PM
Post #4


.
**

Group: Member
Posts: 25
Joined: May 2006
Member No: 402,280



1. Make tables:
To make a table, begin it by using the "<table>" tag. After this, you need to create a new row using "<tr>". After this, you make an entry for data using "<td>". After you have your data entered, put in "</td>" and either start a new data entry, or end the row and start a new one. After you have everything entered, finish the table with "</table>". For information about all of "<table>" etc's various options(Width, height, border), check the W3C website.
Example:
CODE
<table>
<tr><td>Row 1, Data 1</td>
<td>Row 2, Data 2</td></tr>
<tr><td>Row 2, Data 1</td>
<td>Row 2, Data 2</td>
</tr></table>


2 & 3. Comments and forms:
There are various ways to go about this, but I'll use PHP for my example. The simplest way(The simplest method is actually a shoutbox, which I'll demonstrate). You simply want to make a form which takes people's input, writes it to a file, and then outputs it to the shoutbox. You could also use MySQL(Which is a little more advanced than I'm willing to write a thread on to answer this question), and using multiple files for multiple comment boxes. Also, for a form, just try and read the code. It's fairly all-encompassing of your questions. Anyhow, on to the script:
CODE
<?php
if(!file_exists("./shoutbox.txt"))
        touch("./shoutbox.txt");
if(isset($_POST["shoutcomment"]))
{
        $name = $_POST["name"];
        $comment = $_POST["com"];
        if(!$fh = fopen("./shoutbox.txt", "a")) die("failure");
        fwrite($fh, $name . "\n");
        fwrite($fh, $comment . "\n");
        fclose($fh);
}
if(!$fh = fopen("./shoutbox.txt", "r")) die("Failure");
?>
<table>
<?php
while(!feof($fh))
{
        echo "<tr><td>" . fgets($fh) . "</td><td>" . fgets($fh) . "</td></tr>";
}
fclose($fh);
?>
</table>
<form action="?" method="POST">
<input type="text" name="name">
<input type="text" name="com">
<input type="hidden" name="shoutcomment" value="1">
<input type="submit" value="submit">

NOTE: Don't use that script. Please, for the love of God. It's only an example. If you use it, bad things will befall your website. I don't even know if it works. But it's a very poorly written POC script. Also, if you want to test the script you'll need to make sure that your apache process(Or whatever httpd you use) is able to write to a file in the directory called "shoutbox.txt" or has write permissions in the directory.

4. Google
 
keithcash
post Dec 19 2006, 08:55 PM
Post #5


Member
**

Group: Member
Posts: 14
Joined: Sep 2006
Member No: 466,484



WoW. This is some good code links and help.

Thanks I will review and hopefully learn.

Slainte / Cheers
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: