Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 01-26-2006, 02:49 PM   #1
Member (7 bit)
 
Join Date: Dec 2004
Posts: 100
PHP question

Hi everybody. I hope someone will help me .
I’m creating my first php dynamic page/pages and I run into a problem. I have declared in MySQL variable Description = longtext, and I have created forms for input and editing as bellow.

Adding Form

"textarea wrap=PHYSICAL name="Description" rows=20 cols="100%">Enter your Description...use
for line break
"
……

for edit/display

textarea wrap=PHYSICAL name="Description" type="text" rows=20 cols="100%" value="" />
"

form action =”save.php”
save.php

….
$Description = $_REQUEST["Description"];
……

if( condition )
{
$query = "UPDATE `tablename` SET …..
`Description`='$Description' …….

}
else
{
$query = "INSERT INTO `tablename` ( … `Description`, `… )
VALUES ( … '$Description', …)";
}
…….
Problem is that when I enter large text( larger than 700 characters) ‘save’ form doesn’t work or I’m getting error message that data couldn’t been saved.

If I’m entering through MySQL there is no problem with text length.
Any idea?
Thanks
Daniela is offline   Reply With Quote
Old 01-26-2006, 04:01 PM   #2
Member (9 bit)
 
DynamicTech's Avatar
 
Join Date: Jan 2006
Posts: 343
Hello Daniela,

Your query should be like this:
INSERT INTO mytable VALUES('$value1','$value2')
With each value entered into the database in the order of the created fields.

Is the field that you are entering the chunck of text into of type TEXT?

If it is not, you will have a limitation on the number of characters the field will hold.
DynamicTech is offline   Reply With Quote
Old 01-26-2006, 10:51 PM   #3
Member (7 bit)
 
Join Date: Dec 2004
Posts: 100
Fixed. I just used method='post' insted 'get'. So simple
Daniela is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:04 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2