Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- $item = $_POST['name'];
- // Connect to DB
- mysql_connect("hostname", "username", "password") or die(mysql_error());
- mysql_select_db("dump") or die(mysql_error());
- //select Data
- // Get a specific result from the "typeName" column:
- $result = mysql_query("SELECT `typeID` FROM `invTypes` WHERE `typeName` = '$item'") or die(mysql_error());
- // Get the result:
- $row = mysql_fetch_array( $result );
- // Print out the typeID
- echo $row['typeID']." ".$row[''];
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment