| | |
| Stránka: 1 z 1
| [ Príspevkov: 3 ] | |
Autor | Správa |
---|
Registrovaný: 30.07.06 Prihlásený: 19.02.13 Príspevky: 97 Témy: 20 |
Cafte,potrebujem helpnut s tymto editorom na textareu,mno...ide mi o to,ze neviem ako mam spravit ten example.php aby som vysledok mohol v phoode ulozit do databazy,uz si neviem rady ...potreboval by som to nejako prerobit,aby som mal neajku vyslednu premennu a stou by som mohol robit co chcem(ukladat do databazy).... tu je odkaz na na ten richedit
http://www.savefile.com/files/1287492
(pls,neberte to ako reklamu)
|
|
Registrovaný: 17.11.06 Prihlásený: 31.12.07 Príspevky: 677 Témy: 9 |
šak to tam máš všetko napísané ako pre debila:
Citácia: Usage
You can access the submitted contents with PHP simply by using their corresponding field names:
$richEdit0, $richEdit1, $richEdit2, ...
If your PHP configuration does not register global variables (register_globals = Off), then you can access them like this (PHP 4.1.0 or higher):
$_REQUEST['richEdit0'], $_REQUEST['richEdit1'], $_REQUEST['richEdit2'], ...
BTW, the default field name richEdit can be changed in the configuration section of richedit.js to anything you like.
Usually PHP adds slashes automatically to GPC data, so if you want to display the contents you should strip all slashes first:
if(get_magic_quotes_gpc()) $richEdit0 = stripslashes($richEdit0);
However, when you store the contents into a database, slashes must not be stripped; instead, if your PHP configuration does not add slashes to GPC data automatically, you should add them yourself or you might get a MySQL error:
if(!get_magic_quotes_gpc()) { $richEdit0 = addslashes($richEdit0); $richEdit1 = addslashes($richEdit1); } mysql_query("INSERT INTO table_name (field_name1, field_name2) VALUES ('$richEdit0', '$richEdit1')");
If you want to put content into the richtext editor with PHP, e.g. from a database, first you have to remove all CR and NL characters and add slashes. If you don't, you'll probably get a JavaScript error:
$content = preg_replace("/\r|\n/", '', $content); if(!get_magic_quotes_runtime()) $content = addslashes($content);
Finally, it's a good idea to have a look at the source code of this page. ;-)
|
|
Registrovaný: 30.07.06 Prihlásený: 19.02.13 Príspevky: 97 Témy: 20 | Napísal autor témy VLADIS007: 27.12.2007 22:35 | |
|
h,lol ,jak som sa o*ebal:D,ja som to ani necital,ja ze to je iba taky obycajny text,ako byva pri kazdom scripte:D.diky moc,uz to ide
|
|
| Stránka: 1 z 1
| [ Príspevkov: 3 ] | |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|