hi everyone,
I noticed that one of the pages in my test site for zoop can only validate a form once and then on the second attempt exectues a "pagefunction" type function. You see I have a imageviewer function:
which was suggested on another thread:
http://zoopframework.com/forum/general-discussion/zoop-guide-needed#comm...
class zone_foo extends zone {
function pageShowImage($inPath){
$id = (int)$inPath[1];//not sure of the index of the //array but hopefully you get what I mean
$result = sql_fetch_one("SELECT thumbnail FROM gallery WHERE id=".sql_escape_string($id)." LIMIT 1");
if(empty($result)) {
echo 'Please use a real id number';
} else {
header("Content-type: image/jpeg");
echo($result['thumbnail']);
}
}
}but on the same page I have a "search.tpl"(it only contains a basic search form) and requires to have an input of at least 3 characters it catches a wrong input once and then if you press the submit button again it executes the imageViewer function meaning the page is redirected to http://localhost/example/foo/imagviewer/25
which basically just shows one image?
any ideas on how I can get around this?
thanks,
Rax
The HTML
Would you be able to post the HTML of the page that is not working if it is not too long?
here is the HTML
Sure here it is...
{include file="header2.tpl"} <div id="right"> <h2> Gallery</h2> <div id="welcome"> <table> <tr> <td> <img src="http://localhost/testzoop/objects/imageViewer.php?id=1" alt="db image"> <br /> <a href="{$BASE_HREF}/Gallery/send/gallery1">gallery1</a> </td> <td> <!--<img src="http://localhost/testzoop/objects/imageViewer.php?id=27" alt="db image2">--> <img src="{$BASE_HREF}/Gallery/showimage/27" alt="db image2"> <a href="{$BASE_HREF}/Gallery/send/gallery2">gallery2</a> </td> </tr> </table> </div> </div> {include file="footer.tpl"}