haha, sorry.
The script a friend wrote for me;
PHP Code:
<?php mysql_connect("host", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); function silence($string) { $string = htmlspecialchars( $string, ENT_QUOTES ); if( get_magic_quotes_gpc( ) ) { $string = stripslashes( $string ); } $string = mysql_real_escape_string( $string ); return $string; } if(!$_POST["Submit"]) { echo "<form action=\"\" method=\"post\"> <input type=\"text\" name="tipsAuthor" /> <input type=\"text\" name=\"tips\" /> <input type=\"submit\" name=\"Submit\" /> </form>"; } else { $clean["author"] = silence($_POST["tipsAuthor"]); $clean["tip"] = silence($_POST["tips"]); mysql_query("INSERT INTO tips (author, tip) VALUES('$clean["author"]', '$clean["tip"]' ) ") or die(mysql_error()); } ?>
1) Would this script just go on the webpage?
He told me to make a database and 2 fields; author and tips, which i did, i got this;
This is what it looks like on the actual webpage;

This is what the database and fields look like;
The site page that it will go on is; http://www.get-rid-of-blackheads.com...Submitted.html
I hope that is enough information and thanks for any help!
|