Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-02-2007, 08:54 AM   #1 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Question A new project

hello, though i would take on a new project :>

I have a number of questions that i need to ask and i hope some of you can give me some advice :>

The Project
What i want to create is some simple code that takes form entrys and displays them on a page. At the bottom of this page there should be another form with allows a reply to be made and displays it under the first message.
This is a very very simple version of a forum.

1) What would i code this in, PHP?
2) Will i need some form of database, MySQL?
3) Will it work?
4) In the near future would it be possiable to add email alerts on replys, emoticons etc ?


Thanks, i hope this will get some replys, again i am just asking for your opinion on this and not for a full working script ! :>
Yek is offline  
Old 06-03-2007, 11:05 PM   #2 (permalink)
 
Junior Techie

Join Date: Aug 2006

Posts: 56

theone_trent

Default Re: A new project

I sort of have this question too, except I created the code for the "insert" into the database. The only problem I'm having is the actual "posting." Here is my whole code to show the posts:


<?php

$_POST['date_stamp'] = date("M d, Y, h:i");
$topics['show_topics']['query'] = "SELECT * FROM topics WHERE parent='2'";
if ($topics['show_topics']['perform'] = mysql_query ($topics['show_topics']['query'])) {
while ($topics = @mysql_fetch_array ($topics['show_topics']['perform'])) {
echo "<div id='category'><div id='titlebar'>" . $topics['subject'] . "</div><div id='centerbar'>";
echo "<div id='titles'><table border='0'>"
."<tr>"
."<td>" . $HTTP_POST_VARS['date_stamp'] = $_POST['date_stamp'] . "</td>"
."<td width=280px>" . $topics['tid'] . "</td></tr>"
."<tr>"
."<td width=720px>" . $topics['content'] . "</td></tr>";
}
}
echo "</table></div>";mysql_close($con);

?>
__________________
Acts 10:42 The One Has Come
theone_trent is offline  
Old 06-04-2007, 02:47 PM   #3 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: A new project

1. That's your choice, but PHP is a great one to choose...
2. Need? Nope. You could have a file-based structure, although it's less usable as databases make queries simple (no file parsing, having to know the specific structure etc.) MySQL is another great choice.
3. I don't know, I guess this depends on you (or whomever writes the code). If it's done right: it sure will!
4. Always. The question is how difficult will it be? Again, that depends on your code. But in general, it'd be a snap - the simplest way that comes to mind - when putting the messages into the database, it could be fired off with PHP's mail( ) function.

This is one of the better first-time PHP scripts...try it...

@theone_trent
You probably want to make your own thread, but ... what problems are you having with 'posting'?
HTML Form->POST Variables->Store Data->Return to Main
As I see it above, your script has nothing to do with the 'posting' itself. The one thing to note though, you want to set the time / date when the form is submitted (or when you enter the data into the database, etc.), as the user might have the page open and sitting for minutes, hours, days...
__________________
Vormund is offline  
Old 06-05-2007, 09:10 AM   #4 (permalink)
 
Junior Techie

Join Date: Aug 2006

Posts: 56

theone_trent

Default Re: A new project

I'm having the return to main problem. When a user comes on to post, it stores it fine, but I can't get the board to show it.

I saw the date problem too, but I never stopped to fix that. Besides, it doesn't even show up on the board itself, so it's pretty much pointless there at this moment.

Here is the link to my board: Board Keep in mind that every script on here, I have created myself. This is not an ipb board or phpbb... this is my board? Anyways, I'll walk you through the problems I'm having...

You get on the board. Click Category. You see a lot of topics. You MAY add a topic. However, when you click on a topic, ALL of them go to the same topic id. (Problem 1). Say you click on any of the above topics, you go to the "topic." There you see one post that says "This is a test." Yay... the test worked, but when you click "Add Post" you really are adding a post, however, it will not show up on the board. (Problem 2).

Note* When viewing this site, be careful which links you click on. I transferred this board over from my old site to my new site, and haven't fixed all the links. So, watch your address bar and if you no longer read t1tweb.com, and read gwm.rctstop.com... you went the wrong way. Best solution is to press the back button.


I guess I can get my own topic, but I thought that this topic would be the same as mine... If a mod could split the topic that would be cool.
__________________
Acts 10:42 The One Has Come
theone_trent is offline  
Old 06-05-2007, 12:16 PM   #5 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: A new project

Yeah, I was just pointing out the date thing. On that topic, in the future before you get too far, I would highly recommend using the time() function - it is much easier to manipulate later on (eg, is the session valid? current_time - old_time, and the like.), and to go back to your stamp, you simply add it as a parameter to the date("format", $timestamp). Anyway, onward!

Well do you see problem #1's issue? There's no topic ID in the URL, they are all ?id=[blank]. So whatever you have filling the IDs needs a little tweaking.

Problem #2: So it's adding the message to the database, just your code to display it isn't working? First off, I guess I'd have to ask if it has the proper ID - I guess you're storing it in the session as it's not in the form. If that's not the problem, it has to be wherever you're getting the messages, and I can't really say much without seeing the code. :freak: Maybe problem #1 will help this...the database could be defaulting to the first entry or something.
__________________
Vormund is offline  
Old 06-10-2007, 01:34 PM   #6 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default Re: A new project

you coded that whole board by yourself!
Yek is offline  
Old 06-10-2007, 03:24 PM   #7 (permalink)
 
Junior Techie

Join Date: Aug 2006

Posts: 56

theone_trent

Default Re: A new project

Yeah. I'm stuck now though...
__________________
Acts 10:42 The One Has Come
theone_trent is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of Free & Open Source Software Downloads þÄ®âÐÖx Windows Operating Systems and Software 552 08-10-2009 02:24 PM
Open source 2D RPG engine searching for interested C++ programmers mvBarracuda Programming Discussions 19 10-11-2007 10:57 AM
Case mod project: Wc pump/rad housing case schulz269 Overclocking, Case Mod, Tweaking PC Performance 18 04-15-2007 02:00 PM
University Project - Help Please tektonnic Windows Operating Systems and Software 0 03-30-2007 08:58 AM