brown2005 Posted April 25, 2006 Share Posted April 25, 2006 i have a input box where i want to say putabcinto it......and then enter 3 records into a databse table in mysql..how can i do this? Quote Link to comment Share on other sites More sharing options...
wisewood Posted April 25, 2006 Share Posted April 25, 2006 an input box as in <TEXTAREA> or <INPUT TYPE=TEXT> ?? Quote Link to comment Share on other sites More sharing options...
brown2005 Posted April 25, 2006 Author Share Posted April 25, 2006 textarea Quote Link to comment Share on other sites More sharing options...
wisewood Posted April 26, 2006 Share Posted April 26, 2006 i sent you a PM with the answer, but came up with this instead.[code]<?phpif(!$_POST){ echo "<FORM METHOD=POST ACTION=$PHP_SELF>"; echo "<TEXTAREA NAME=my_textarea COLS=30 ROWS=5></TEXTAREA><BR>"; echo "<INPUT TYPE=SUBMIT VALUE=Submit>"; echo "</FORM>";}else{ $entries = explode( "\n", $_POST[my_textarea]); $x=0; foreach($entries AS $entry) { if($entry!=="") { // YOUR INSERT QUERY GOES HERE echo "$entry added to database<br>"; $x++; } }}?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.