Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <title>ComputerCoderGuy's Insert Into MySQL Database Script</title>
- <form method="post" action="index.php" name="dbinsert">Username:<input
- name="username"><br>
- <br>
- Password:<input name="password" type="password"><br>
- <button value="Insert!" name="submit"></button></form>
- <?php
- $dbhost = "localhost";
- $dbname = "orangean_jangos";
- $dbuser = "orangean_jangos";
- $dbpass = "not showing the pass";
- $dbtable = "jos_";
- mysql_connect($dbhost,$dbuser,$dbpass) or die (mysql_error());
- mysql_select_db($dbname);
- echo "Successfully Connected To The MySQL Database Named $dbname"
- mysql_query(INSERT INTO $dbtable $_POST['username'])or die (mysql_error());
- echo "Successfully inserted $_POST['username'] into the table $dbtable in the MySQL database $dbname"
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement