|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#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 |
|
|
|
|
|
#2 |
|
Member (9 bit)
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. |
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Dec 2004
Posts: 100
|
Fixed. I just used method='post' insted 'get'. So simple
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|