
Itsnoprob
User
Mar 16, 2009, 9:39 AM
Post #3 of 10
(2067 views)
Shortcut
|
|
Re: [sagentic] Help needed, please, to get started with Search...
[In reply to]
|
Can't Post
|
|
Hi Kenny, Thanks for the reply... I note your point about charset=utf-8 (but I don't know why?) I hope the code info below gives you what you need to point me in the right direction..... My main page for FAQs is http://www.itsnoprob.co.uk/Content_Management_System_FAQs.php which has questions and answers as you laid out. The code for my Search Page currently - http://www.itsnoprob.co.uk/Search.php - is just: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 2</title> </head> <body> <form method="GET" action="http://www.itsnoprob.co.uk/Search_Results.php"> <input type="text" name="answer_keyword" value=""> <input type="submit" name="submit" value="Search"> </form> </body> </html> The code for my results page currently - http://www.itsnoprob.co.uk/Search_Results.php - is: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 2</title> </head> <body> <!-- STEP1: Load Record (Paste this above other step) --> <?php require_once "/home/itsnoprobuk/public_html/cmsAdmin/lib/viewer_functions.php"; $options = array(); // NOTE: see online documentation for more details on these options $options['tableName'] = 'faq'; // (REQUIRED) MySQL tablename to list record from. Example: "article"; $options['recordNum'] = ''; // (optional) Record number to display. Example: "1"; Defaults to number on end of url, then 1 $options['where'] = ''; // (ADVANCED) MySQL WHERE conditions to use INSTEAD of recordNum to look up record. Example: "fieldname = 'value'" $record = getRecord($options); ?> <!-- /STEP1: Load Record --> <!-- STEP2: Display Record (Paste this where you want your record displayed and re-arrange fields) --> <h1>FAQ Page Viewer</h1> <?php if ($record): ?> Record Number: <?php echo $record['num'] ?><br/> Question: <?php echo $record['question'] ?><br/> Answer: <?php echo $record['answer'] ?><br/> Sort (optional): <?php echo $record['sort'] ?><br/> <?php endif ?> <?php if (empty($record)): ?><!-- Display "No Records Found" Message --> No record found!<br/><br/> <?php endif ?> <!-- STEP2: /Display Record --> <!-- STEP3: Display Uploads from 'upload' (Paste this where you want your uploads displayed) --> <!-- Upload Program Fields : num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath --> <!-- Upload Image Fields : isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight --> <!-- Upload Info Fields : info1, info2, info3, info4, info5 --> <?php if ($record): ?> <?php foreach (getUploads($options['tableName'], 'upload', $record['num']) as $upload): ?> <?php if ($upload['hasThumbnail']): ?> <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/> <?php elseif ($upload['isImage']): ?> <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/> <?php else: ?> <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/> <?php endif ?> <?php endforeach ?> <?php endif ?> <!-- STEP3: /Display Uploads from 'upload' --> <div style="float: right; font-size: 10px; color: #999999"> <a href='http://www.interactivetools.com/'>Content Management</a> by interactivetools.com<br/><br/> </div> </body> </html> I 'know' this is totally wrong but I'm going round in ever decreasing circles trying to understand why?? Thanks, Nigel [b][url]http://www.Itsnoprob.co.uk[/url][/b] [b]Personal Service on the Net![/b]
(This post was edited by Itsnoprob on Mar 16, 2009, 9:42 AM)
|