2009-11-29, 09:10 PM
Hi MyBB not been very active recently, but im back and this time ready to create some scripts. Unfortunately not MyBB scripts as my site isnt large enough to have a forum at the moment.
Ive basically created a MySQL table and filled it with loads of words, I then have a script which displays a random one of these words.
The table is called 'keywords' and the column is called 'Article_Keywords'
in theory I would like it when the keyword is displayed, for a image to appear on the right of the keyword, a cross, which would delete that keyword from the database, therefore the keyword would never appear again.
I would also like a form on a seperate page which has a form, and when I enter a new keyword into that form and press submit, that keyword is then added onto my database.
Could anyone possibly help me to do this?
Thanks, Hapatio.
Ive basically created a MySQL table and filled it with loads of words, I then have a script which displays a random one of these words.
<?php
$link = mysql_connect("localhost", "user", "password") or die (mysql_error ());
mysql_select_db ('database', $link) or die (mysql_error ());
$sql = mysql_query ("SELECT `Article_Title` FROM `keywords` ORDER BY RAND() LIMIT 0,1") or die (mysql_error ());
$res = mysql_fetch_assoc ($sql);
$randomquote = $res['Article_Title'];
echo $randomquote;
?>
The table is called 'keywords' and the column is called 'Article_Keywords'
in theory I would like it when the keyword is displayed, for a image to appear on the right of the keyword, a cross, which would delete that keyword from the database, therefore the keyword would never appear again.
I would also like a form on a seperate page which has a form, and when I enter a new keyword into that form and press submit, that keyword is then added onto my database.
Could anyone possibly help me to do this?
Thanks, Hapatio.