• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Php/Java Question - Modern AAC

Kavvson

Gdy boli cie glowa wez
Joined
Jun 25, 2008
Messages
1,177
Reaction score
72
Location
Poland
How can i merge both files into a modern aac injection? With a sql connection. Not a standalone connection.


Show.php

PHP:
<?php
	//connection information
	$host = "localhost";
	$user = "root";
	$password = "";
	$database = "mod";
	$param = $_GET["term"];

	//make connection
	$server = mysql_connect($host, $user, $password);
	$connection = mysql_select_db($database, $server);
	
	//query the database
	$query = mysql_query("SELECT name FROM players WHERE name REGEXP '^$param' LIMIT 30");
	
	//build array of results
	for ($x = 0, $numrows = mysql_num_rows($query); $x < $numrows; $x++) {
		$row = mysql_fetch_assoc($query);
    
		$players[$x] = array("name" => $row["name"]);		
	}
	
	//echo JSON to page
	$response = $_GET["characters"] . "(" . json_encode($players) . ")";
	echo $response;
	
	mysql_close($server);
	
?>

With another+js

Injection.php

PHP:
<?PHP
if ( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
global $config;
?>

<script>
$(function(){
				//attach autocomplete
				$("#search").autocomplete({
					//define callback search format results
					source: function(req, add){
						//pass request search server

						$.getJSON("/show.php?characters=?", req, function(data) {
							//create array for response objects
							var suggestions = [];
							//process response
							$.each(data, function(i, val){								
								suggestions.push(val.name);
							});
							//pass array search callback
							add(suggestions);
						});
					},
				});
			});
			
		function fill(thisValue) {
		$('#search').val(thisValue);
	}

			</script>


<style type="text/css">
	#resizable { width: 97%; height: 100px; padding: 0.5em; }
	#resizable h3 { text-align: center; margin: 0; height 10px;}
	</style>

.... more code
 
Back
Top