Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. $username = "609794";
  3. $password = "password";
  4. $database = "zadmin_609794"; //name of database
  5. $custname = $_POST['txtname']; //textbox variable
  6. $custcomment = $_POST['txtcomment'];
  7. $linkDb = mysql_connect (localhost, $username, $password);
  8. echo 'Connected to tblforum database successfully';
  9. mysql_select_db($database) or die('Could not select database');
  10. $query = "Insert Into tblforum values ('' , '$custname' , '$custcomment')";
  11. $result = mysql_query ($query) or die ('query failed: ' . mysql_error());
  12. mysql_close($linkDb `);
  13. echo "<br>";
  14. echo " welcome : $custname";
  15. echo "<br>";
  16. echo "You are: $custcomment";
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement