Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,173,563 members, 7,888,821 topics. Date: Saturday, 13 July 2024 at 03:55 PM

Only For Gurus - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Only For Gurus (978 Views)

Where Are The Paypal Gurus In The House, Check This Out... / Wordpress Gurus Needed: Help Me Design My Site (negociation) / Gurus Pls Help With Bar Code Design! (2) (3) (4)

(1) (Reply) (Go Down)

Only For Gurus by deezoneclu: 3:13pm On Feb 17, 2010
Hi guys. Man! Recently discovered that Nigerians are very skilled in web design. Was able to visit some web design company websites. Well done Guys.

Got a little problem. I know how you can send a post to a database say comment, using PHP and MYSQL. But I need to know how it will be displayed at each page. I mean people's comment being displayed, say about a topic or something.

I do not need a forum with registration. All I need is just for people to make comments that will be displayed on the same page,

While the good samaritans are trying to help me solve the problem I was just wondering how I can place something in my database that people can download.


Thanks.

I feel you guys, DHTML, YAWATIDE, PCGURU AND A 'web' of OTHERS
Re: Only For Gurus by mrperfect(m): 5:06pm On Feb 17, 2010
You didn't mention my Name so you didn't feel me? wink
Re: Only For Gurus by lagerwhenindoubt(m): 5:41pm On Feb 17, 2010
me neither, and my sites from a-o are from databases, not one spot of content is static
Re: Only For Gurus by mrperfect(m): 5:51pm On Feb 18, 2010
Either there is problem with his feelings or we are "web",
Re: Only For Gurus by DualCore1: 6:50pm On Feb 18, 2010
Oh no, ma babe dumped me (for dream), ma pc crashed (fiction) and now this? I fall under 'web'? kai!!! Whhat a day. . .
not to mention, i had fun coding today after being stuck up for hours on one cursed bug.


k, seriously now. . .
You can just fetch content from your database and display on the desired page. Hope this helps (i doubt it does :-P)

As per the downloading from database, not a good idea to store stuff on ur database. Its wise to store stuff on ur server and store the references to them on ur database.
Re: Only For Gurus by Nobody: 12:25pm On Feb 19, 2010
Yep it's easy to retreive comments from databases but here is the main catch but first let me add my disclaimer
disclaimer:i might be wrong oh so feel free to correct me Accept | Decline if u accept cool if not Hater!

okay back to the ish,
first there shud be a TOPIC TABLE and IT SHUD HAVE A TOPIC ID which will be PRIMARY key meaning no two of the same number can exist,and Auto_increment to update the table by 1 after every post
[primary keys can only be used once in a table]
We shud now have another Table Called Comments which will have ID also PRIMARY KEY, TOPIC ID [can have duplicate values], COMMENT[text where your comments will go].

here's the logic {disclaimer applies here}

Each Topic for Instance "Girls Love pc guru " will be stored in Table with id 1 since it's the first entry
id. Topic
1 "GIRLS LOVE PCGURU"

now each comments will enter the table like this
id Topic_id Comment
1 1 "topup:''am in love with pcguru he is my world"
2 1 "ebonyesyes:"No i Love pcguru"
3 1 "dhtml:"No one is more awesome than pc guru true story""
4 2 "Javascript vs Jscript"
5 2 "Jquery vs Mootools"

now we have to list topics in a page

let's say topic.php
am assuming u know how to connect to mysql but let me just add that

#connect to the db

$connect_resource=mysql_connect("localhost","username","password"winkor die("Mysql Connection Error"wink;
mysql_select_db('database_name',"Link Resource used to connect which is $connect_resource"wink or die("Database Connection Error"wink;

#query all topics from db

$query="select * from table_topic"; #this retrieves all topics from database topic table
$result=mysql_query($query); #store the result in result variable
$row=mysql_fetch_array($result);
#throw the result into an array(though others use mysql_fetch row with while but am a major array freak so arrar is far easier to tranverse and access them

#to vomit them in a page
while(!$row)
{
echo <a href="topic.php?id=$row['id']>"$row[''topic']</a>; #this will echo a link to topic.php with a dynamic url variable
}
so in the browser it will be like this
topic.php?id=1

#to retrieve comments
$query="select * from comment_table where id=' $id' ";
$result=mysql_query($query); #store the result in result variable
$row=mysql_fetch_array($result);

#to echo the comments
while(!$row)
{
echo $row['comments'];
}

this is just a quick stuff cuz am at work hope this helps others can add or delete where i made mistakes
Re: Only For Gurus by Nobody: 12:36pm On Feb 19, 2010
[size=18pt]WHAT THE HEELL WAS THAT I TOOK 30MINS OUT OF LIFE TO WRITE AN EXAMPLE CODE HERE AND IT GOT DELETED FOR WHAT REASON I"M REALLY PISSED OFF SO NO ONE CAN EVEN WRITE TUTORIALS TO HELP ANOTHER<THIS NO LONGER EXIST TO BE A FORUM BUT A COMMUNIST FORUM,THAT IS NOT GOOD, CHINALAND[/size]
Re: Only For Gurus by deezoneclu: 12:49pm On Feb 20, 2010
Thanks Guys For Replying. Apology to a web of others. Couldnt have been mentioning names.
Re: Only For Gurus by Nobody: 7:14pm On Feb 20, 2010
@dualcore. You be real core master!!! Save no downloadle shits on dbase
Re: Only For Gurus by Nobody: 7:40pm On Feb 20, 2010
This is Foolish and Ideally Stupid it beats the purpose of this called a Webmaster forum if codes are to be deleted am tired of this Bot spamming program,Chinaland shud not resort to bot cuz it dosen't make sense,
Re: Only For Gurus by Nobody: 9:17pm On Feb 20, 2010
//Yep it's easy to retreive comments from databases but here is the main catch but first let me add my disclaimer
disclaimer:i might be wrong oh so feel free to correct me Accept | Decline if u accept cool if not Hater!

okay back to the ish,
first there shud be a TOPIC TABLE and IT SHUD HAVE A TOPIC ID which will be PRIMARY key meaning no two of the same number can exist,and Auto_increment to update the table by 1 after every post
[primary keys can only be used once in a table]
We shud now have another Table Called Comments which will have ID also PRIMARY KEY, TOPIC ID [can have duplicate values], COMMENT[text where your comments will go].

here's the logic {disclaimer applies here}

Each Topic for Instance "Girls Love pc guru " will be stored in Table with id 1 since it's the first entry
id. Topic
1 "GIRLS LOVE PCGURU"

now each comments will enter the table like this
id Topic_id Comment
1 1 "topup:''am in love with pcguru he is my world"
2 1 "ebonyesyes:"No i Love pcguru"
3 1 "dhtml:"No one is more awesome than pc guru true story""
4 2 "Javascript vs Jscript"
5 2 "Jquery vs Mootools"

now we have to list topics in a page

let's say topic.php
am assuming u know how to connect to mysql but let me just add that

#connect to the db

$connect_resource=mysql_connect("localhost","username","password"winkor die("Mysql Connection Error"wink;
mysql_select_db('database_name',"Link Resource used to connect which is $connect_resource"wink or die("Database Connection Error"wink;

#query all topics from db

$query="select * from table_topic"; #this retrieves all topics from database topic table
$result=mysql_query($query); #store the result in result variable
$row=mysql_fetch_array($result);
#throw the result into an array(though others use mysql_fetch row with while but am a major array freak so arrar is far easier to tranverse and access them

#to vomit them in a page
while(!$row)
{
echo <a href="topic.php?id=$row['id']>"$row[''topic']</a>; #this will echo a link to topic.php with a dynamic url variable
}
so in the browser it will be like this
topic.php?id=1

#to retrieve comments
$query="select * from comment_table where id=' $id' ";
$result=mysql_query($query); #store the result in result variable
$row=mysql_fetch_array($result);

#to echo the comments
while(!$row)
{
echo $row['comments'];
}

this is just a quick stuff cuz am at work hope this helps others can add or delete where i made mistakes
Re: Only For Gurus by Nobody: 9:23pm On Feb 20, 2010
Yep it's easy to retreive comments from databases but here is the main catch but first let me add my disclaimer
disclaimer:i might be wrong oh so feel free to correct me Accept | Decline if u accept cool if not Hater!

okay back to the ish,
first there shud be a TOPIC TABLE and IT SHUD HAVE A TOPIC ID which will be PRIMARY key meaning no two of the same number can exist,and Auto_increment to update the table by 1 after every post
[primary keys can only be used once in a table]
We shud now have another Table Called Comments which will have ID also PRIMARY  KEY,  TOPIC ID [can have duplicate values], COMMENT[text where your comments will go].

here's the logic {disclaimer applies here}

Each Topic for Instance "Girls Love pc guru " will be stored in Table with id 1 since it's the first entry
id. Topic
1   "GIRLS LOVE PCGURU"

now each comments will enter the table like this
id Topic_id Comment
1      1         "topup:''am in love with pcguru he is my world"
2      1          "ebonyesyes:"No i Love pcguru"
3      1         "dhtml:"No one is more awesome than pc guru true story""
4      2          "Javascript vs Jscript"
5      2          "Jquery vs Mootools"

now we have to list topics in a page

let's say topic.php
am assuming u know how to connect to mysql but let me just add that

#connect to the db

$connect_resource=mysql_connect("localhost","username","password"winkor die("Mysql Connection Error"wink;
mysql_select_db('database_name',"Link Resource used to connect which is $connect_resource"wink or die("Database Connection Error"wink;

#query all topics from db

$query="select * from table_topic"; #this retrieves all topics from database topic table
$result=mysql_query($query);   #store the result in result variable
$row=mysql_fetch_array($result);
#throw the result into an array(though others use mysql_fetch row with while but am a major array freak so arrar is far easier to tranverse and access them

#to vomit them in a page
while(!$row)
{
echo <a href="topic.php?id=$row['id']>"$row[''topic']</a>; #this will echo a link to topic.php with a dynamic url variable
}
so in the browser it will be like this
topic.php?id=1

#to retrieve comments
$query="select * from comment_table where id=' $id' ";
$result=mysql_query($query);   #store the result in result variable
$row=mysql_fetch_array($result);

#to echo the comments
while(!$row)
{
echo $row['comments'];
}

this is just a quick stuff cuz am at work hope this helps others can add or delete where i made mistakes
Re: Only For Gurus by Nobody: 1:23am On Feb 21, 2010
I can see alot of gurus already on board: donpuzo, dual core and others. Please help the guy oh.
@topic: there are many ways of achieving this with ready-made scripts. Are you using a framework
or direct coding? and what language are you using to develop your site? And possibly you can give
us an online view of what you are doing and you will get contributions.

deezoneclu:

Thanks Guys For Replying. Apology to a web of others. Couldnt have been mentioning names.
You too no dey mention names again tongue
Re: Only For Gurus by deezoneclu: 7:21am On Feb 21, 2010
OK. Please any contribution can be forwarded to dotwas2000@yahoo.com

I use jvscript and PHP. I would prefer to write the code to applying some ready made stuffs.
Re: Only For Gurus by Nobody: 7:10pm On Feb 25, 2010
@DHML. i no dey code for free again. And no time i have manyy offnet projects so i am too busy!!! You be guru na help the dude!!!

(1) (Reply)

Web Hosting Reseller / Wow! Didn't Know Mma2 Has A Website. / Improve Traffic By Listing On News Aggregation Sites

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 43
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.