need some tweaking
Posted: Sat Jul 12, 2014 11:57 am
Team, i am writing this simple program like a simple dictionary. What it does is that it allow users enter words into a database but does not accept same word twice... incase of that, it will inform the user that word already exist.
Also there will be an admin panel to accept the word
these are the requirements listed below:
Submitter Panel
1. Only the words that are not in database can be added
2. When somebody types in word in database, autocomplete (1 character or more) is there and it shows what all are there and allows
to add to database on hitting enter (not button)
3. Give the message that the word has been added.
4. When the name is added, it is added as stutus "Pending"
5. On the side show them the names as "name" status as "Pending"/"Approved"/"Rejected"
Approver Panel (provide a separate page)
Provide an interface that has the following fields
name, username (who submitted the name), checkbox (selecting approves the words) and it should show the user as "Approved". The ones that are not accepted are marked "Rejected". So it will be either accepted or rejected....
this is how far i have gone:
I need contribution from you guys to achieve this goal. and i am sure i will get it.
thx in advance
Also there will be an admin panel to accept the word
these are the requirements listed below:
Submitter Panel
1. Only the words that are not in database can be added
2. When somebody types in word in database, autocomplete (1 character or more) is there and it shows what all are there and allows
to add to database on hitting enter (not button)
3. Give the message that the word has been added.
4. When the name is added, it is added as stutus "Pending"
5. On the side show them the names as "name" status as "Pending"/"Approved"/"Rejected"
Approver Panel (provide a separate page)
Provide an interface that has the following fields
name, username (who submitted the name), checkbox (selecting approves the words) and it should show the user as "Approved". The ones that are not accepted are marked "Rejected". So it will be either accepted or rejected....
this is how far i have gone:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Word Dictionary</title>
</head>
<?php
session_start();
if(isset($_POST['submit']))
{
$name=$_POST['name'];
$word=$_POST['word'];
$conn = mysql_connect('localhost', 'root', '');
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("ani", $conn);
mysql_query("INSERT INTO `words`(user_name,word)
VALUES ('$name','$word')" );
echo "Thank you ! Your submission is pending";
}
?>
<body>
<form id="form1" name="form1" method="post" action="index.php">
<p>Username
<label for="name"></label>
<input type="text" name="name" id="name" />
</p>
<p>Word
<label for="word"></label>
<input name="word" type="text" id="word" value="" size="45" />
</p>
<p>
<input type="submit" name="submit" id="button" value="Submit" />
</p>
</form>
</body>
</html>I need contribution from you guys to achieve this goal. and i am sure i will get it.
thx in advance