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.





Convert Special HTML Characters On Include


All I need to do is include the file "menu.html" (the actual menu contents, exported from MS Word - a requirement) in the dailymenu.php template. However, the menu.html file has all sorts of special characters - due to the fact that french, spanish, and itialian food names contain special characters:

example: , , , , , , etc. etc.

so when I do a simple:

<?php include("includes/menu.html"); ?>

in the dailymenu.php file, the output is crapped up by the special characters not being converted.

Any way you know to include the menu.html file in dailymenu.php template and fix the special characters all at once?




View Complete Forum Thread with Replies

Related Forum Messages:
Special Characters - Convert To Html Code The Characters ã, á, à, é, ç, ...
How ould i convert to html code the characters ã, á, à, é, ç, ...

View Replies !
Convert Special Characters But Not The Tags Of Html.
I have the follow code:

echo "<base target="_blank" /><font face="arial" size="2">
";
echo "<meta http-equiv=Content-Type content=text/html; charset=utf-8 />";
echo (htmlentities($NoteBook));

This code converts the special characters to format html. My problem is that the tags html (example <img src = "">) also are converted them and what I want only convert special characters but not the tags of html.

View Replies !
Convert Special Symbols Into Web Characters?
I have several PHP webforms that submit information to my MySQL database. However,when a user cuts & pastes from a WORD document, and clicks submit,all of the special characters (i.e. em-dashes) get changed into wierd symbols.

Is there some simple line of code that I can use to convert these special symbols into web characters? Or some other simple way to fix this?

View Replies !
Special Html Characters
I want to remove all special html characters (e.g. &amp;, &nbsp;, &#149;, ...) from a file. Is there a function available for this?

View Replies !
HTML Special Characters
How to deal if someone enters something like this in textarea field?

&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;
&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;
&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;&#9825;&#9829;
&#9825;&#9829;&#9825;&#9829;&#9825;&#9829; &#9556;&#9574;&#9574;&#920;
&#9574;&#9574;&#9574;&#920;&#9574;&#9574;&#9574;&#920;&#9574;&#9574;
&#9574;&#920;&#9574;&#9574;&#9559;&#9556;&#9574;&#9574;&#920;&#9574;
&#9574;&#9574;&#920;&#9574;&#9574;&#9574;&#920;&#9574;&#9574;&#9574;
&#920;&#9574;&#9574;&#9559; &#9827; E &#9827; N &#9827; J &#9827;
O &#9827; Y &#9827; &#9562;&#9577;&#9577;&#920;&#9577;&#9577;&#9577;
&#920;&#9577;&#9577;&#9577;&#920;&#9577;&#9577;&#9577;&#920;&#9577;
&#9577;&#9565;&#9562;&#9577;&#9577;&#920;&#9577;&#9577;&#9577;&#920;
&#9577;&#9577;&#9577;&#920;&#9577;&#9577;&#9577;&#920;&#9577;&#9577;

How to remove these with PHP?

View Replies !
Special Characters Generated Html
$input3->setAttribute("value","<?php print $_SERVER['REQUEST_URI']; ?>");

<input ... value="&lt;?php print $_SERVER['REQUEST_URI']; ?&gt;">

I just don't want that $lt and $gt appear on the generated html, I want my <?php and ?> back

View Replies !
Convert The Quotes To There Respective HTML Characters.
Can anyone suggest why the following does not convert the ampersands to &amp; please when the form is posted? It actually does nothing except escape the quotes but my understand was that it should convert the quotes to there respective HTML characters.

$subject = htmlspecialchars($_POST['subject'], ENT_QUOTES);

'subject' is the name of my text field in my form. If I type single or double quotes, they are successfully escaped because I am using ENT_QUOTES therefore I know part of it is working, however the ampersands are not converted at all.

View Replies !
Why Does PHP Automatically Convert Cyrillic Characters To HTML Entities?
When I enter Cyrillic characters into MySQL, it gets converted to ш or
something. How do I disable this and is there any workaround?

View Replies !
Replace Special Characters By Non-special Characters
i'm looking for a way to replace special characters with characters
without accents, cedilles, etc.

View Replies !
Special Characters - Foreign Characters
I'm experiencing a strange problem in displaying some text I have extracted from an XML file that I haven't had much success in solving. I am retrieving some remote XML, placing it in an array, and extracting the data I need, then inserting that into a MySQL database so it can be manipulated and merged with other data.

Some of the data includes location names, such as the one below, which include foreign characters that have been translated into a special character. For some reason, these are actually being displayed in the form shown below. For example and ampersand appears as &amp; and not as &. PHP Code:

C&#244;te d'Ivoire

View Replies !
Need Help With Special Characters
A simple form that asks a player Nick, a Quake 3 Nick

Where:

^1 = Red
^4= Blue, etc.

Through ^1 to ^8 you get the colors.

For example: ^4<LGG>^2Ozzman Will display: <LGG>Ozzman

The problem is that special characters causes errors or I can't echo the variables correctly. < and > is a TAG for PHP so it disapear when I echo the $nick var.

And what about the ^ or other special characters?

How Can I do this?

View Replies !
Special Characters
I'm writting a news management script and I have run into a problem. When some submits a news artical it sometime contain special characters that might now show up on all browsers. Is there a way to makeit check for the characters and switch them to html that can be read by browsers. Is there a way to do this and name it as like, filter.inc then just tell the program to just use this inc file before sending the content to the database. I want to be able to use the special character to html lib for other programs.

View Replies !
Special Characters.
When I put in a textarea some french charactes, when I get them back
with a SQL request, all is correct.

With phpMyAdmin, in the database, I can see this:

Et voil que la star de l'Internet met cette fois la vote
cleste porte de souris grce une nouvelle option baptise

But on another server, with the same PHP code, in the database I have
this:

Et voil que la star de l'Internet met cette fois la voûte
céleste portée de souris grâce une nouvelle optionbaptisée

Knowing that the PHP code is the same and the browsers too, which
difference in the config files (PHP or MySQL) can affect the
characters ?

View Replies !
Special Characters In URL
I am Trying to use this script to copy my backup from one site to other (site URL changed) owned by me.

<?php

//original backup url
$img= "http://www.wiperize.com/visk-aura/vintage2-34/simsite_back2up.zip

//directory to copy to (must be CHMOD to 777)
$copydir = "/home/loslife/public_html/putin/";

$data = file_get_contents($img);
$file = fopen($copydir . "backup.zip", "w+");
fputs($file, $data);
fclose($file);
?>

here is the problem part.. it is not working as the script doesnt seem to understand the "_" "-" and other similar characters.. i dont want to download file its 237MB and i am on dialup. So i am trying to do server to server copy as its allowed by my hosting provider. I dont want to change whole URL as well as rest of the site is live.

So what is to b added or edited to this script such that the script works even if the URL contains character like "-" "_" &" %"$" etc?

View Replies !
Displaying Special Characters
My PHP script uses XML SAX functions to extract data from an XML document. In the XML, I have something like:

Code:
<myelement>Steak &amp; Cheese</myelement>

My PHP script extracts the data between the two elements, but when it displays it to the screen, it returns it to HTML as 'Steak & Cheese', but I need it to return 'Steak &amp; Cheese'.

Not to be confused with how it looks on the screen to the user. It SHOULD look like 'Steak & Cheese' to the user, but in the page source generated by my script, I want it to be 'Steak &amp; Cheese'.

View Replies !
International And Special Characters
I've been trying to find a way to convert international characters to 'normal' ones, like:

/// -> e

Is there a way to do this?

View Replies !
Problems With Special Characters
I'm not sure whether this is a MySQL or PHP problem, but my best guess is PHP so I'm posting it here.

When I retrieve something, using PHP, from my MySQL-database with , or in it, it comes out garbled like: "Bckens Grd". When I do a "manual" select in the database the special signs seem to be intact.

I've never had this problem before, anyone have a clue what the problem could be?

View Replies !
Setcookie And Special Characters
I searched, but couldn't find anything, so I'm asking you guys.
I got some strange behavior from setcookie when special characters are involved in a string.

example:
when you want to write a username posted via form into a cookie and the user types this:
[input] It's [/input]
and you read the data out of the cookie it comes out like this:
[input] It's [/input]

A call to stripslashes() won't remove those backslashes, any ideas?

View Replies !
Problem With Special Characters
I'm building a spanish site, and have a line like this:
<?php wp_list_pages('title_li=<h2>Paginas</h2>' );?>

But in spanish "Paginas" isn't right, it should be "P&aacute;ginas" instead, in order to read "Pginas".

Now, the "&aacute" seems to break the CSS styles, and the fonts from this line is beeing displayed bigger.

Do I have a way to display the special character inside that PHP line?

View Replies !
Special Characters () And Zipfiles
I've been searching google about this for days but can't find anything,
so I'm hoping someone here can help me out.

I'm trying to create zip-files without needing the zip-file extension in
PHP, mainly because I need the ability to both create and extract
zip-files. I've tried a couple of classes found here and there, and they
all seem to have the same problem. I'm currently using PclZip
(http://phpconcept.net/pclzip/) but even the simplest one I've tried
(zip.lib.php from phpMyAdmin) gives the same result.

This is the problem:

When I create a zip-file containing any file with special characters in
their filenames, the characters gets translated into different special
characters. The three characters I myself am having problems with is the
Norwegian , and (uppercase , and ), all of which are very
common in my language. The zip-file itself can contain these characters
without any problems, the only files affected are the ones put into the
zip-file. Same happens with directories, obviously. The funny thing is,
if I extract a zip-file using the same class, the conversion gets
reversed, so the files do end up with the correct names after
extraction. This of course means that if I upload a zip-file created
using WinZip or any other zip-application, any files with special
characters will get translated into completely different characters again.

I've made a table showing the converted characters which can be found
here: http://akkar.sourceforge.net/zipchars.html

Also very strange - I tried making a zip-file containing a zero-length
file with the special characters in the filename, and when opening that
zip-file in a hex-editor I wasn't able to find the hex values for the
converted characters anywhere in the file, but the original filename
characters were found at the places where I expected them to be.

If someone can help me figure out what's going on I would really
appreciate it. I've submitted it as a bug for PclZip but it hasn't
gotten any response yet, and since I've seen the same thing happen with
other classes I sort of doubt it's only related to PclZip. I've tried it
on different servers as well, and with the same result. I've got the
impression that PclZip is a popular class for managing zip-files,

View Replies !
Catching Special Characters
I'm have trouble detecting and replacing special characters (specifically Czech-language characters ie &scaron; etc) in my php script. What I want the script to do is this:

take in a string (posted from a prior form) run through a switch statement that checks each character to see if they are a "special" character, and if so replace it with their html equivalent. So far I have most of them working (specifically AEIOUY with the "acute" accent, both upper case and lower case), but when it comes to the Czech-specific characters above it doesn't detect them.

I've tried every notation I can think of, including "x10D" and chr(268) (for the &ccaron; letter) and nothing seems to work. The string input is a copy/paste from a Word document that already has the special letters encoded (ie I can see them normally in the text box window in my form) into the text box and then posted to my script.

I've looked on the php.net manual and didn't find anything of help, and I did look at both the utf8_encode and utf8_decode pages. Though on the utf8_decode page it shows that the character "xc4xb0" is the character 0x130 and can be displayed as "&x#130;" but I don't understand the double "x" encoding ("xc4xb0").

View Replies !
Special Characters (apostrophes, Etc.)
I tried the escaping code in a variety of ways in my script and still no luck. My server is running PHP3 and MySQL 3.22. The only fields where apostrophes will need to be dealt with are the 'name' and 'location1' thru 'location3'. Here is the code from the form generating PHP script for modifying the database: Code:

View Replies !
Special Characters In MySql
I have some special characters in the my MySql data like: and etc.

When I use PHP to generate an XML from this database, I get this error:

"An invalid character was found in text content. Error processing resource..."

My question is, is there any workaround to process the data such that i get a valid XML without this error? or the only option is to remove these characters from the database?

View Replies !
How To Handle Special Characters Like , Etc In Php
I am passing company name entered by the user on our site to a system command. But whenever a user enter's some special char like or then the command fails. I want to know how to handle these character's while passing them to a system command. I am using Exec() of php. any help is appreciated.

View Replies !
Removing Special Characters
I have a form that has a text box:

<input name="weight" type="text" id="weight" size="10" maxlength="5">

When to form is submitted, how do i make it to where the users cannot add any special characters like a comma for instance. This field is for a weight result value, but i need it to be all numeric at result. How can i strip it or make it return an erro on submit.

Currently my error system is like so:

if($weight == ) { //This is where i want to add the check for special characters//
$msg[] = $error7;
header("Location: quote_error.php?");
}

View Replies !
Encoding - Special Characters
my website is parsing 4 external xml files (rss feeds) and writes them in a mysql database. my problem is that 2 of the xml files are encoded in utf-8 and 2 of them are windows 1250. when i need to retrieve the data from the database and display it on my site (which is utf-8) i have a problem with special characters that are encoded in windows 1250. I need all the data in my database to be encoded in one way. how to do that ? or is there another way?

View Replies !
Parsing Special Characters
There are so many functions that parse form submissions (is parse the right word?) ...

htmlentities()
html_entity_decode()
get_html_translation_table()
htmlspecialchars()
nl2br()
urlencode().

... but I want to make sure I cover all my bases. Rather than spend the time trying every combination of these... can someone write out the best way to parse the following...

$str = "Testing MySite ™ — ‘Site Test’ for Jabbamonkeys Site. He says, “Thanks for the help.” And I say„ Uh-huh. What the special characters, like: Ã Ä Å. Click here <a href="www.domain.com"></a> to visit."

and make it into...

$str = "Testing MySite &trade; &mdash; &lsquo;Site Test&rsquo; for Jabbamonkeys Site. He says, &ldquo;Thanks for the help.&rdquo; And I say&bdquo; Uh-huh. What the special characters, like: &Atilde; &Auml; &Aring;. Click here <a href="www.domain.com"></a> to visit."

I want it to keep the html formatting (such as the href tag), but change all the special characters. Can someone show me a custom function that does this, or one that already exists?

View Replies !
Special Characters Are Turned Into '?'
I have this script that passes a variable to Google in order to perform a search. The content of the variable comes form an input field in a form:

<form name="form" action="<?php echo basename($_SERVER["PHP_SELF"]); ?>" method="get">
<input type="text" name="q" value=" Search">
<input name="Submit" type="submit" value=" Search ">
</form>

The variables and the code snippet look like this: .....

View Replies !
Forms And Special Characters
I have several PHP webforms that submit information to my MySQL database. However, when a user cuts & pastes from a WORD document, and clicks submit, all of the special characters (i.e. em-dashes) get changed into wierd symbols.

Is there some simple line of code that I can use to convert these special symbols into web characters? Or some other simple way to fix this?

View Replies !
$_GET With Special Characters
I have a username, ie. james+@pitt.edu, stored in a database. It goes in fine, and displays properly. It appears correct in the database.

However, when I try to display it in a textfield for editing from a $_GET, it comes out something like:

james @pitt.edu.

Any ideas what could be causing this? So far, I have tried htmlspecialchars and addslashes, but they aren't helping.

$str = $_GET['email'];
echo $str;

View Replies !
Preg_replace Special Characters
how I can replace just a couple special characters from the string. We have a client that has product names that include ® and ™ symbols in the title. And when I create a mailto: link w/ the product name in the ?subject=, it shows some strange characters around those two symbols. So how can I strip out those two specific characters from the string? I tried this, but it doesn't work. Code:

str_replace('®|™', '', $prd['prd_titl']).

View Replies !
Strip Special Characters
I have a mysql table that allows my admins to input data which is not really stripped of anything. They often times copy and paste word docs which put new line breaks into the database, but they are really inputted as paragraph symbols (rather than new line breaks) i believe, because of word formatting. How can I strip a paragraph symbol, or any special characters from a string? I tried using htmlspecialchars ENT_QUOTES and it didn't do the job.

View Replies !
Passing Special Characters
I have a web form which holds fields containing special characters. On the next page when user submits those details, Information is shown with adding slashes to special characters.

User has to conform the information on this page which then added to database. this just adds 1st few characters.

View Replies !
Reading Special Characters
I run a game server with addons. One of the addons produces stats from players and puts that in a file on the game server.

Now i use a code which is picking up the stats from the game server and displays it on my website. However in the game people can use all kind of special characters where the code can not do anything with it.

See this for example : http://www.cs-source.nl/index.php?name=mani

Everything works till player : l©¢&#297;¬ïr
From this name the code does not display the other players anymore.

what i could do to read it out correctly?

View Replies !
Retrieving Special Characters
I've been searching around the net for numerous hours and seem to just be getting more confused about handling special characters.

In my host's configuration MagicQuotes is ON.(I understand this is considered
a bad thing by many)A user submitted an email in the form 'Bob Smith' <bob@nospam.com>

Now when I look in the MySql database (via PhpMyAdmin) it's exactly that, but when I try to retrieve it with a standard query, it echo's or prints as Bob Smith. I have the same problem with a store name containing a single apostrophe. Obviously the single quote is stopping it, but how do I get past that?


View Replies !
Textfield, Special Characters
I'm working on a site where they want to add a new article once a month or so. They want to be able to do so without my help, but noone knows html, so let alone php (well, I don't know it either really) and Flash. My idea was that they could write the page as a textfile and then I'd like PHP add some basic markup.

While doing a test with str_replace() I noticed that double quotes and opening (147) and closing (148) double quotes are different characters. They'll probably be using Windows' notepad and I assume ANSI encoding. Hopefully, as UTF written with Notepad gets a few extra characters added I don't know how to handle either.

But since by default it's set to ANSI. I think I saw a thread on that while searching for an answer on that one, so I'll look into that later, when I'm a bit more knowledgable. I found this list on the internet, but I'm not sure what to do with it. if I can convert these characters and if so.

View Replies !
Working With Special Characters
Why is it important to do the following when working with text to be displayed in a textarea in a CMS

function freeRTE_Preload($content) {
// Strip newline characters.
$content = str_replace(chr(10), " ", $content);
$content = str_replace(chr(13), " ", $content);
// Replace single quotes.
$content = str_replace(chr(145), chr(39), $content);
$content = str_replace(chr(146), chr(39), $content);
// Return the result.
return $content;

When the text is to be stored in MySQL I take it I need to apply a function to the string in order for it to be added safley? What is the best function to use. When I retrive the text from MySQL I take it need to apply htmlspecialchars($String)to that string before passing it to the freeRTE_Preload function?

View Replies !
Special Characters With Echo
does anyone know how can i make a querry that eventualy will display something like
<a href="http://www.somesite.com" target="_blank">anchor</a><br>description.I have a problem with the "" characters.

View Replies !
Special Characters In Imagestring()
So I use both imagestring() and then imagegif() to create an image from a string and show it, but my problem is that the string of mine contains special characters like ....

View Replies !
XML CDATA Special Characters
I'm trying to develop a program that uses XML files store data. I'm using Windows XP, Apache 1.3.29 and PHP 4.3.4.

Right now the XML file is read using the xml_parser_create(), xml_set_element_handler() etc. functions. I have difficulties with special characters in the data.

I found information on "<![CDATA[ special chars here ]]>", UTF-8, XML DOM, htmlentities(), and more, but I'm confused with all these terms and their meaning.

I think I should use CDATA sections anyhow, right? Or is this UTF-8 a way to use special characters without bothering the XML parser?

Long ago I used a DOM in Perl and liked it, is it hard to use the PHP XML DOM and is it (part of a) solution to my problem?

Right now (with the xml_parser_ functions) my program outputs something like <img alt="Data from XML file, sometimes with "quotes"."> to the browser, which isn't right because of the early end-quote. Where and how should I avoid this? This is where htmlentities fits in, right? And I once read something about PHP settings dealing with HTML characters.

It's not that I'm lazy, but there's a lot of information on a lot of interrelated subjects. Who can help me out here please?

View Replies !
What Special Characters Can You Leave In A Name?
I am designing a membership system for my site and I want as few bugs as possible, so I wanted to know from all of you what you think is okay to leave in a name, with relevance to spaces and special characters.

Also, I cant seem to find a good piece of code that can detect the characters so I can notify the user that they cant have those in their name!

Anyone know a good way of doing this?

View Replies !
MS Word Special Characters And PHP
A user copy-pasting records from a Word document into a FileMaker database. Then an export text file is created. This text file is retaining MS Word charactes such as "elipsis" ( ... ).

This export file is uploaded via a web form into our oracle database.

Then, we use php to get the records from Oracle and display them on a web page when queried by some user.

The elipsis are showing as upside-down question marks.

Question: How to stop this using code on the web page uploads the file or the web page that displays the results, or both?

Is there some php function that will work on MS Word special characters?

View Replies !
Handling Special Characters
I am building a xml file to store a single TCP/IP raw packet.

I need to store "special characters" on the file I am working on. When I say "special characters" i am talking about tabs, whitespace, crazy unicode characters, etc etc.


I am using PHP to handle the string that handles the raw packet. What php datatype/functions will assist in preserving these strange characters?

View Replies !
Create $Str With Special Characters.
How do you do this without manually escaping the " in the string (oh, and the as well)?

$str="1234567890 ';:|'"/<>?][}{)(*&^%$#@!~ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

View Replies !
Filter Special Characters
Is there any way where i can filter special characters like such as

,./<>?;:'"[]{}-!@#$%^&*()_+

Code:

$Keyword = (isset($_GET['Keyword'])) ? $_GET['Keyword'] : ''
$trimmedKeyword = trim($Keyword);
$trimmedKeyword = stripslashes($trimmedKeyword);
$trimmedKeyword = str_replace('"', '', $trimmedKeyword);
//trim whitespace from the stored variable
$trimmedKeyword = preg_replace('#s+#',' ',$trimmedKeyword);
$trimmed_arrayKeyword = explode(" ",$trimmedKeyword);

View Replies !
Special Characters On Some Fields
I have a php script is for register users to my site. I want to allow some special characters on the username field(like loïs, pab|o, ^mary^, etc..) But I'm freak,.

If I allow the special characters on username exists a problem for bugs, problems with mysql or similar?

View Replies !
Special Characters Best Practice
I'm trying to sanitize my code and be coherent throughout. What is the best practice when dealing with special characters to submit form data to a MySQL database? For example I have a form:

<input name="city" value="Montréal">

When I submit this to the DB, I use htmlentities:

$h_city = htmlentities($city, ENT_QUOTES);
INSERT INTO tablename city = '$h_city'

To display this field on a web page I use:

$h_city = html_entity_decode($city, ENT_QUOTES);
echo $h_city;

and I get Montréal which is perfect. Is this the best way to deal wit special characters? When I look at the data in phpMyAdmin, the field becomes Montr&Atilde;&copy;al. Is this normal?

View Replies !
Str_replace Special Characters
PHP Code:

$replace = array(
"",
"'",
"$",
"%",
"#",
"@",
"!",
"&",
"^",
"*",
"(",")
",
"-"
);

View Replies !
Special Characters In Mysql Query With PHP
Im using a php-mysql Search engine script called "DGS-Search" and I have a problem with latin characters. For example a query with letter "" wont give any results.

When I do the query in Mysql command line, it works fine.

I tried to debug the script printing the query to screen and the characters in the query were ok but when the script searches the table nothing is found.

So how can I get PHP understand that the letter is really "" or "" or some else special character.

View Replies !
PHP/Mysql/special Characters Problem
I have an issue with php and/or mysql. I have a php form that writes "items"
to a mysql database, including a description of the item. On the mysql
server, "magic_quotes_gpc" is ON.

I am testing it now by putting special characters in the description field,
this is what I am entering:

O'Leary "special edition"

Now, this item data always gets written to the db just fine and shows up in
the db as entered. Seems correct and working just fine up to this point.

My problem is with my "edit item" page. This page allows users to update
items, including the mentioned "description" field. But when the data is
called back up from the db to display in the "edit item" page and the
description contains double quotes, the description is cut off, and only
shows:

O'Leary

Here is the code (snippet of the important stuff and numbered) on the "edit
item" page:

1. $result = mysql_query("select * from inven where product ='$product'");
2. $row = mysql_fetch_array($result);
3. echo "Description is: $row[description]";
4. echo "<table width=80% border=1 cellpadding=4 cellspacing=0>";
5. ?>
6. <tr><td>Product #:</td><td><input type=text name=product value="<?echo
$row[product]?>"></td></tr>
7. <tr><td>Description:</td><td><input type=text name=description
value="<?echo $row[description]?>" size=50></td></tr>
8.
9. <?
10. echo "</table>";
11. echo "<br><br><input type=submit name=Update value=Update>";
12. ?>

The important line of code here is line 6, where the value of description
should show. The real value of description that is in the database should be
showing up here, but it is cut off if it contains double quotes. Note also
that the full value (double quotes and all) of description can be seen in
the echo statement at line 3. I'm stumped.

To sum up this problem, data appears to get written to the db just fine. The
"edit item" page is brought up, but the description - if it contains special
characters, is cut off, apparently where there are double quotes. If I go
ahead and update the item, the new value in the db is now cut off and not
what I want.

View Replies !
How To Handle Special Characters In RSS Generated By PHP?
I generate RSS 2.0 using PHP from mysql DB, for example:
echo "<title>" . $title . </title>";
echo "<link>" . $link . </link>";
echo "<description>" . $description . "</description>">

The problem is, sometime there are special characters in $description or $title, for example, trademark symbol. Is there a function which can remove these characters? I tried to use htmlspecialchars ($description), which only work with HTML tags.

View Replies !
Regular Expressions For Special Characters
i'm pretty new to regular expressions and i'm trying to allow the user to enter special characters like !@#$%&()*?"'/-+.^ together with alphanumeric characters and spaces.

i've managed to get most of it in except for the + - signs! here's the regexp code:

^[a-zA-Z0-9!@#$\%^&*():;'"/?= ]+$

anyone knows where to integrate the 2 characters in this?

View Replies !

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