Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

xymalf on "Syntax error"

$
0
0
//  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 all articles
Browse latest Browse all 8245

Trending Articles