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.





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 Complete Forum Thread with Replies

Related Forum Messages:
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 !
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 !
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 !
Save Real HTML Tags Into My Mysql Database.
I want to save real HTML tags into my mysql database. I use $p = htmlentities($content); to convert the strange characters to real html. Then from another page i echo the content from the database and i see real html tags which is what i want.But in the database its still saved as:

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 !
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 !
Multiple Selections, Arrays, And MySQL
OK this place has been great with explaining things that are way over my head, now I could use a boost to get my brain working again. I have a form with a drop down menu with multiple selections. When the form is submitted it shows up in the DB field as "array", as well as the page where I how the form's info. I think I have to set up an array, and loop(?) it, or do I need to implode the array? And how and where would I put these commands on this incredible messy form page. Would someone mind helping me get started?

Here's the form: (please don't make fun of me, I used to a Dreamweaver extension to create the form using PHP, before I decided to try and write this stuff myself. I am re-doing the form but this actually works for now, so I am using it. Code:

View Replies !
Repeated Narrowing Mysql Selections
I'm trying to make a program that narrows to a target through mysql selections and subsequent subselections on certain attributes (columns). I hope I can get some help :P

Here is the situation:

I have the attributes/characteristics a = 1, b = 3, c = 4, d = 6 (for example) that are predefined and I'm trying to find the best match out of a database table. Each row of the table contains these attributes (or columns) a, b, c, d. Code:

View Replies !
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 !
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 !
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 !
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 !
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 !
Bigger Text Area
Is it possible to get a bigger text area? So far I have: PHP Code:

View Replies !
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 !
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 !
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 Replies !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
Retrieve A Data From My MySQL Database Using PHP And Save The Data In A Variable
How can I retrieve a data from my mySQL database using PHP and save the data in a variable in in my PHP code for example i have this table in the database

First name           Last Name
   Juan                  Punkista

I would like to store 'Juan' in variable $first and 'Punkista' in variable $last.

View Replies !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
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 !
Converting Text Database To MySQL
I have a file 849 lines long with records in, each record takes up 4 lines and records are seperated with <-nrbrk-> Code:

View Replies !
Submitting Text For Use In A Mysql Database
This question has been bugging me for month. I have a website where people can enter stuff into a mysql database. Some of this
information will already be shown in some textareas and input boxes, the user may change it and then hit submit. All the values are
then passed to a mysql database, overriding the existing values (after the old ones have been backed-up).

All of this works marvellous, apart from characters like &, ' and ". To make it even worse, some of the original text already
contains &039; and other numeric character codes.

Any values from the database are displayed by retrieving them from the DB

[simplified of course]

mysql_quer(...)
$row = ...
$Vold1 = $row[x];
$Vold2 = $row[y];
etc...

<INPUT VALUE=$Vold NAME="x">
<TEXTAREA>$Vold</TEXTAREA NAME="y">

Any values that are submitted are processed as follows:

$V1 = trim(stripslashes(htmlentities(trim($_POST["x"])))))
$V1 = trim(stripslashes(htmlentities(trim($_POST["y"])))))

then $V is inserted into the table using a mysql query.

View Replies !
Formatting Text With Mysql Database
help with formatting some text received from a database query. I am only selecting a single row per query so the formatting will only be performed on a single row. The rows I need to format upon display to the user are currently in text like so: word1 word2
word3 word4 (note there are only spaces between each word).

I just want to insert a character between each word when displayed. A dash, for example. I want it to look like this: word1 - word2 - word3 - word4 etc. Its too late to do it b4 I put it in the database, so I have to do it now.

View Replies !
Text Display From My MySQL Database
There is also an id field that's an INI auto_increment. When I select the rows and try to display them, it appears as nothing. There are no error messages, but it just displays as nothing instead of the message in the MySQL database? What's wrong? PHP Code:

<?php
include "db_connect.php";
$id = $_GET['id'];
$sql = 'SELECT note FROM `notes` LIMIT 0, 30 WHERE id=$id'
$result = mysql_query($sql);
echo "Notes:<br><br>$result";
echo "ID #: $id";
?>

View Replies !
Text Search In MySQL Database
I am wiriting a PHP program that allows users to search item in the MySQL database. The items may have Chinese in their name or desciption. A form is created to allow users to input the search string and then it is transfer to another script to search the MySQL database by GET. I find that some strings can be found but some are not. Is it related to the property of Chinese characters.

View Replies !
Text With Quote To Insert In A Mysql Database
i have a text field in a mysql database, how can i insert text with quote ( ' ).

View Replies !
Displaying Block Of Text From MySQL Database
I would like to create a details.php page that displays all my products. I understand how to get the title, price, description etc from mySQL. But my problem is how do I get a list of data? For example say I want to display the features of a product in point form (list). What is the best way to do this? How do most common websites do this? Code:

View Replies !
Uploading Info From A Text File Into A MySQL Database
what would the PHP and SQL code be to say basically: make a new row and put this in the field, what comes after each comma goes in a new field, and each new line should be a new row.

I have a huge text file that i don't have a way to upload directly into a MySQL database because my webhost isn't allowing it for some reason.

View Replies !

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