Title: Syntax error
Last modified: August 21, 2016

---

# Syntax error

 *  [xymalf](https://wordpress.org/support/users/xymalf/)
 * (@xymalf)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-89/)
 *     ```
       //  Then you actually have to declare the functions that will generate the pages/page content.
       function boj_menuexample_settings_page() {
   
         echo "<h1>Settings Page</h1>";
   
       }
       function boj_menuexample_about_page() {
   
         echo "<h1>APPLICATION</h1>";
   
       function displayBook ($resultItems)
       {
       foreach ($resultItems AS $item)
       {
       $title = $item['ProductName'];
       $url = $item['Url'];
       $image = $item['ImageUrlSmall'];
       $authorList = implode($item['Authors'], ", ");
       $price = $item['ListPrice'];
       if ($url != "") echo "<img src=\"$image\" align=\"left\">";
       echo "<a href=\"$url\" title=\" Learn More at Amazon.com\">$title<a><br>";
       echo "Author(s): ". $authorList. "<br>";
       echo "List Price:" . $price;
       echo "<br>";
       }
       }
   
       function runSearchQuery($client, $keywords, $page, $mode , $type='lite')
   
       {
       $params = array(
       'keyword' => $keywords,
       'page' => $page,
       'mode' => $mode,
       'tag' => 'xymalfsentert-20',
       'type' => $type,
       'devtag' => 'AKIAIQ2ZQ6JWDC5LOJLA',
   
       );
   
       $namespace = 'http://soap.amazon.com';
       $action = 'http://soap.amazon.com';
       $method = "KeywordSearchRequest";
       $result = $client->call($methos, array('KeywordSearchRequest' =>$params),
       $namespace, $action);
   
       return $result;
   
       }
   
       <form action="./soap.search.php" method ="get"> ## syntax error #
       <input type="text" name="query">
       <input type="hidden" name="page" value="1">
       <select name="mode">
   
       $modes = array();
       $modes[] = "books";
   
       foreach ($modes as $mode)
       {
       echo "<option value =\"$mode\">$mode</option>";
       }
       </select>
       <input type="submit">
       </form> #syntax error ##
   
       $resultItems = $result['Details'];
   
       switch ($mode)
       {
       case "books":
       displayBook($resultItems);
       break;
       }
       if ($result['TotalPages'] > $page)
       {
       $page++;
       echo "<a href=\"soap.search.php?query&mode&page=$page\"> Next 10 Results</a>";
       }
   
       }
       function boj_menuexample_uninstall_page() {
   
         echo "<h1>Uninstall Page</h1>";
   
       }
   
       ?>
       ```
   
 * getting syntax errors also would like the amazon tags on my setting page and 
   be able to get variables into my app.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [kjodle](https://wordpress.org/support/users/kjodle/)
 * (@kjodle)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-89/#post-5055544)
 * What are you trying to do?
 * Don’t just post code, tell us what you are trying to accomplish, what you are
   actually seeing (tell us the actual syntax error), and tell us where you are 
   inserting this code.
 *  Thread Starter [xymalf](https://wordpress.org/support/users/xymalf/)
 * (@xymalf)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-89/#post-5055599)
 * The syntax error is in line 79 where the form is. I am trying to write a plugin
   that call pull data from Amazon and then allow the user to save it as a post 
   with his affiliate ID attached. I am not sure if SOAP is best for this. I don’t
   know how to pass variables to the Amazon API.
    Ideally I wanted the Amazon settings
   dev tag and tag on the setting page and the SEARCH parameters keywords , category
   or the application page.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Syntax error’ is closed to new replies.

## Tags

 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [xymalf](https://wordpress.org/support/users/xymalf/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-89/#post-5055599)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
