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.





Str_replace - Text Area Box


I have a text area box which i want to add these str_replace codes to

$body = str_replace ("
", "<br>", $body);
$body = str_replace ('">', '"><font color="WHITE">', $body);

But it only does the second one.. why??? and how can i fix this?




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
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 !   View Related
Use A Text Area Which Will Show All Formatted Text
i have no clue how i pull it off what i how can i use a text area which will show all formatted text so if a user presses enter to add a new line or start a new paragraph example shown below i went to the shop and bought (pressed enter) 500 cakes. where when a user enters and submits to my db and i retrieve the text it loses all user formatting and will appear like this i went to the shop and bought 500 cakes.

View Replies !   View Related
Replacing Text For Use In A Text Area...
I have a PHP page that allows a user to preview an email and then send it
if(s)he is happy with it.

Otherwise, they can click on an edit button and edit the text of the
message. The text is then shown in a textarea element.

While in situation A (the preview), a bit of formatting is useful (e.g
<BR>), all of this formatting is a nuisance in the textarea.

Basically, I would like to do the following:
a. replace <BR> with a line break for the textarea
b. get rid of double spaces and tabs before the text is loaded in the
textarea
c. put the <BR>s back in when the user is finished with editing the message.

Is there a way to do this?

View Replies !   View Related
Text Area
I have a textarea that the user can put a paragraph of information in it. I am wondering. with my submit button. if there is a way to make the information of that textarea = to a variable. so then it can be used as text.

<textarea name="comments" cols="40" rows="5" value=value="
<?  ?>"</textarea></td><td></td></tr>
<tr><td colspan="2" align="right">

That is what i have for the text area.

View Replies !   View Related
Updating A Text Area
I'm writing a sort of mini chatroom. The problem I've run into is that I can't figure out a way of updateing the HTML textarea I am using to display the messages in the chatroom.

I want it to update about every 10 seconds or so. Is there any way of doing this in PHP? I'm willing to try JavaScript too, but I've only just started learning that?

View Replies !   View Related
Dynamic Text Area
how do I create a dynamic text area that whenever I select a value from a dropdown list it will automatically fill up the form of my html. the dropdown list contains dynamic values from mysql database. Whenever I click a value, it automatically fills up say for example the name, address, email, etc...

View Replies !   View Related
Text Area Input Box With PHP
I have a text area box on one page. PHP sets the information that is inputted into the text area into a variable. When I print this info to the screen via echo, it does't have the line retain the formatting that the user had in the text area. It has no line breaks, it runs everything together.

View Replies !   View Related
Bigger Text Area
Is it possible to get a bigger text area? So far I have: PHP Code:

View Replies !   View Related
Text Area Spacing...?
I have a form, and it's a text area. If I press enter twice, it makes a double space, but when I press submit, and it changes the page, it does not double space!. How can I make my code translate those "enter button" presses into a new line?

Just in case you need to know, it's writing whats inside the text box into a row in my MySQL Database. So in a way, you could say that when you press the "enter" button, the text area does not take it as a new line. Here is my code:

View Replies !   View Related
Hyperlink In Text Area
I have a basic CMS system and the client would like to insert some links in the text area. What would you recommend the best way to do this in a textarea box? There may be several hyperlinks in 1 textarea and some may have none at all.

I assume this would be some sort of javascript code or is there an easier way.

View Replies !   View Related
Text Area To Html?
I'm starting an admin area for a 'news site' for my uni project and I need at the moment to make a page where a user can type or copy and paste a news story as plain text into a text area on the page so using code I can convert it into basic html and save it as a file.

I need to be able to search through the text in the field, remove any nasty tags and detect where line return or new line characters and replace them with appropriate <p> or </p> tags. Code:

View Replies !   View Related
Text Editing Area
I am trying to make a forum for disscusion, How can I make an text editing area like one of this forum?I can parse links in text area in a form, but how about changing fonts, colors,. and insert emotion icons.

View Replies !   View Related
Text Area Field
I can't get the form value of this textarea field below to display when updating a form.

$cellvalue = "";
if ((!isset($_GET["cf2"])) && (!isset($_POST["cf2"]))) {
$itemvalue = $row[2];
} else {
$itemvalue = qsrequest("cf2");
}
$cellvalue = "<textarea class="ta" name="cf2" value="" . qsreplace_html_quote(stripslashes($itemvalue)) . "" ></textarea>";
if ($cellvalue == "") {
$cellvalue = "&nbsp;";
}
echo "<td>" . $cellvalue . "</td>"

View Replies !   View Related
Sizing A Text Area Dynamically
I have several text areas I am putting information from MySQL into. Right now they are 50 characters wide, by 10 rows. I want the number of rows to dynamically size do that the text area is the same size as the length of the data in MySQL.

I've tried all the logic I can think of... taking strlen and dividing it by the width... works great until they use line feeds... if someone puts:

"Hello... thanks."

the character count divided by the width is off. Here is the code I am using: Code:

View Replies !   View Related
Keep This Text Area From Being Edited In This Form
I need the textarea so it can not be edited by the user..... how can I hide it and keep it so it can not be changed

<textarea name="body" id="body" cols="50" rows="15">'.$_CONFIG['MAIL_BODY'].'</textarea>

this text area has an email message for my inviter script but I dont want the user to be able to alter the body...

how can this be achieved? I manages to hide the subject by ussing type hidden

but I dont know how to do it with this text area.

View Replies !   View Related
Allow User To Edit An Area Of Text
I'm trying to allow a user to update protions of their site with no html knowledge whatsover. Any html pages to be used in the site have already been created. For this I've been trying to create something like a basic cms.

So far I've created a script, which will allow a user to edit an entire text format file, such as the html document. But i've decided that I dont want the user to be able to edit any of the html code. I've been looking around and thought that something like this Code:

View Replies !   View Related
Text Area Multiple Values
I have a form, where I want to submit sub-categories into Main Category e.g.

AAA (Main Category)
-aa1
-aa2
-aa3
-aa4
-aa5

One option is that I insert sub-categories 1 by 1. Its OK but what I do if I have 100s of sub-categories for AAA. What I want to do is, in the FORM, in TEXT AREA, I write all sub-categories line by line say

aa1
aa2
aa3
aa4
aa5

When I click SUBMIT, the action file takes line by line value and insert into a DB as aa1 is single row and so on. so each sub-category take a SINGLE ROW in a DB.

View Replies !   View Related
Output Text Area Limit
I have read this somewhere but can't find it and I know it's simple for most of you but how do I output a specific number of characters from blob. I have a frontpage block which will be linking to the full blob, but I only want to have maybe 90 or so characters from the blob in my frontpage block.

View Replies !   View Related
Database Field And Text Area
I need to use a text area in a form instead of an input field so a larger amount of text can be inserted. When I try to use this

value="<?php echo $row[databasefield];?>" like I do in my input fields
<input value="<?php echo $row[databasefield];?>" name="databasefield">

and try to use it in a text area field instead.

<textarea rows="5" cols="25" name="databasefield" value="<?php echo $row[databasefield];?>" ></textarea>

The database property won't appear in the form like it will with an input field. How do I adjust for the text area field to show the database info instead? Right now nothing is appearing in the text area field.

View Replies !   View Related
Good Text Area Editor
I was just wondering if anyone could suggest a good free editor/formater to use with text areas (like the one above this text area) that i can drop into a php page with an include maybe.

View Replies !   View Related
Insert New Line In Text Area
I have the code below that is loaded into a text box when a user responds to a mail message on my site, I would like to replace the 3 >br> trags though at the beggining and have it have a small gap for user to type resonse. PHP Code:

$temp_oldmessage="<BR><BR><BR>--- Original Message ---<br>
From: <a href=http://$SITE_PATHindex.php?action=memberprofile&type=common&userid=$row[from_user]&unid=$unid >$from_name</a><br>
Date: $date_time <br>".$row['message']."<br>";

View Replies !   View Related
Line Breaks In A Text Area Box
I am building a script for a recipe site and I need my form to automatically add a <br> when a line is skipped. Code:

View Replies !   View Related
Str_replace From Text File
I want to use a text file with words that needs to be replace. $theentry = str_replace(array('word1', 'word2'), '*****', $theentry); Instead of array('word1'),'word2') i want textfile.txt to be opened with all the words to be replace with ******.

View Replies !   View Related
Detecting Line Breaks In A Text Area?
This is really frustrating... I have a form in which there is a text area for people to post comments on the site. I'm hoping that people will take the time to fill out reasonable length responses which my spread over two or more paragraphs. My problem lies there; it might spread over two paragraphs...

I know I can use 'special character(s)' which the user can put in that I can then do a ereg_replace() to put the <p> or <br> tags in but I would prefer that they didn't have to... like for instance in this forum

I've tried to see whether there are any line breaks or something in the textarea when a carriage return has been made but I can't seem to pick anything up, has anybody managed to come up with a solution to this?

View Replies !   View Related
Filling A Text Area With Options From A Select Tag
I read a ACCESS db table and the values from one column i use to fill a select tag (all the code is in a php file inside a iFrame tag): Code:

View Replies !   View Related
Writing To Heredoc From Text Area Form
I can't seem to get heredoc to populate correctly with variables through
a form.

<textarea name="Template" rows="10" cols="80">Template Here</textarea>

Contents could be something like: I want to replace $myarray[0] and
another variable $myarray[1]

I call heredoc this way:

$hubarray = explode("
", $contents);
$template = $_POST['Template'];

foreach ($hubarray as $val) {
$hostarray = explode(",", $val);

$output = <<<EOT
$template
EOT;

I'm feeding it a file that has multiple rows separated by
as array 1
and within those rows are fields separated by "," for array 2. I'm
trying to iterate through the arrays and populate heredoc($template)
accordingly.

View Replies !   View Related
How To Make Text Area Recognize Hyperlinks?
I built a simple form where a user can enter and post news items to his
site (with PHP, into MySQL). He doesn't know much HTML.

Is there some way he can enter some simple text to declare something a
hyperlink, and have PHP recognize that that means "make this text into a
hyperlink"?

....so that instead of having to type this into the textarea:

<a href="http://www.somesite.com">somesite</a>

....he could type something more intuitive, like this:

<somesite.com>somesite</somesite.com>?

View Replies !   View Related
Text Area Forms And How Data Is Stored
I'm having problems with an html textarea and how the input is interpreted in php. For instance, new lines aren't being carried over in my news posts.

Currently this is what i'm doing: makenews.php takes form data from makenews.php and spits it out to the first file that doesn't already exist of the name template news.file.I.txt where I starts at 0 and works its way up. However, if I enter something like the following: Code:

View Replies !   View Related
Loading A Word Document Into A Text Area
Is it possible to do the following with php?

1. display a form which includes a <textarea>
2. press a button on the form that would display a directory dialog box which would allow the user to navigate their local directories and select a word document
3. the contents of the selected word document would be sucked into the text area which - on submit - would then be inserted into a database on the web server.

I've looked at the fopen() function, but that won't open up a directory dialog. I've also read elsewhere that the file chosen needs to be uploaded to the server before it can be displayed in the textarea.

View Replies !   View Related
Validate A Text Area In My Template System
I want to validate a text area in my template system. To define a value, I just have to insert:

$template->append("NAME", "VALUE");

I am trying to easily provide text-area status after form submission. So say it is a select for male or female.

I would define the dependency which would tell the system whether or not to return a value, so that's $error[gender]. Then current is what the value submitted is equal to, so male for example. $options is a comma separated list of possible options (male, female). Status is another variable I use, and isn't important. Code:

View Replies !   View Related
How To Insert Record In Database Using Text-area
i need to insert record using textarea. but this is not working. my function for insert is function InsertRecord($fieldarray) Code:

View Replies !   View Related
Explode Text Area Into Array For MySQL Table
On my site, I have a textarea where users enter their sites' information in the following format (tab-delimited):

Site Name <tab> Site Description <tab> URL <newline>
Site Name <tab> Site Description <tab> URL <newline>
(and so on...)

I know I have to use the "Explode function and a loop to get the data into an array and enter it into a MySQL table. Would anyone have a snippet of code off-hand that could show me how to do this?

View Replies !   View Related
Formatting The Contents Of A Text Area Form Field
On my site I get users to enter a load of information in a textarea
box, however when i save this data to my mysql DB and then retrieve it,
it comes out without all the formatting, like new paragraphs and new
lines.

Can anyone tell me how you can capture the data entered into such a
field with all the formatting the user has entered like new paragraphs
etc?

View Replies !   View Related
Click Button And Adds To Text Area - Like SMF Bbcode
How can I make buttons to add some things to a text area, like the bbcode for SMF?

View Replies !   View Related
Identify Url Written In Text Area And Display It Hyperlinked.
I am using html textarea control. user writes text in text area and i save it in database using php, then i display it where ever it is required. I want if user writes some url in the area like www.abc.com or http://www.abc.com , When i display this text as output this url must be shown there as hyperlink. by clicking over it user must be redirected to www.abc .com

Is there any html textarea control property that can do it, or i need to write some php or javascript code for it. If someone has php script for it please help. It is urgent.

View Replies !   View Related
Paste HTML Page Inside Text Area
i want to create a newsletter or emailer form sender. and that form has a text area. can be an ordinary text area or can also be tinymce.

i want to have the text area in such a way that an HTML page can be pasted in the text area (let say the html page is jobpost.html) and send it to the email address that i specified.

View Replies !   View Related
Save My Selections From My Text Area In A MySQL Database
I am trying to save my selections from my text area in a MySQL database, would you know how I could incorporate PHP to do that?

View Replies !   View Related
Echo Not Working For Text Area With Javascript Script
I've got a text area that uses Javascript to control the length of the user input to 255 characters. The value of that text area is stored in a session variable so that the user can go back to that page to review their input. However, when the user returns to the page, the text area is empty. Code:

View Replies !   View Related
Echo Function Not Working With Javascript Text Area
I've got a text area that uses Javascript to control the length of the user input to 255 characters. The value of that text area is stored in a session variable so that the user can go back to that page to review their input. Code:

View Replies !   View Related
Ensure That The User Can Only Enter A Certain Amount Of Characters In A Text Area.
I have managed to create a script in javascript to ensure that the user can only enter a certain amount of characters in a text area. If users have javascript turned off how can I check for this in PHP?

View Replies !   View Related
User Entry & Showing Appended Data Only - In Text Area
At the moment I can append an html file by actually opening it and typing in what I want. Then it outputs the whole file when I save it. (For some reason it outputs all text again plus the new code,,, doubling the file size by 2) Code:

View Replies !   View Related
Protected Area/admin Area
I am building a web site and have included an admin area where I want to use a username and password that only myself and the admin will be able to use. I am using the following code, but something is wrong when I put it on my host: Code:

View Replies !   View Related
Map And Area
Imagine a tourist site where you'd look up a hotel and it would perhaps pinpoint it on a map. But then you'd have a search facility for attractions within a certain radius of the hotel. Eg.I look up Bates Motel then search for Shopping Malls within five miles. The results would list any shopping malls and pinpoint them on a map. Sounds a bit google/ajax kinda scary advanced stuff. Would it work on postcodes (zipcodes) or map co-ordinates (latitude and longditude) and presumably there's a database somewhere with all these codes and co-ordinates - like the Post Office or Ordinance Survey.

View Replies !   View Related
Secure Area?
I would like to do the following, and need some advice.

There is a login page, where users can log on(and e.g. the admin.)
from there you can go to several other pages, where you need to be logged on.

Since I don't want to use cookies, how do I pass the login information to the other pages, so they can evaluate if the user is allowed to view them.

I can't pass any of this data thru the url I guess because everyone could read it in the browsers history if a person logged on earlier, then use this link with the info supplied.
The same goes for session ids I think, or don't I have to pass the session id to subsequent pages?

Can anyone give me advice how to implement pages that should only be viewed by currently logged on persons.

View Replies !   View Related
Set The Print Area Using PHP
Is there a way to set the print area of a webpage using PHP? If so how would I go about doing this?

View Replies !   View Related
Members Only Area
Just wondering if you could please please help me with something. I am fairly new to php but have managed to get user input into and out of the my sql database etc. Our site will have a members part to it and I'm not sure how to organize this. I have written a php code which checks a users username and password against what is in the database and sets a cookie for the user if the login info is right.

My quandery (and I can't seem to find this in any php books)- if a now logged in user goes to the index page I want that user to see a logout rather than login button. Should I direct the member who logs in correctly to another index page (via a header )which is exactly the same except for the logout button in another file - maybe a secure file- or should I have them go to the same index page but write some php code in that index page that checks to see if a cookie has been set and prints a logout button if yes and a login button if no.

Following on- there are links on the index page that can only be followed if the user has logged on correctly. If I had two copies of the index page- one for users not logged on and one for logged on members, I would only have the links work for those logged on who are going from the logged in index page and direct the others going from the not logged inindex page to the log on page. Otherwise I would have to write code at the top of these members only pages to check to see if the user is logged on.

View Replies !   View Related
Area Graph
I have created an area graph using GD and PHP. The data that is being plotted onto this graph is being pulled out from a MYSQL database. It is pulling out 4 different sets of points, and plotting them. So basically, 4 companies, or 4 lines are being drawn on the graph, and the area underneath the lines are being filled in.

Currently, the companies are being displayed in the order that they are being pulled from the database. This causes some of my companies to be hidden behind the one that have more area. I need it so that the company with the smallest area will be displayed last, and the one with the largest, displayed first, and so on. How Can I accomplish this?

View Replies !   View Related
Include To A Certain Area
Im putting a search box on some of my pages, and when i use PHP Code:

View Replies !   View Related
Images In *area
I need a feature and I'll try to explain it.

The thing I need is some kind of textbox or just box. I want to add images
that display instantly, when I press a link. Like this:

_B_ _G_ D_ _C_

/-------------------------
| [pic][pic][pic] |
-------------------------/

Like adding real smiley's to a forum post or whatever post. I don't want
complicated richtextarea or similar program, I just need this one feature
and that's all. Any clues how this can be done?

View Replies !   View Related
Restricted Area
Is there a simple way of preventing unauthorised users from viewing files in a specific directory. Something like a members area???

View Replies !   View Related
Login Area
I met problems while doing the login function. As i created my own login button and it would require to go to process.php to check for the accurate username and pwd. But now i met a problem that is how should i write the code so that when login button is pressed, it will go to process page

Coding for image button:

<img src="../images/vizchat_btn_go.jpg" name="btnlogin" width="59" height="40" border="0" id="btnlogin" /> .

View Replies !   View Related
Members Area
im new with php and i need a members area. ive been all over google for this and i cannot find a script that works. can you please link me to a tutorial that will work.

View Replies !   View Related

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