Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Gaining Access To How MySql Parses Text For Full Text


I want to gain access to the function or process MySql uses to parse words and phrases for Full Text searching. Here is an example.

If the user inputs...

Milan in history

MySql will search for milan, history, and milan history. Is there a way to extract just the combination of terms MySql uses to search the db without the stop words? Stop words are automatically eliminated from the search request unless the user encloses a phrase in quotes.

What I am trying to do is develop a script to highlight found search terms and phrases. I can explode a phrase into single words but if I do that the stop words would be included in the array. If there is some way of getting into the parsed words or phrases MySql Full Text actually uses to search, I can use each of those combinations as a keyword in my highlighting script.

This request is about searching for the code or any code related to the questions involved.




View Complete Forum Thread with Replies

Related Forum Messages:
Full Text Search ( Mysql )
I was searching the sql man , for some good ways to search a mysql db. so i found that Full text search the best way is to go becease LIKE just gives to mutch output.PHP Code:

View Replies !
Full-text Search Mysql
I building a little site using PHP and mysql. Now I want to make full
text searches on some columns in one table. The problem is that I have
25 colums in the table that I want to put at full-text index on. I
belive there is a limitation of 14(?) colums. What is the proper way
to handle this?

Reading about full-text indexes, do I have to make a "repair table..."
after each time I insert data in the table the will be included in the
indexed columns? If this is the case I must repair the table every
time I insert anything?!

I am using "DBDesigner 4". How can I see in my table that it is a
full-text index. Seems like it appears as a normal index in my data
definition as well as in the reversed engineered graphical
interface.

View Replies !
MySQL Full-Text Searching
I am reading this article that says by default, the ft_min_word_len is 4 characters and the ft_max_word_len is 84 characters. I don't have access to the MySQL configuration file, is there a way to change the full-text word length settings like using .htaccess?

I access my MySQL using phpMyAdmin, which is shared with a bunch of other users. So I have no rights to make modification whatsoever. Is there a way to modify just my table in there?

View Replies !
MySQL 5.0, FULL-TEXT Indexing And Search Arabic Data, Unicode
MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode

[This version has a couple subtle edits from the orginial I posted
on mailing.database.myodbc - I'm cross posting here on this
topic/subject related newsgroup]

I was wondering if anybody has experienced the same issues
challenges I'm experiencing I'll describe shortly. Once
resolved some fascinating and powerful multi-lingual
apps incorporating non-English/latin character sets can be
realized by many developers.

I have a Unicode utf8 English - Arabic - Hebrew - Greek (and
several other languages) database in Microsoft Excel. I KNOW
that it is Unicode utf8 data because MySQL tells me it
recognizes the encoding as such but not in the context I want.

Allow me to explain ...

I can search the Unicode utf8 encoding with no problem in
Excel. While in Excel I highlight a complete word or a
partial string of an Arabic word copy it to the clipboard
(i.e. memory). I then do a find and the process is the
same successful result as if it was an English string.

MySQL 5.0 is supposed to handle Unicode utf8

I created a MySQL database I named: languages

CREATE DATABASE languages ;

and I implemented the following command on a MySQL
command prompt:

ALTER DATABASE languages DEFAULT CHARACTER SET utf8;

No problem (so far) MySQL seemingly recognized utf8 and
accepted it. My understanding is with the ALTER command
the tables I create against languages will be utf8.

I now created a table I named mainlang which denotes it
will be the main table for my languages.

mysql>CREATE TABLE mainlang
->(
->langNumID varchar(30),
->colB varchar(30),
->colC varchar(30),
->primary key (langNumID, colB)
->);

Again so far no problem: Table successfully created.
My third column 'colC' is where the Unicode data
will be stored.

I now attempt to import the database from my
Excel file into my MySQL database as follows:

mysql>load data infile 'c:arabicdictionary.csv'
->into table mainlang
->fields terminated by ','
->lines terminated by '
'
->(langNumID, colB, colC);
ERROR 1406 (22001): Data too long for 'colC' at row 1

So what to do? I did a search and found other
people seemingly had the same problem and someone
suggested:

ALTER DATABASE languages DEFAULT CHARACTER SET cp1250;

I dropped mainlang, recreated it, redid the load and
Lo and behold ... it seemed to work. No Data too long
error occurred and when I did the following query:

mysql>select langNumID, colB, colC
->from mainlang
->where colB = ��'

I see colA have a correct numeric value, colB a
correct numeric value (4994) and for colC a string of
unintelligible characters with diacritical marks,
oomlats etc. which I know is the cp1250 encoding
interpretation of the Unicode utf8 data which is
similarly unintelligible in its own regard.

Now what I try is: do a copy of the obscure colC
cp1250 character string into the clipboard/memory
and then do the following tweak on the original
select statement to see if I can search on the
(now) cp1250 character string:

mysql>select langNumID, colB, colC
->from mainlang
->where colc = 'paste of the cp1250 character string'

The computer would not allow a paste unless I pressed
the escape key. On initiating this select command
I got an empty set (no match)

My questions are:

Has anyone been successful creating a Unicode utf8
MySQL database that accepts Arabic?

If yes, how did you get around or not encounter the
Data too long issue?

Have you tried the cp1250 (or cp1251 - same mechanics
same results) work around as I have? Are you
able to search the cp1250 character string (my colC)?
If yes, how did you successfully manage to do it?

Lastly, if I take the cp1250 encoded string and paste
it into Excel ... I can string search the cp1250
encoding with no problem.

Also, here's how I know my Unicode utf-8 data is
correct apart from my own manual cross-referencing
and being recognized by MySQL in some respect:

When I copy the Unicode utf8 encoding and try to
paste it into the select command to see what would
happen I get the following error:

ERROR 1257 (HY000): Illegal mix of collations
(cp1250_general_ci, IMPLICIT) and
(utf8_general_ci, COERCIBLE) for operation '='

So what I have here is a situation where MySQL
is recognizing Unicode utf8 encoding but not
from the respect of packing a table!

Go Figure ...

View Replies !
Full Text Search After Upgraded Mysql To Lastest Version Not Working
i upgraded mysql to lastest version one of my query worked right in previos version but it doesn't work now. i have a table with "test" name and 4 fields (id,title,intro,content)
these fields are full text: Code:

View Replies !
Full Text RSS
I am trying to built up an script that will produce Full Text RSS from Partial Feeds/RSS, but I couldn't figure out from where I have to start.

Furthermore I wanted to filter-out certain data like graphics, adsense code, html code etc from the RSS. Code:

View Replies !
Full Text
I'm trying to tweak my search engine a bit and I've discovered a weird lil' glitch. My SCORE variable for every single entry is coming back as a Ƈ'. It's not a floating number like the examples are in the MySQL manual. PHP Code:

$query_articles = "SELECT *, MATCH(body, title, subject1, subject2, author) AGAINST ('$searchtopic' IN BOOLEAN MODE) AS score FROM data_array WHERE MATCH (body, title, subject1, subject2, author) AGAINST ('$searchtopic' IN BOOLEAN MODE) AND live_timestamp < $now AND `live` = 1 ORDER BY score DESC";

View Replies !
Full Text Search
First off, I'm using MySQL 3.23 so I'm not sure if Full Text Searches are even in that version since there isn't any documentation for versions before 4. Code:

View Replies !
Full Text Query
I have a very simple query in php:

$query = "SELECT *, MATCH(products_name, products_description, products_keywords, products_notes)
AGAINST ('carb') AS score FROM products
WHERE MATCH(products_name, products_description, products_keywords, products_notes)
AGAINST ('carb') ORDER BY score DESC";
$result = mysql_query($query) or die('Error, query failed');

I get "query was empty", but when i put this query in phpmyadmin, it works fine.

View Replies !
Database Password Security - Gaining Access To The Contents Of File
Why is it advisable to place scripts which contain details of your
login and password outside of the publicly accessible web area on your
server.

Surely if the files that contain the details are given a php extension
then no-one can get at the information contained by these files even
if they point their browsers directly at the correct named file,
because apache will parse the php file before it is sent.

i.e.

if the file is called options.php and it resides in the web root
directory and contains the following ;-

<?php
define('DBUSER', 'Username') ;
define('DBPASS', 'Password123') ;
?>

If a web user points their browser directly at this page they will
just get a blank page - is there another way of gaining access to the
contents of this file that I am overlooking?

View Replies !
Full-text Indexing Of Pdf, Rtf, Txt, Html
I have a big pile of files on my local machine that are in a variety of
formats - txt, rtf, pdf, html, etc. What I'm looking for is a script
that will crawl through the files and perform simple full-text indexing
on them, and will allow for queries to be executed on the index.

I gave PHPDig a shot but it prefers web-based setups - my files are all
stored locally and will only be accessed locally.

View Replies !
% Wildcard & FULL-TEXT Searches
With regards to this SQL statement.... It works great for multi-word searches but those searches have to be spelled correctly. I have discovered two FLAWS:

1. It does not allow for partial matches: i.e. 'shane' if the search is spelled 'shan' it will not find it. I cannot figure out how to get the '%' Wildcard into this statement so it will work.

2. It will ony show results for the first column the search word(s) are found in.

For example, I type in 'shane' and I will get all listings for 'shane' only from the 'wname' column. The search query stops at the first column 'wname' in the SQL statement below and ignores that 'shane' is also located in several other columns and records. Code:

View Replies !
Boolean Full Text Search
I use MySql boolean full text search for searching and i allow user to search for phrases with 'and' and 'or' operators in it, but it doesn't work for certain words, like 'use' and 'due'. Search ignores these words. Well, 'use' is a full-text stop word, but why 'due'? Is it because it's a 3 letter word or something? how to overcome this problem or is there any better search engine for me to use with php & MySql?

View Replies !
FULL-TEXT Search Not Working?
I'm doing a Full-Text search on MySQL. My table structure is as follows:

articleID,articleTitle,articleContent
articleContent is a FULL-TEXT Index.

There are about 70 articles some which contain the "keyword" example below. For some reason I'm getting ZERO rows returned and I'm not sure why.

I figured maybe my version of mysql was too old, but it is version 4.1.24 which according to the manual should support the following:

SELECT articleTitle FROM PressArticles WHERE MATCH (articleContent) AGAINST ('Miami');

However, it doesn't give back any results. I'm thinking I did something wrong in the query itself, but after 2 hours I just cant see what is wrong with it.

I'm trying to get the Titles of the articles that have the word Miami in the content.

View Replies !
Full-text Boolean Search
I have just started working on full-text boolean search.I have coded the program but I get an error :

You have an error in your SQL syntax near 'boolean mode)' at line 1

The fields in mysql table 'pubs' are :id,author,title,year. Here's my code:

View Replies !
Full Text Search More Than One Table
I'm building a full text search but would like the search term ($id) to search more than on table.

$query = "SELECT * FROM titles, artists WHERE artists.id = titles.artist_id AND MATCH(artists.artist, titles.title, titles.content) AGAINST ('$id')";

I get the following error (the query work if I search only one table i.e. titles) Error in query: SELECT * FROM titles, artists WHERE artists.id = titles.artist_id AND MATCH(artists.artist, titles.title, titles.content) AGAINST ('music').

View Replies !
Boolean Full Text Searchs
So i've got the basic jist of how the boolean searches for full text myisam databases work, One small gripe that I have a concern with and thats literal string searching. By default when you type in a search, For example the word "QUIT" it literally only finds a word that matches exactly "QUIT". However, I would like to figure out somehow to automatically add wildcard to the end of that to take any result with the word quit in it, Such as "QUITE" or "QUITS" or even "QUITESSON".

View Replies !
Full-text Searching Two Tables
I'm trying to create a full-text search engine for my blog. I read the tutorial, and I grasp the basics of how to search a single table.

However, when a user enters a search term, I want to search both the table of blog posts (vsns_news) and the table of comments (vsns_comments) for the term and treat the results on equal footing.

That is, I don't want to display first the results from blog posts and then the results from comments: they should intermingle in order of decreasing relevancy.

However, I can't for the life of me come up with a query that will search both tables and return a combined result set for them. Is there a way to use just one query?

View Replies !
Full-text And Sort By Score?
how to sort full-text by score. This is the query I'm using right now.

sql = "SELECT product_id, bild, bilden_forestaller FROM products WHERE MATCH (bilden_forestaller) AGAINST ('$fritext')";

I have tried several ways but I can't get it to work. Please tell me how to rewrite my query. I also want to show the score (in percent) for every row I get back from the query.

View Replies !
Full Text Search Any Records
The following query does not bring back any records but they are definitely there For example the category field contains the words "Designer Men" and the brand is "Duck And Cover" (in the mySQL db). This code is a direct copy of another query but for "ladies ladie women women's" and it works prefectly this is why i do not understand it Here is the offender: PHP Code:

$num3 = getPORProducts("SELECT * FROM por WHERE MATCH(longDescription, category, description, brand, name) AGAINST('+"Duck &amp; Cover" "Duck and Cover" "Duck & Cover" +(mens men's men)' IN BOOLEAN MODE)");

p.s. to save you some time the problem is definitely with the code above, and has nothing to do with the functions i have created.

View Replies !
Full Text Search In PDF And Word Files ?
I need to perform full text searches on a batch of PDF and Word files.
What is the best way to go?

After some research, I'm thinking of extracting the plain text from the
files with "pdftotext" and "catdoc", hamonizing the various possible
encodings to UTF-8, storing the text in a MySQL database, and then
using the full text search capabilities of MySQL.
Do you think that would work well? I am told that the files are mostly
text and won't be longer than 30 pages.

View Replies !
Full Text Search With Pagination Class
I've used the Full Text search example from this site and added the pagination class from http://www.goodphptutorials.com/article/show/simple-php-mysql-pagination/1 but I'm stumbling where it actually breaks the page up into the prescribed number of page. Right now I have script set for 5 results per page and while I can get the total number of records in the search result set, I can't get the results to span over say 3 pages if there's 15 results. Code:

View Replies !
How Do I Echo Out Relevence In Full Text Search?
I wonder how to echo out relevance when doing a full text search? Here is my code that do the search:

$result = mysql_query("SELECT product_id, picture AS relevance FROM products WHERE MATCH (picture_is) AGAINST ('$keyword')");

I know how to echo out the result, but I also want to echo out the relevance like I have seen on some websites. I also tried the query in phpmyadmin and could see the relevance, just don't know how to get it in php.

View Replies !
Full Text Searching MSWord Files
I have a project that require to full text search some user uploaded documents on a Linux PHP based server. I basically need to open the word (.doc) files and full text search them, than simply allow the user to retrieve them.

I know on win based servers you can use the COM module to read word file, my question is if anyone has figured out how to do the same on Linux. Code:

View Replies !
Creating Temporary Table From Full-text Query
i'm using a full-text search on my db which works fine, but now i'm working on filtering the results further, like products in range of prices. my logic is to simply SELECT them out of the temporary table, only if it would be created. i don't think i need to paste any code since i think you get the idea.

View Replies !
Full Text File Search With Indexing Service On Windows
Here's a short tutorial on how to the OLE-DB extension to access
Windows Indexing Service. Impress your office-mates with a powerful
full-text search feature on your intranet. It's easier than you think.

First, download and install the extension
(http://sourceforge.net/project/show...kage_id=198554).
Simply unzip the file and copy the correct version of php_oledb.dll
into the PHP extensions folder. Then add the line
extension=php_oledb.dll in php.ini and restart your web server.

Now, if Indexing Service isn't running on your computer, turn it on. Go
to Control Panel Administrative Tools Services and configure
Indexing Service to start automatically. You can also ask the little
dog in the search window to do it for you if you're using Windows XP.
You will need to wait a while for Windows to build the initial index.
It could take a couple hours.

Once the extension is installed and the index is ready, you can start
coding. To connect to Indexing Service, you use the oledb_open
function:

$link = oledb_open("Provider=MSIDXS");

You then call oledb_query with a SQL statement. Let us start with
something simple: We'll look for all files on the computer containing
the word "love": .....

View Replies !
Quickly Adding Text To A Mysql Text Field That Is NOT Empty
Is there a way to insert text into a mysql text field that already has
text into it; without having first to extract the existing data and
append the new text to that string variable and then insert the new
string.

Basically i'm looking for a way to do it with a single query not 2 (one
being a select to gather existing data).

View Replies !
Give User A Choice Of Fields To Search With Full Text/Boolean?
I want to give the user the option of searching a combination of the fields $Topic, $Subtopic, $Theswords in Boolean/Full Text. The problem is if I make any of the fields empty prior to the query, I get a MySql syntax error message. The user has the option of selecting fields via checkboxes, but when the field is not selected the user will get the error message because the variable is empty in the query statemtnt.

Are there any code suggestions for avoiding the error message when a field is not selected by the user to be searched? Code:

View Replies !
Display Some Text To The Screen Via A Link To The Text In A Mysql Db.
I am just screwing around a little and trying to display some text to the screen via a link to the text in a mysql db.

View Replies !
Gaining Data From The Same Table: MYSQL
I have a problem that im currently trying to work through. I have table (called run_horses) that has columns as follows:

horse_id, sire_id, dam_id, damsire_id

then another table called sires that has:

id, sire_name

both the sire_id and damsire_id correspond to the id from the sires table.

Now i want to display results from the run_horses table to display the sire_name from sires that corresponds to sire_id and damsire_id but as both get this from the sires table and it will be different names for both im not sure how i do this. I beleive it involved something called a self join? But have never used or have any experience of this.

View Replies !
Access An Array From A Text File?
Im trying to build an array from elements I have stored in a text file
(So I can access them on multiple pages). What is the syntax for this?
I thought it might be...

storedArray1 = array(require_once("/arrays/stored_array_1.txt"));

or

storedArray1 = array(include("/arrays/stored_array_1.txt"));

but I guess you can only use the 'include' statement when inserting
text into html code NOT php code?

View Replies !
Problem Exporting Numbers To Text From Access
I am exporting an Access table into text, which is then imported to SQL. My problem is that all exported number fields are given the #.## format, with two decimal places. THis is annoying with integers, but it is killing me with my FLOAT values, for which I need three digits past the decimal.

Question: How can I modify Access so that it exports numbers into a text file in the format I desire? I have read documentation about changing this in the Export wizard, but my Wizard gives no option for this, at least that I can find.

View Replies !
2 People Try To Access The Same Text File At The Same Time
If 2 people try to access the same text file at the same time to write to it - what happens in PHP. What I mean is - presumably the first will be. But what will the second person actually see in his browser. And what will php do about it if not specifically programmed to deal with it ie whats the default behaviour.

View Replies !
Read & Full Access
We have a login page that we have people login to access information. We want to be able to deny access to a certain link depending on what password they enter.

the login informatin is pulled from the DEALER_NUM and PASSWORD field in the table. I have created a field called PASSWORD2 which is what we will be using for the special access if thats what you want to call it. Code:

View Replies !
Rich Text Editor Which On Submit Updates The Field To Have The New Text
I have my content stored in a database. I need a rich text editor (so the user doesnt need to include HTML) so they can edit contact. So a rich text editor that displays whats in the current content field and can be edited so on submit it updates the field to have the new text. Get what i mean?

View Replies !
Create A Simple Text Editor That When Used Adds The Text To A .txt File.
I am trying to create a simple text editor that when used adds the text to a .txt file. At the moment im having trouble with the formatting of the text in terms of new lines.

If i write in one long sentence the positioning of the text is fine however if i try to use paragraphs extra lines are added in and then the code gets confused and makes parts of the paragraphs titles, shown in bold.

View Replies !
Regular Expression :: Replace Nested Text With Replacement Text
How can I setup a regular expression to replace nested text with replacement text. I can't explain it very well, but say I want to replace [asdf] with <asdf>, and my sample text is: Code:

[asdf]adsfasdf[asdf]adsfadsf[/adsf][/adsf]

I end up with this: Code:

<asdf>adsfasdf[asdf]adsfadsf</adsf>[/adsf].

View Replies !
DB Access Objects VS Full Code
I was wondering if there is any difference in performance between using DB access objects and standard DB access code. Reason I'm asking is I believe each object takes a piece of memory and if I have a site that gets huge traffic and is heavily populated with DB info wont it burn through the server memory rather fast? For example I use this type of structure in a lot of my programs to perform queries on the DB’s. PHP Code:

View Replies !
Full Access Path Of A File
how can i find the full path of a file on a particular site

like if a file "test.php" is on a domain http://www.xyz.com , how can i get this

http://www.xyz.com/test.php

View Replies !
Text Area Not Accepting Large Amounts Of Text
I have a form where teachers enter homework assignments and they are then stored in a MYSQL database and retrieved elsewhere.

I have been using "get" with the form. The code is simple:

<textarea name="array[assignment]" cols="60" rows="10" id="array[assignment]"></textarea>

It does allow post of 100 words, etc. Stuff that teachers normally submit.

What's happening is that it won't allow very large posts (over 300 words maybe? ) Not sure what the cut off is. When you press submit it won't go, or there is an error where it won't submit.

Is there a limit for text fields? Since the fields scroll, I didn't think that having only 60 rows was any type of real limit, I though you could put in as much as needed. But then all of it ends up in the address bar, so there must be a limit of some sort.

View Replies !
Imagettftext() Gives Grainy Text When Writing Aliased Text
I'm using a bundled version of GD: 2.0.23 compatible. When using the
function imagettftext() with a negative color to get a aliased text,
the text gets grainy. What could be wrong? I've tried several ttf
fonts, with the same result.

View Replies !
Read And Display Japanese Text From Text File
I posted a question regarding reading japanese
text from a text file.

Well, since I solved the problem, I thought I'd post my solution for
the benefit of other people with the same problem.

The plan was to make a script to read and display japanese text. I
will use it for making a japanese proverb script and for a japanese
language study script.

Method :

I wrote a simple kanji text file (saved with UTF-8 encoding)
I wrote a simple PHP script to display the file contents (saved with
UTF-8
encoding)
I specified the content-type header for the HTML page :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

*** All files have the same encoding. ***

UTF-8 supports japanese characters.

and it works!

this is my PHP (and HTML) script :

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHP : Japanese Text File Read : Exercise 1</title>
</head>
<body>

<?php

$filename="japanese.txt";
//open file
$fp = fopen($filename,'r');

//loop through each line in the file
while($line=fgets($fp))
{
//output current text file line
print $line."<br>";
}
//close file handle
fclose($fp);

?>

</body>
</html>

I know it's a very simple script, for testing purposes only. It
displays the contents of the japanese text file line by line.

The key was to save all files in the same encoding (I used UTF-8) and
to specify the encoding / charset in the HTML header (<meta
http-equiv="Content-Type" content="text/html; charset=utf-8">)

View Replies !
GD Text Alignment - Specifically Place Text Over An Image
I need to specifically place text over an image. I've got the image creation down, but all I can seem to do is center the text. So lets say I have an image 300px(W) by 150px(H). I want to right align the text.

View Replies !
Search Text - Click To Make Value Text Dissapear
I am using php for my site and in the header I have the code below for the search box. Inside the search box I have Enter Keywords. Does anyone know how I can make the text dissapear when a user clicks inside the search box once? Code:

View Replies !
Append Text At End Of Existing Text On Same Line
I'm working on a part of my web site that uploads images, then writes the name of the image to a text file. The upload part works fine. The part that writes the name of the image to the text file works fine.

What I'm trying to do is, after all the files have been uploaded and all of the image names have been written to the WriteTo.txt file, append a written description of the picture at the end of the picture name. In other words, after a user uploads their pictures to the server I want to direct them to a page where they can label each of the pictures using a form. PHP Code:

View Replies !
Adding Text To Text Window With A Button
I have made an admin section of a site, What i want to do i have buttons under that have "BOLD" "center" and when clicked it adds <b></b> tags to the text area etc etc..

if the text area was called "message"

how would i going about coding the images / buttons to add the code?

View Replies !
PHP - Using Mail() And Unicode Text - Text Gets Disturbed
I have the following problem. On a website there's a (simple) feedback
form. This is used also by Polish visitors who (of course) type Polish
text using special characters.

However, when I receive the text in my mailbox, all special characters
have been turned into mess......

For example: "wspólprace" is turned into "współprace".

It seems PHP is handling the Unicode-8 strings quite well (when I
'echo' the strings on the site, I see the text correctly), until the
point that it is send by using mail().

Is this a server configuration issue? Or something else?

How can I get my text to remain in Unicode?

I have this problem both on my testserver (Apache 1.3.28, PHP 4.3.2 on
Windows XP) as on my providers server (Apache under Linux).

View Replies !
Remove Text Header In Text File
I have been having trouble removeing two header lines at the top of my txt file. You will see in my code the different things I have tried but with no luck. Below I posted my script and data. I am doing a few other things in my script as you will notice but this is the only thing I am having troble with. Code:

View Replies !
Parsing Text - Capture Text Between Two Tags
I want to have text in files, such as

{body}
{/body}

and then be able to open that file and grab all of the data inbetween those tags. I could open the file and go through it until I see the {body} tag and then store data until I reach {/body} but that is a bad way to do it.

View Replies !
Text Returned From DB Gets Cutoff When Placed In A Text Field
I have a string that contains an apostrophe or a quotation mark, stored in a DB. I can retrieve the data, and display it properly (for editing) in a textarea, but when I try to put the string in a text field, it get's cut off right before the questionable character.

For example:
$string_in_database = "John's car."

 -displays correctly here <textarea><?php print $string_in_database ?></textarea> and displays this - John's car.

 -gets cutoff here <input type='text' value=''<?php print $string_in_database ?>' /> and displays this -  John

I've tried adding slashes and stripping slashes and I just can't figure out what I need to do.

View Replies !
Keep Text In Text Boxes After Form Is Rewritten
I'm trying to make a form that does the following:

(1) the user answers a question by typing in a text box
(2) a response is then written below the form, saying whether the answer is right or wrong and, perhaps making a comment of some kind
(3) the user's answer remains visible in the original text box

I've managed to write some code that does the first two things, but despite many attempts and much searching for code examples, I've failed to find a way of getting the answer to reappear in the text box when the page is rewritten.

This is my code:

View Replies !
Use Htmlentities When Inserting Text Into A 'text' Field
Should I use htmlentities when inserting text into a 'text' field or should I leave the input and htmlentities the output when displaying?

Pound signs etc work, but having issues with & (&amp;) and trying to strip_tag at the same time?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved