Not working

Doug's Avatar


29 Mar, 2011 02:05 PM

Hello this is not working for me. I will put in the script here for assistance.

$docroot = '../';
include($docroot.'inc/');     // This includes jquery 
// DB Connect
$cmd = $_GET['cmd'];
if (isset($cmd)) {} else {$cmd='form';}
switch ($cmd) {
    case 'form': form(); break;
    case 'exe': break;
    default: do_err();

function form() {

$docroot = '../';
$current_menunav = "Members";   
$current_leftnav = "Expenses";  
site_header("test", $docroot, $current_menunav);


<script type="text/javascript" charset="utf-8">
        $("#name").autoSuggest("http://localhost/app/autoSuggestv14/ajaxscriptcall.php", {miniChars: 2});

name: <input type="text" id="name" name="name[]" /><br />

Click the "Submit" button and the input will be sent to a page on the server called "form_action.asp".


site_footer($docroot, $current_menunav, $current_leftnav);

} function exe() {

echo $_POST['name'];

} ?>




$input = $_GET["q"];
$data = array();
$query = mysql_query("SELECT * from members where id LIKE '%$input%'");

while ($row = mysql_fetch_assoc($query)) {
    $json = array();
    $json['value'] = $row['id'];
    $json['name'] = $row['fn'].' '.$row['ln'];
    //$json['image'] = $row['login'].'_thumb.jpg';

header("Content-type: application/json");
echo json_encode($data);


  1. 1 Posted by Doug on 29 Mar, 2011 02:06 PM

    Doug's Avatar

    wow that got all garbled

  2. 2 Posted by Doug on 29 Mar, 2011 02:07 PM

    Doug's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac