Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <title>Add to Table</title>
- <body>
- <form id="form1" name="form1" method="post" action="">
- <p>
- <input name="Title" type="text" id="Title"size="50" />
- </p>
- <p>
- <input name="Game" type="text" id="Game" size="50" />
- </p>
- <p>
- <input name="Description" type="text" id="Description" size="75" />
- </p>
- <p>
- <input name="Author" type="text" id="Author" size="50" />
- </p>
- <p>
- <input name="TitleID" type="text" id="tid" size="50" />
- </p>
- <p>
- <input name="Hash" type="text" id="Hash" size="50" />
- </p>
- <p>
- <input name="Like" type="text" id="Like" size="50" />
- </p>
- <button name="Add" Type="Submit" id="Add">Add Save</button>
- </form>
- <?php
- // SQL Database Structure
- $Host = "localhost";
- $Username = "asdwer45_billyf";
- $Password = "I~d*X@upz-cI";
- $db_name = "asdwer45_billy";
- // Table Structure
- $Table = "gamesave";
- $Col1 = "ID";
- $Col2 = "Title";
- $Col3 = "Game";
- $Col4 = "Description";
- $Col5 = "Author";
- $Col6 = "Hash";
- $Col7 = "TitleID";
- //Performs Login to SQL Database
- $Conn = mysql_connect($Host,$Username,$Password,$db_name) or die(mysql_error());
- mysql_select_db($db_name,$Conn) or die(mysql_error());
- // Adds to table
- if(isset($_POST['Add']))
- {
- mysql_query("INSERT INTO gamesave (Title,TitleID, Game, Description, Author, Hash,Likes) VALUES ('$_POST[Title]', '$_POST[TitleID]', '$_POST[Game]','$_POST[Description]','$_POST[Author]','$_POST[Hash]','$_POST[Like]')");
- }
- ?>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement