1. Add the code to save form data in
/path/to/webroot/feeds/add.php
as shown in the following highlighted code:<?php /** * File: /path/to/webroot/feeds/add.php */ include('init.php'); // If we have data in POST then get it from there else initialize // to empty strings $viewVars['name'] = !empty($_POST['name']) ? $_POST['name'] : ''; $viewVars['url'] = !empty($_POST['url']) ? $_POST['url'] : ''; // Check if form is submitted and if we have a feed name and url // then save the data if (!empty($_POST['name']) && !empty($_POST['url'])) { // First check if the feed being added is already in our database $stmt = $dbh->prepare("SELECT id FROM feeds WHERE url = :url"); $stmt->bindParam(':url', strip_tags( $viewVars['url']), PDO::PARAM_STR); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); // If this is not a duplicate item then only add it if (empty($result)) { $stmt = $dbh->prepare("INSERT INTO feeds SET name = ...
Sphinx Search Beginner's Guide
By :
Sphinx Search Beginner's Guide
By:
Overview of this book
Table of Contents (15 chapters)
Sphinx Search
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Setting Up Sphinx
Getting Started
Indexing
Searching
Feed Search
Property Search
Sphinx Configuration
Customer Reviews