Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function test($user) {
- $user="s10int_09162";
- $password="mp8nb8";
- $database="s10int_09162";
- mysql_connect(localhost,$user, $password);
- @mysql_select_db($database) or die("Unable to select database");
- $query = "SELECT * FROM user WHERE username='username_input'";
- $result = mysql_query($query);
- echo $result;
- mysql_close();
- }
- echo "<form method=\"post\" action=".$_SERVER["PHP_SELF"].">\n";
- echo "<label>Username:</label><input name=\"username_input\" type=\"text\"/>\n";
- echo "<input type=\"submit\" name=\"submitbutton\" value=\"send\">\n";
- echo "</form>\n";
- if (isset($_POST["submitbutton"]))
- {
- (test($_POST["username_input"]));
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement