Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- if ($submit) {
- // process form
- $hostname = "localhost";
- $username = "igo";
- $password = "monster";
- $dbName = "irabd";
- $userstable = "user";
- mysql_connect($hostname,$username,$password) OR DIE("Не могу создать соединение ");
- mysql_select_db($dbName) or die(mysql_error());
- $sql = "INSERT INTO employees (reg_day,eg_mounth,reg_year,INN) VALUES ('$reg_day','$reg_mounth','$reg_year','$INN')";
- $result = mysql_query($sql);
- echo "Thank you! Information entered.\n";
- } else{
- // display form
- ?>
- <form method="post" action="">
- reg_day:
- <input type="Text" name="first"><br>
- reg_mounth:
- <input type="Text" name="last"><br>
- reg_year:
- <input type="Text" name="address"><br>
- INN:<input type="Text" name="position"><br>
- <input type="Submit" name="submit" value="Enter information">
- </form>
- <?php
- }
- // end if
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement