Jump to content


PHP/Database Forum


12 replies to this topic

#1 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 29 March 2008 - 06:55 PM

Okay.. I really do not know how to explain this. So if you want to really help me out, please add me to x-fire: sdavis891

Here is the tutorial site I was following: http://www.phpeasyst...pview.php?id=12

I would just like to note that I am new to PHP and this is something I really want to add for my clan.

START: Okay, so everything went fine in the tutorial and I think i did everything good. My hosting.. (FREE HOSTING) lets you create your own database and it comes with PHPmyadmin thingy inside the hosting cpanel. (HOSTING: http://byethost.com) So i created the 2 tables no problem, or atleast I think. Then I created the files in order and correctly. And once again I think. So here is the part of my site. Its noobish and it only has the forum so you should beable to find the problem easily. http://the9td.byetho.../main_forum.php .

Please try creating a topic and when you click submit it just comes up as error. So I do not know what I have done wrong. So please can you help me?

#2 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 29 March 2008 - 07:02 PM

your code mentions the following:

if($result){
echo "Successful<BR>";
echo "<a href=main_forum.php>View your topic</a>";
}
else {
echo "ERROR"; //<-this is where the error is displayed
}
the $result variable is the result from your MySQL Query. This must be giving an error of some kind. Try the following:

in the file: add_topic.php replace following line:
$result=mysql_query($sql);
by this:
$result=mysql_query($sql) or die(mysql_error());

and paste the result here. It should be a MySQL error given by PHP




B

#3 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 29 March 2008 - 07:11 PM

Table 'test.forum_question' doesn't exist

forum_question dosen't exist what does that mean. I have made that... So your saying its in my database. Could you help me write a script to get it to work. I think thats the problem. Like you look at the database thing on the tutorial it says the code to put in and I copied that.

Edited by Davis, 29 March 2008 - 07:16 PM.


#4 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 30 March 2008 - 05:47 AM

What is your database name? Are you sure it's called 'test' in cPanel?
And take a look at CaSe SenSitiViTy ;-)


B

#5 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 30 March 2008 - 07:50 AM

when it said new database name: I put test.. just test nothing eles. I think I remember seeing it showing my username_test. So could it be that I have to change it so it says username_test in the code?

#6 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 30 March 2008 - 12:16 PM

Yea, that's quite possible. Normally your cPanel (or phpmyadmin) should display the database name somewhere. If needed you could send me a printscreen (maybe best in a PM ;-)) so I can point it out for ya



B

#7 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 30 March 2008 - 02:49 PM

yes.. Thank you man. That worked.. You can even test my site if you like. Just go to the first post and click on the link. I got it working and my fellow clan members appreciate it also.

Now that I have it running. Is it possible to have a user registration involved with it? So instead of putting your name and email in everytime you want to post. It will just automatically put it there.

#8 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 30 March 2008 - 02:54 PM

Hi,
glad it works :-)

Yes you can but that implements a whole new level of doing it. You can look at it as 2 different things in a forum, the message posting and user registration-logging in.
I recommend looking for a few Content Management System tutorials, they should help you along!

B

#9 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 30 March 2008 - 03:03 PM

Would you be able to list a few good tutorials?

#10 dotbart

    Young Padawan

  • Members
  • Pip
  • 141 posts
  • Gender:Male
  • Location:Diepenbeek
  • Interests:Webdesign, Webdeveloppement, DJ, ...

Posted 30 March 2008 - 04:00 PM

use the search function ;-)
http://www.pixel2lif.../cms%20forum/1/

#11 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 30 March 2008 - 05:25 PM

http://deceptive-logic.com/index.php?id=tu...;tutorial=login

this one looks good but is it capable of being intigrated into my current forum?

#12 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 30 March 2008 - 06:52 PM

Lol, i didn't think that would come up first in that search :P

While i'm glad you think it "looks good" i should warn you, it is intended to be used with the phpBB forum system (and it is flawed at that due to poor testing and having wrote it before actually understanding what i was doing).

However, i would recommend looking through the following category for a tutorial
http://www.pixel2life.com/tutorials/php_co...ership_scripts/

#13 Davis

    Young Padawan

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Canada, Ontario

Posted 31 March 2008 - 07:08 AM

Okay. I found this one.

http://www.combined-minds.net/tutorials/28...stration_system.

So is there a code to intigrate it into the forum? Should I make this login thing first then enter the code for iT?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users