php-general Digest 12 Sep 2004 12:36:23 -0000 Issue 2991

Topics (messages 196420 through 196436):

Convert textarea post data from plain text to html using php..how?
        196420 by: Brent Clements
        196421 by: Jason Wong
        196425 by: Ed Lazor

Upgrade from 4.3.6 to 5; strategy
        196422 by: Info.Best-IT
        196423 by: Robert Cummings
        196430 by: Tim Best
        196431 by: Robert Cummings

Evaluating form posts
        196424 by: PHP Mailing list account
        196435 by: Jason Wong

CSS not picked up
        196426 by: Jeff Swanberg
        196428 by: Jason Davidson
        196429 by: Jeff Swanberg
        196434 by: raditha dissanayake

ftp_nlist()
        196427 by: Karol Krizka

Re: create and read array
        196432 by: Chris Martin

get_class_vars
        196433 by: Sam Hobbs

Re: Very OT [PHP] CSS not picked up
        196436 by: php guy

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Do you guys happen to have an easy easy to do this?

I need to convert plain text submitted via a textarea form field to html formatted 
text.

Is there a way to do this with php?

Thanks,
Brent

--- End Message ---
--- Begin Message ---
On Sunday 12 September 2004 07:01, Brent Clements wrote:
> Do you guys happen to have an easy easy to do this?
>
> I need to convert plain text submitted via a textarea form field to html
> formatted text.
>
> Is there a way to do this with php?

  $htmltext = "<html><p>$plaintext</p></html>";

Season to taste. Or explain exactly what you mean.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
UNIX enhancements aren't.
*/

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> On Sunday 12 September 2004 07:01, Brent Clements wrote:
> > Do you guys happen to have an easy easy to do this?
> >
> > I need to convert plain text submitted via a textarea form field to html
> > formatted text.
> >
> > Is there a way to do this with php?
> 
>   $htmltext = "<html><p>$plaintext</p></html>";
> 
> Season to taste. Or explain exactly what you mean.

Sounds almost like they're talking about
http://www.interaktonline.com/products/KTML/

-Ed

--- End Message ---
--- Begin Message ---
Anyone have any good advice for an upgrade strategy from php4.3.6 to
php5.0.1?  I have a MAC OSX 10.3.5 system that I use for my test machine and
an Open BSD system for my production machine.  The production machine is
also semi-managed hosting system (virtual server).  Can I expect my current
4.3.6 code to run on php5?

Thanks for your help!

VR/Tim

--- End Message ---
--- Begin Message ---
On Sat, 2004-09-11 at 19:35, [EMAIL PROTECTED] wrote:
> Anyone have any good advice for an upgrade strategy from php4.3.6 to
> php5.0.1?  I have a MAC OSX 10.3.5 system that I use for my test machine and
> an Open BSD system for my production machine.  The production machine is
> also semi-managed hosting system (virtual server).  Can I expect my current
> 4.3.6 code to run on php5?

Try running it under php5... where you encounter errors... fix errors :)

Cheers,
Rob.
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
:-P duh...  

Wasn't sure if php4 code would run under php5.

>From the sounds of your response, I guess it will process 4.3.x code...

/T


on 9/11/04 18:47, Robert Cummings at [EMAIL PROTECTED] wrote:

> On Sat, 2004-09-11 at 19:35, [EMAIL PROTECTED] wrote:
>> Anyone have any good advice for an upgrade strategy from php4.3.6 to
>> php5.0.1?  I have a MAC OSX 10.3.5 system that I use for my test machine and
>> an Open BSD system for my production machine.  The production machine is
>> also semi-managed hosting system (virtual server).  Can I expect my current
>> 4.3.6 code to run on php5?
> 
> Try running it under php5... where you encounter errors... fix errors :)
> 
> Cheers,
> Rob.

--- End Message ---
--- Begin Message ---
On Sat, 2004-09-11 at 22:43, Tim Best wrote:
> :-P duh...  
> 
> Wasn't sure if php4 code would run under php5.
> 
> >From the sounds of your response, I guess it will process 4.3.x code...

For the most part you should get very few errors. You will probably get
a lot of warnings, but they will probably be of a couple of varieties
related to deprecated stuff.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Hello everyone,

I had an apache server running with php 5. Now I installed unix on that pc and apache 
and php 5.
I am using some forms on web pages and get their values by writing
        $foo = $_POST["foo"];
Since I 'upgraded' to unix i am getting a double backslash for each backslash entered 
on the form
and '\"' for every '"'.
Could someone please tell me what's going on? Did I miss a part of the FAQ?
(The form looks like
        <form method="post">
        <input type="text" />
        <input type="submit" name="action" value="submit" />
        </form>
)

Thank you in advance

--- End Message ---
--- Begin Message ---
On Sunday 12 September 2004 08:53, PHP Mailing list account wrote:

> I had an apache server running with php 5. Now I installed unix on that pc
> and apache and php 5. I am using some forms on web pages and get their
> values by writing $foo = $_POST["foo"];
> Since I 'upgraded' to unix i am getting a double backslash for each
> backslash entered on the form and '\"' for every '"'.
> Could someone please tell me what's going on? Did I miss a part of the FAQ?

goggle > php magic quotes

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
We are Pentium of Borg. Division is futile. You will be approximated.
*/

--- End Message ---
--- Begin Message ---
I have the following in my CSS (loaded on the main site page):

/* FOOTER */

.footer {
        font-family: Tahoma, "Trebuchet MS";
        font-size: 9px;
        color: #BFBFBF;
        text-decoration: none;
        border: none;
        line-height: 1.25em;
        font-weight: bold;
}

.footer a:link {
        font-family: Tahoma, Arial, "Trebuchet MS";
        font-size: 9px;
        color: #BFBFBF;
        text-decoration: none;
        border: none;
        line-height: 1.25em;
        font-weight: bold;
}

.footer a:visited {
        font-family: Tahoma, Arial, "Trebuchet MS";
        font-size: 9px;
        color: #BFBFBF;
        text-decoration: none;
        border: none;
        line-height: 1.25em;
        font-weight: bold;
}

.footer a:hover {
        font-family: Tahoma, Arial, "Trebuchet MS";
        font-size: 9px;
        color: #BFBFBF;
        text-decoration: none;
        border: none;
        line-height: 1.25em;
        font-weight: bold;
}

and the following in my PHP script

<div class="footer" style="position:absolute; top:680px; left:60px; 
width:500; height:2; vertical-align:bottom; z-index:1;">
&copy; 2004 Keatley Photography - <a 
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> - 206 240-5543
</div></td></tr>


But, when I change the style.css file and upload it and then refresh the 
browser, any changes to the font, style, etc to the "footer" class are not 
picked up.  What should I look for??

Jeff 

--- End Message ---
--- Begin Message ---
Possibly you dont have those fonts to see them?

Jason

"Jeff Swanberg" <[EMAIL PROTECTED]> wrote: 
> 
> I have the following in my CSS (loaded on the main site page):
> 
> /* FOOTER */
> 
> .footer {
>         font-family: Tahoma, "Trebuchet MS";
>         font-size: 9px;
>         color: #BFBFBF;
>         text-decoration: none;
>         border: none;
>         line-height: 1.25em;
>         font-weight: bold;
> }
> 
> .footer a:link {
>         font-family: Tahoma, Arial, "Trebuchet MS";
>         font-size: 9px;
>         color: #BFBFBF;
>         text-decoration: none;
>         border: none;
>         line-height: 1.25em;
>         font-weight: bold;
> }
> 
> .footer a:visited {
>         font-family: Tahoma, Arial, "Trebuchet MS";
>         font-size: 9px;
>         color: #BFBFBF;
>         text-decoration: none;
>         border: none;
>         line-height: 1.25em;
>         font-weight: bold;
> }
> 
> .footer a:hover {
>         font-family: Tahoma, Arial, "Trebuchet MS";
>         font-size: 9px;
>         color: #BFBFBF;
>         text-decoration: none;
>         border: none;
>         line-height: 1.25em;
>         font-weight: bold;
> }
> 
> and the following in my PHP script
> 
> <div class="footer" style="position:absolute; top:680px; left:60px; 
> width:500; height:2; vertical-align:bottom; z-index:1;">
> � 2004 Keatley Photography - <a 
> href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> - 206 240-5543
> </div></td></tr>
> 
> 
> But, when I change the style.css file and upload it and then refresh the 
> browser, any changes to the font, style, etc to the "footer" class are not 
> picked up.  What should I look for??
> 
> Jeff 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Nope, I have them all.  Any other ideas???  Do I need to load the style.css 
on every sub-page or just on the main page?  Perhaps the style sheet is 
cached so, after I upload a new one, I need to do something to flush the 
cache?

js



"Jason Davidson" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Possibly you dont have those fonts to see them?
>
> Jason

--- End Message ---
--- Begin Message ---
<div class="footer" style="position:absolute; top:680px; left:60px; width:500; height:2; vertical-align:bottom; z-index:1;">
&copy; 2004 Keatley Photography - <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> - 206 240-5543
</div></td></tr>


There is no PHP here.


-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.

--- End Message ---
--- Begin Message ---
Hello,
I have the following class for ftp:

--   class FTP {
    var $host;
    var $port;
    var $username;
    var $password;
    var $connection;
    function FTP($host="localhost",$port=21,$user="anonymous",$password="") {
      $this->host=$host;
      $this->port=$port;
      $this->username=$user;
      $this->password=$password;
    }

    function connect($timeout=90) {
      $this->connection=ftp_connect($this->host,$this->port,$timeout)
or die("we");
    }

    function login() {
      ftp_login($this->connection,$this->username,$this->password);
      ftp_pasv($this->connection,true);
    }

    function close() {
      ftp_close($this->connection);
    }

    function get_files($dir="/") {
      ftp_chdir($this->connection,$dir);
      $array=ftp_nlist($this->connection,ftp_pwd($this->connection));
      var_dump($array);
    }
  }

When I connect to ftp server for my website at
ftp://kkrizka.mybesthost.com and try to use nlist function, it returns
false. But when I used ftp_rawlist, it returned a list of files no
problem. I tried to connect to a ftp server on my computer, and it
worked normally. I am not sure what is wrong...
--
Cheers,
Karol Krizka
6 Gmail Invintations, anyone want them?

--- End Message ---
--- Begin Message --- Alexander Kleshchevnikov wrote:
Maybe you want this:

while ($data = mysql_fetch_assoc($news)) {
    $sql += "INSERT INTO newtable VALUES ($data['AUS'], $data['id']);\r\n";
}

If you nevertheless want save the data in array you can use a
two-dimensional array $authors:

$authors = array();
while ($data = mysql_fetch_assoc($news)) {
    $authors[] = array('AUS' => $data['AUS'], 'id' => $data[id]);
}

..

foreach ($author in $authors) {
    $sql += "INSERT INTO newtable VALUES ($author['AUS'],
$author['id']);\r\n";
}

--
Seigo
www.geocities.com/seigo_ua/


Just a note to help the learning process. Either mysql_fetch_assoc() and mysql_fetch_array() will return your result in an array, so you don't need to actually create one.

--
Chris Martin
Web Developer
Open Source & Web Standards Advocate
http://www.chriscodes.com/

--- End Message ---
--- Begin Message ---
Using the code shown below, I get nothing from get_class_vars but I do get 
very useful results from get_class_methods. I realize that this is how it is 
supposed to be, but it would be useful to be able to get the property 
members of the class. The reason I want to see the properties of DOMDocument 
is because they are not documented. There are some methods of the 
DOMDocument class that exist in other implemntations of the DOM but not the 
PHP 5 implemntation. Probably the equivalent is available using properties 
to get data instead of methods. Due to the absence of documentation of the 
properties, it would help to have a function that shows the properties. I 
will look for the source code and I assume I can find the answer there, so I 
assume I don't need help with that. Unless there is some other function that 
will show the properties of a class in the manner I am looking for.


<pre><?php
function ShowClass($class_name) {
print "Class $class_name properties:\n";
$class_vars = get_class_vars($class_name);
sort($class_vars);
foreach ($class_vars as $name => $value)
   echo "$name : $value\n";
print "\nClass $class_name methods:\n";
$class_methods = get_class_methods($class_name);
sort($class_methods);
foreach ($class_methods as $name => $value)
   echo "$name : $value\n";
}
ShowClass("DOMDocument");
?></pre>

--- End Message ---
--- Begin Message ---
On Sat, 2004-09-11 at 22:36, Jeff Swanberg wrote:

> Nope, I have them all.  Any other ideas???  Do I need to load the style.css 
> on every sub-page or just on the main page?  Perhaps the style sheet is 
> cached so, after I upload a new one, I need to do something to flush the 
> cache?
> 
> js
> 

Hi Jeff,

This is totally OT for a PHP list but I'll give you an answer.

CSS has rules of precedence.  When a browser is looking at a html page
for styles it first looks for external style sheets, just like you said
you have, then it looks for style tags in the <head>...</head> section
of the page, finally the browser looks at individual tags, <div>'s <p>'s
whatever.  The browser will then use the style rules which are closest
to the tag, therefore external rules are overridden by style tags in the
<head> section of a page which are overridden by style rules embedded
into actual tags. e.g. <hr color='red' align='center'>.

Hope that clarifies.

David

--- End Message ---

Reply via email to