Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $HOST="10.133.96.132";
- // Database user
- $DBUSER="tibco";
- // Database password
- $PASS="suyash123";
- // Database name
- $DB="HIPPO2TEST";
- // Database Error - User Message
- $DB_MSG_ERROR='Could not connect!<br />Please contact the site's administrator.';
- ############## Make the mysql connection ###########
- $conn = oci_connect("tibco", "suyash123", "//10.133.96.291:7041/HIPPO2TEST");
- if (!$conn) {
- $m = oci_error();
- echo $m['message'], "n";
- exit;
- }
- $c = "SELECT * FROM SERVICES";
- $result = oci_parse($conn, $c);
- if(oci_execute($result))
- {
- $row=oci_fetch_row($result) ;
- print"<tr><td><p>Name:</td><td>$row[0]</td></tr>";
- print"<tr><td>Name2:</td><td>$row[1]</td></tr>";
- print"<tr><td>Name3:</td><td>$row[3]</td></tr>";
- print"<tr><td>Name4:</td><td>$row[4]</td></tr>";
- print"</table></br>";
- }
- oci_close();
- ?>
- <html lang="pt" dir="ltr">
- <head>
- <title>Search And Show Without Refresh</title>
- <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <!-- JQUERY FROM GOOGLE API -->
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script type="text/javascript">
- $(function() {
- $("#lets_search").bind('submit',function() {
- var value = $('#str').val();
- $.post('db_query.php',{value:value}, function(data){
- $("#search_results").html(data);
- });
- return false;
- });
- });
- </script>
- </head>
- <body style="margin:0;padding:0px;width:100%;height:100%;background-color:#FFFFFF;">
- <div style="width:1024px;margin:0 auto;height:100px;background-color:#f0f0f0;text-align:center;">
- HEADER
- </div>
- <div style="width:1024px;margin:0 auto;height:568px;background-color:#f0f0f0;text-align:center;">
- <form id="lets_search" action="" style="width:400px;margin:0 auto;text-align:left;">
- Search:<input type="text" name="str" id="str">
- <input type="submit" value="send" name="send" id="send">
- </form>
- <div id="search_results"></div>
- </div>
- <div style="width:1024px;margin:0 auto;height:100px;background-color:#f0f0f0;text-align:center;">
- FOOTER
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment