Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "609794";
- $password = "password";
- $database = "zadmin_609794"; //name of database
- $custname = $_POST['txtname']; //textbox variable
- $custcomment = $_POST['txtcomment'];
- $linkDb = mysql_connect (localhost, $username, $password);
- echo 'Connected to tblforum database successfully';
- mysql_select_db($database) or die('Could not select database');
- $query = "Insert Into tblforum values ('' , '$custname' , '$custcomment')";
- $result = mysql_query ($query) or die ('query failed: ' . mysql_error());
- mysql_close($linkDb `);
- echo "<br>";
- echo " welcome : $custname";
- echo "<br>";
- echo "You are: $custcomment";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement