Autor |
Nachricht |
|
Titel: A bit of a strange request ...
Verfasst am: 22.05.2006, 17:07 Uhr
|
|
Anmeldung: 01. Feb 2006
Beiträge: 37
Wohnort: Summerville, SC
|
|
I need your help in setting up a script. I post news for a large online gaming league. Now, although it is in HTML, I have to post the news via forum. The forum interprets all tabs and carriage returns in my HTML. This means my readable code renders real crazy in the forums.
So, I need a script to remove all tabs and carriage returns. Help! |
|
|
|
|
|
|
Titel: A bit of a strange request ...
Verfasst am: 22.05.2006, 19:23 Uhr
|
|
Anmeldung: 31. Jul 2004
Beiträge: 249
|
|
|
|
|
|
Titel: RE: A bit of a strange request ...
Verfasst am: 22.05.2006, 23:20 Uhr
|
|
Anmeldung: 09. Aug 2004
Beiträge: 121
Wohnort: Brisbane Australia
|
|
|
|
|
|
Titel: RE: A bit of a strange request ...
Verfasst am: 23.05.2006, 00:18 Uhr
|
|
Anmeldung: 12. Mar 2005
Beiträge: 1005
|
|
PHP:
// data in form field:
$formdata = $_POST['form field name'];// replace with real form input data names
$replace_stuff = array("\r\n","\n","\t");// str_replace will use this array to search for all present array items
$cleaned_form_field_data = str_replace( $formdata, '', $replace_stuff);
I think that will do it. |
_________________ Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
|
|
|
|
|
|
Titel: RE: A bit of a strange request ...
Verfasst am: 23.05.2006, 13:04 Uhr
|
|
Anmeldung: 01. Feb 2006
Beiträge: 37
Wohnort: Summerville, SC
|
|
I will be trying markb and h2's ideas later today. Results will be coming! Thanks guys! |
|
|
|
|
|
|
|
|