Post: What would be the way to do this? SQL?
06-19-2011, 07:42 PM #1
anddrew
League Champion
(adsbygoogle = window.adsbygoogle || []).push({}); What would be a way so that you can type in a word into a wordbox, and the website returns how many people also put that word?

(question in simplest form)

I am not asking for the entire coding or what not, just the way it would be done.
Don't tell me that if I am asking then I am not able.
get back to me?
(adsbygoogle = window.adsbygoogle || []).push({});
06-19-2011, 08:01 PM #2
Ameht!
Dark Knight
Originally posted by anddrew View Post
What would be a way so that you can type in a word into a wordbox, and the website returns how many people also put that word?

(question in simplest form)

I am not asking for the entire coding or what not, just the way it would be done.
Don't tell me that if I am asking then I am not able.
get back to me?


hmmm this is a gaming site so i doubt most of the CHILDREN on here known. some might dont get me wrong but why dont chu pop into the shoutbox of the site on my sig , im sure someone can help you .

The following user groaned Ameht! for this awful post:

<Jimbo>
06-19-2011, 08:08 PM #3
anddrew
League Champion
Originally posted by psameht View Post
hmmm this is a gaming site so i doubt most of the CHILDREN on here known. some might dont get me wrong but why dont chu pop into the shoutbox of the site on my sig , im sure someone can help you .


1. Why would I join another forum?
2. Your website is down.
3. NGU is surprisingly useful.
06-19-2011, 08:47 PM #4
Ameht!
Dark Knight
Originally posted by anddrew View Post
1. Why would I join another forum?
2. Your website is down.
3. NGU is surprisingly useful.




1. so your telling me your only part of 1 forum
2. nev3er down. mods think there funny and changed the linkNo , try again
3. i agree with you. i have some good friends on here

The following user groaned Ameht! for this awful post:

<Jimbo>
06-20-2011, 02:56 PM #5
Originally posted by anddrew View Post
1. Why would I join another forum?
2. Your website is down.
3. NGU is surprisingly useful.


Use SQL to create a data base, when they input the word, add it to the data base, make sure you have a primary ID key, when displaying how many people used that word, do a SQL search for all rows containing the word, and use a for loop to cycle through each result adding an increment to a variable that will finally output the amount of people who have, you could also add a 3rd field to add there IP address to filter out multiple inputs, or just add a cookie, which is easier but means it won't always work.

The following user thanked Relevant for this useful post:

anddrew
06-20-2011, 05:26 PM #6
anddrew
League Champion
Originally posted by Relevant View Post
Use SQL to create a data base, when they input the word, add it to the data base, make sure you have a primary ID key, when displaying how many people used that word, do a SQL search for all rows containing the word, and use a for loop to cycle through each result adding an increment to a variable that will finally output the amount of people who have, you could also add a 3rd field to add there IP address to filter out multiple inputs, or just add a cookie, which is easier but means it won't always work.


Thanks Smile
Still learning how to make the database Winky Winky
06-22-2011, 05:36 AM #7
AlabamaHit
ROLL TIDE!!!
Originally posted by anddrew View Post
Thanks Smile
Still learning how to make the database Winky Winky


I would make a table like said before, and then just count the table rows.

Example:

Table something like so:

    
CREATE TABLE IF NOT EXISTS `word` (
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;


Now you would have a table. That would go up. So form something like this.

    
if(isset($_POST['done']))
{
//Change to whatever your page is ofcourse. And we also view the amount of times.
$amount = mysql_query("SELECT COUNT(id) FROM word");
print 'Word sumbited '.$amount.' times.';
//Now this is what would be the query to insert it into the page if the word is whatever you want.
//For example we will submit the word "Bama"
//First check if word is Bama. This example is case sensitive.
if($_POST['done'] == "Bama")
{
//This might not work.....As the submit is NULL because the table I made
//Is just an ID.
mysql_query("INSERT INTO word () VALUES ()");
}
}
else
{
//Change the form to however you want.
print '<form action="'.$_SERVER['PHP_SELF'].'" method="post">
<input type="text" name="done" value="" />
<input type="submit" value="Submit" />
</form>";
}

The following user thanked AlabamaHit for this useful post:

anddrew

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo