Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "xxxxxxxx";
- $password = "xxxxxxxx";
- $hostname = "localhost";
- //connection to the database
- $dbhandle = mysql_connect($hostname, $username, $password)
- or die("Unable to connect to MySQL");
- echo "Connected to MySQL<br>";
- //select a database to work with
- $selected = mysql_select_db("alcoholr_forminfo",$dbhandle)
- or die("Could not select forminfo");
- //execute the SQL query and return records
- $result = mysql_query("SELECT * FROM FormData");
- //fetch tha data from the database
- while ($row = mysql_fetch_array($result)) {
- echo "<br />ID:".$row{'ID'}."<br /> Name:".$row{'Name'}."<br /> Email:".$row{'Email'}."<br />
- Phone:".$row{'PHON'}."<br /> State:".$row{'State'}."<br /> Comments:".$row{'Comments'}."<br />";
- }
- //close the connection
- mysql_close($dbhandle);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement