HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Not Passing info from GET for LL


Overall this system is great. I have been able to figure out almost everything I need to get this to work on our system. I currently have this system hosted on 2 different platforms: one is hosted over at bluehost, the other is hosted locally. I do this because I am debating if I want to host locally or not.

I have run into a roadblock with LiveLookup. I am currently using XAMPP on Windows Server 2003. I cannot seem to get the LiveLookup to work at all. No errors are coming up at all. The file can connect to the database and even query the correct table, but it just doesnt seem to use the data on the created ticket to actually automate the query like it should. I used the sample script for MySQL that you guys had on your site and it works perfectly fine with Bluehost but not with my local host. As stated previously, I have tested this out to see if it could run a query successfully and it does return the data if I hard code the query into the live_lookup file. It seems as if the $filter is not being populated and thus the live lookup comes back with No Records Found.

Any pointers would be great and if you need code or any other questions answered, please let me know as this is becoming very frustrating being 8 hours into this and still no luck…


Doing some further investigating, it seems almost as if the entire script is not being called at all. I threw in a few file creation lines in the $_GET area of the file that is to create a text file and return the data from the filter.

When doing the LiveLookup, it does not create the file nor return data. If I run the script manually though, it does work properly and creates the file and returns the data at the end.


Hi Kevin,

Sorry for the delay on this.

This could be because your server cannot call itself due to networking. Try going to the LL script directly from a browser on the server to see you can actually reach it. Also check that in the LL settings you’re using HTTP GET and not HTTP POST.


Thanks for the response.

I have already checked the script on the server and it can access it just fine with no issues and it still does the same thing as described before.

As far as the HTTP GET and not POST, I am only using the HTTP GET methods and it is set to that setting in the Settings as well. I have triple checked on the path as well and all is entered properly. I will post my code for the live_lookup_mysql in the next posting to have you take a look at.

<?php /***** DATABASE CONNECTION VARIABLES *****/ $host = "localhost"; $user = "username"; $pswd = "password"; $name = "helpspot"; //database name /***** CONNECT TO DATABASE *****/ $link=mysql_connect($host,$user,$pswd); /***** LIVE LOOKUP LOGIC *****/ if(!empty($_GET['customer_id'])){ //If an ID is passed in use that to make a direct lookup $filter = 'id='.mysql_real_escape_string($_GET['customer_id']); //Assumes a numeric ID, wrap in quotes for an alpha-numeric ID }elseif(!empty($_GET['email'])){ //If no ID then try email $filter = 'email="'.mysql_real_escape_string($_GET['email']).'"'; }elseif(!empty($_GET['last_name'])){ //If no ID or email then search on last name $filter = 'lastname="'.mysql_real_escape_string($_GET['last_name']).'"'; }elseif(!empty($_GET['first_name'])){ //Try first name if no ID,email,last name $filter = 'firstname="'.mysql_real_escape_string($_GET['first_name']).'"'; }else{ $filter = '1=0'; //Don't return any results } /***** QUERY DATABASE *****/ if(!is_resource($link)){ echo 'Unable to connect to database'; }else{ //Select the database to query mysql_select_db($name, $link); //Query the db $result = mysql_query("SELECT * FROM customers WHERE ".$filter,$link); } /***** OUTPUT LIVE LOOKUP XML *****/ header('Content-type: text/xml'); echo '<?xml version="1.0" encoding="ISO-8859-1"?>';


<?php while($row = mysql_fetch_assoc($result)): ?> <?php echo $row['id'] ?> <?php echo $row['firstname'] ?> <?php echo $row['lastname'] ?> <?php echo $row['email'] ?> <?php echo $row['phone'] ?> <?php endwhile; ?>


Ok found the problem on my end. It was a weird issue with my webserver. I rebooted it a few times and it finally took in affect. Very strange but hey I guess whatever works.

Thanks for your help though Ian.


OK excellent. Great to hear you got it worked out, it sounded like it was going to be some type of web server, network issue. If there’s anything else you need please let us know.