Re: [PHP-WIN] Textarea and mysql

2007-05-18 Thread bedul
$temp = str_replace("\n","[break]",$inpText); //inpText is from textArea and then u enter your temp to the sql.. when you want to split it up.. just use $temp=explode("[break]",$inp4Sql); //hope i don't give wrong function ==spam?? sory=== - Original Message - From: "Bill Bolte" <[EMAI

RE: [PHP-WIN] Textarea and mysql

2007-05-18 Thread Dale Attree
There is only a line break, if the user hits enter, otherwise the textarea will just wrap the content. You can use the following: $textAreaWidth = 60; //Number of cols specified for textarea $loops = ceil(strlen($_POST['textarea']) / $textAreaWidth); for($i = 0; $i < $loops; $i++){ $sp

Re: [PHP-WIN] Textarea and mysql

2007-05-18 Thread Aleksandar Vojnovic
$textareaSubmit = $_POST['textAreaValue']; //First of all strip all the returns \r $textareaSubmit = str_replace("\r", "",$textareaSubmit); //Explode by new line $inserts = explode("\n", $textareaSubmit); //check if its array if(is_array($inserts)){ //run foreach on array foreach($inserts A

RE: [PHP-WIN] Textarea and mysql

2007-05-18 Thread Moore, Joshua
I have two textareas that I need to insert into 2 different fields, so with the following code im having trouble getting it to work: Original: $textareaSubmit = $_POST['textAreaValue']; //First of all strip all the returns \r $textareaSubmit = str_replace("\r", "",$textareaSubmit); //Explode by ne

RE: [PHP-WIN] Textarea and mysql

2007-05-18 Thread muadib
if the $check returns a "false" it would mean that there was an error in your SQL statement. The error might be here: - > (`asset, serial`) I doubt you have a column named `asset, serial` Secondly if you are inserting two values into the SQL then they must be separated with a comma (,). -

RE: [PHP-WIN] Textarea and mysql

2007-05-18 Thread Moore, Joshua
Please forgive me im still new to programming and php. So this is what I got from what you said however I guess I managed to screw the whole code up because it doesn't work at all anymore :( $textareaSubmit = $_POST['cpu_asset']; $textarea2Submit = $_POST['cpu_serial']; $textareaSubmit = str_repla