php-general Digest 17 Dec 2004 16:04:01 -0000 Issue 3175

Topics (messages 204557 through 204583):

File Locking during *other* file operations
        204557 by: Gerard Samuel
        204577 by: Jason Barnett
        204578 by: Michael Sims

Re: I got the mail form blues!  HTML/POST/mail() question - Also request for 
style suggestions
        204558 by: David Robley
        204563 by: Ryan King
        204581 by: Monique Verrier

Miami PHP groups?
        204559 by: Josh
        204582 by: Ligaya Turmelle

Re: Buffering
        204560 by: Lorderon

upload file warning
        204561 by: yangshiqi
        204562 by: M. Sokolewicz
        204565 by: yangshiqi

simple terms
        204564 by: Jason Wydro
        204580 by: Ligaya Turmelle

File-handling
        204566 by: gustav.varupiraten.se
        204567 by: Ian Firla

mysql sessions vs flat file?
        204568 by: Jason Morehouse
        204570 by: Raditha Dissanayake

Refreshing page after form submission
        204569 by: S.D.Price
        204575 by: Mike Smith

IDE recommendation-- (Free?)
        204571 by: GH
        204572 by: John Nichel
        204573 by: Mat Harris
        204574 by: Jeffery Fernandez

Question
        204576 by: Tom Luigjes
        204579 by: Ligaya Turmelle

Problem with loose typing
        204583 by: Chris Boget

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 ---
Im talking about file locking during deleting, and moving
files.
Is it possible to perform file locking for these file operations?
If so, can you provide psuedo code.
Thanks

--- End Message ---
--- Begin Message --- Gerard Samuel wrote:
Im talking about file locking during deleting, and moving
files.
Is it possible to perform file locking for these file operations?
If so, can you provide psuedo code.
Thanks

Sure... just acquire the exclusive lock like you would for writing to a file, but do the delete / move instead. Your apps must actually try to flock before *every* file operation though if you expect the locking system to work.
--- End Message ---
--- Begin Message ---
Gerard Samuel wrote:
> Im talking about file locking during deleting, and moving
> files.
> Is it possible to perform file locking for these file operations?

Yes, have your scripts attempt to lock a separate lock file before performing
deleting or moving operations.

--- End Message ---
--- Begin Message ---
On Fri, 17 Dec 2004 14:32, Monique Verrier wrote:

> Hi!
> 
> I have an html string stored in $message.  I "submit" the form to a
> subroutine and the value in $message is lost.  All the other variables
> come
> into feedback.php just fine.  I would love any help.  This is a new
> language for me so any suggestions for streamlining my code would also be
> much
> appreciated.  Thanks -- Monique.
> 
> Here's my code:
> 
> <?php
> $message=getmsg($message,$recemail,$sendername,$mailmessage,$rsList
$rname);
>       mysql_free_result($rsList);
>      echo $message;  // this displays perfectly
> ?>
> 
>   <form name="maillist" method="post" action="<?php echo "feedback.php";
> ?>">
>   <div align="right">
>     <input name="email" type="hidden" value="<?php echo $email; ?>">
>     <input type="hidden" name="recipient" value="<?php echo $recipient;
>     ?>"> <input type="hidden" name="redirect" value="<?php echo $redirect;
>     ?>"> <input type="hidden" name="name" value="<?php echo $rname; ?>">
>     <input type="hidden" name="env_report" value="on">
>     <input type="hidden" name="message" value="<?php $message; ?>">

I think if you were to actually echo $message here, it should display in the
hidden field as you expect, and hence be passed as part of the form data to
the target script.

>     <input type="hidden" name="subject" size="40" value="<?php echo
> $subject; ?>" class="form">
>     <input type="hidden" name="required"
> value="Name,Email,Subject,Updates,Message">
>   </div>
>     <div align="right">
>       <input type="submit" name="Submit" value="Send!">
>     </div>
>   </form>

-- 
David Robley

A cat is the universe's way of showing us perfection.

--- End Message ---
--- Begin Message ---

On Dec 16, 2004, at 10:02 PM, Monique Verrier wrote:

Hi!

I have an html string stored in $message. I "submit" the form to a
subroutine and the value in $message is lost. All the other variables come
into feedback.php just fine. I would love any help. This is a new language
for me so any suggestions for streamlining my code would also be much
appreciated. Thanks -- Monique.

Here's my code:

<?php
$message=getmsg($message,$recemail,$sendername,$mailmessage,$rsList,$rn ame);
mysql_free_result($rsList);
echo $message; // this displays perfectly
?>

<form name="maillist" method="post" action="<?php echo "feedback.php";
?>">
<div align="right">
<input name="email" type="hidden" value="<?php echo $email; ?>">
<input type="hidden" name="recipient" value="<?php echo $recipient; ?>">
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>">
<input type="hidden" name="name" value="<?php echo $rname; ?>">
<input type="hidden" name="env_report" value="on">
<input type="hidden" name="message" value="<?php $message; ?>">
<input type="hidden" name="subject" size="40" value="<?php echo
$subject; ?>" class="form">
<input type="hidden" name="required"
value="Name,Email,Subject,Updates,Message">
</div>
<div align="right">
<input type="submit" name="Submit" value="Send!">
</div>
</form>


    <input type="hidden" name="message" value="<?php $message; ?>">

should be

    <input type="hidden" name="message" value="<?php echo $message; ?>">

-ryan

--
http://theryanking.com/blog

--- End Message ---
--- Begin Message ---
Hi David --

When I do that, it creates a problem because it displays a "> at the bottom
of my screen.  It is making me crazy!  I think it has to do with all the
quotes in the HTML, but I don't know how to deal with it.  I have listed the
code below.  Do you have any ideas?  Thank you for you help.

Monique.
**************************
$hmessage = '
<html>
<body bgcolor="ffe3bf" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="big">
  <tr>
    <td width="3%" rowspan="3" bgcolor="666666">
      <a href="../index.php"><img src="../images/logo.png" name="image"
width="97" height="115" border="0"></a></td>
    <td width="97%" height="80" bgcolor="666666" class="logo"><table
width="90%" border="0" cellpadding="2" cellspacing="1" class="xbig">
      <tr>
        <td width="100%" align="center"><h4><font color="FFE3BF">Courtesy of
Costill.Com</font></h4></td>
      </tr>
    </table>
    </td>
</tr>
  <tr>
    <td bgcolor="CCCCCC" class="xbig">&nbsp;</td>
  </tr>
</table>

<table width="80%" border="0" align="center" class="bodystyle">
  <tr>
    <td>'.$message.'<table width="100%" border="0">
    <tr>
      <td>To: '.$recemail.'</td>
      <td>To: '.$rname.'</td>
    </tr>
    <tr>
      <td>From: '.$sendername.'</td>
    </tr>
    <tr>
      <td>'.$mailmessage.'</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="331">&nbsp;
        <table width="100%" border="0">';
  //okay a lot of the html is in $hmessage

  mysql_data_seek ($rsList, 0);

        do { $hmessage .='<tr><td height="65">'.
      $row_rsList['name'].'<br>'.
            $row_rsList['addr'].'<br>'.
            $row_rsList['csz'].'<br><td>'.
   $row_rsList['tel'].'</td><td>Type: '.
   $row_rsList['type'].'</td></tr><tr><td colspan="4">';

   if (!is_null($row_rsList['category'])) {$hmessage
.=$row_rsList['category'];}
   $hmessage .= "</td></tr>";
   if (!is_null($row_rsList['comments']))
     {
     $hmessage .='<tr><td colspan="4">'.$lblcomment;
     $hmessage .= $row_rsList['comments'];
     $hmessage .="</td></tr>";
     }
          $hmessage .='<tr><td colspan="4"><hr></td></tr>';

          } while ($row_rsList = mysql_fetch_assoc($rsList));


          $hmessage .='</table></td></tr></table></div></td></tr></table>
              <table width="100%" border="0" cellspacing="0" cellpadding="2"
bgcolor="CCCCCC">
   <tr> <td> �2004 <a href="www.costill.com"></a> </td>
    <td
align="right">www.healdsburgmenus.com</td></tr></table></body></html>';


***************************

"David Robley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Fri, 17 Dec 2004 14:32, Monique Verrier wrote:
>
> > Hi!
> >
> > I have an html string stored in $message.  I "submit" the form to a
> > subroutine and the value in $message is lost.  All the other variables
> > come
> > into feedback.php just fine.  I would love any help.  This is a new
> > language for me so any suggestions for streamlining my code would also
be
> > much
> > appreciated.  Thanks -- Monique.
> >
> > Here's my code:
> >
> > <?php
> > $message=getmsg($message,$recemail,$sendername,$mailmessage,$rsList
> $rname);
> >       mysql_free_result($rsList);
> >      echo $message;  // this displays perfectly
> > ?>
> >
> >   <form name="maillist" method="post" action="<?php echo "feedback.php";
> > ?>">
> >   <div align="right">
> >     <input name="email" type="hidden" value="<?php echo $email; ?>">
> >     <input type="hidden" name="recipient" value="<?php echo $recipient;
> >     ?>"> <input type="hidden" name="redirect" value="<?php echo
$redirect;
> >     ?>"> <input type="hidden" name="name" value="<?php echo $rname; ?>">
> >     <input type="hidden" name="env_report" value="on">
> >     <input type="hidden" name="message" value="<?php $message; ?>">
>
> I think if you were to actually echo $message here, it should display in
the
> hidden field as you expect, and hence be passed as part of the form data
to
> the target script.
>
> >     <input type="hidden" name="subject" size="40" value="<?php echo
> > $subject; ?>" class="form">
> >     <input type="hidden" name="required"
> > value="Name,Email,Subject,Updates,Message">
> >   </div>
> >     <div align="right">
> >       <input type="submit" name="Submit" value="Send!">
> >     </div>
> >   </form>
>
> -- 
> David Robley
>
> A cat is the universe's way of showing us perfection.

--- End Message ---
--- Begin Message ---
Any computer groups or resources for learning PHP in the Miami area?  I am
new here ... trying to learn PHP... would like to meet other people doing
the same.

--- End Message ---
--- Begin Message ---
http://www.php.net/support.php -- and follow the links under user groups

Respectfully,
Ligaya Turmelle

---
Life is a game... so have fun.
---
www.PHPCommunity.org
Open Source, Open Community
Visit for more information or to join the movement



Josh wrote:
Any computer groups or resources for learning PHP in the Miami area?  I am
new here ... trying to learn PHP... would like to meet other people doing
the same.


--- End Message ---
--- Begin Message ---
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message:
> > I need to store chunks of output into files.
>
> Which output and why?
any output of the program that goes to php://stdout.. if from echo, print,
var_dump, code breaking, etc... why? cuz I want to get chunks of output into
variables to make a cache system..

> What is the Big Picture here?
I want to build a cache system and store there not the whole page, but
chunks of the page.. the chunks are started then ended in some point.. all
the output between the start and stop points is a chunk and I want to get it
into variable... that's exactly using ob_start() then ob_get_contents() to
get the chunk data then ob_end_flush()... But, when using ob_* funcs.. when
calling ob_start() all output afterwards is buffered till flushing.. what i
need is to to allow output being transfered imediately but still get the
chunks in variables..

thanks,
    Lorderon.

--- End Message ---
--- Begin Message ---
I got a php waring when I upload my file:

 

Warning: MAX_FILE_SIZE of 200000 bytes exceeded - file [imgpath=mz-n10.pdf]
not saved in Unknown on line 0

 

 

In the form I write like these:

 

<input type='hidden' name='MAX_FILE_SIZE' value=200000>
<input type='file' name='imgpath'>

 

And my configuration is :

 

file_uploads = on

upload_max_filesize = 4M

upload_tmp_dir = /tmp

 

so, what 's wrong? And can I catch the exceeded file error before it is
passed back to the client?

 

 

Best wishes.

 

yangshiqi

 

 

 


--- End Message ---
--- Begin Message --- Yangshiqi wrote:
I got a php waring when I upload my file:



Warning: MAX_FILE_SIZE of 200000 bytes exceeded - file [imgpath=mz-n10.pdf]
not saved in Unknown on line 0

that seems like a very descriptive warning to me...




In the form I write like these:



<input type='hidden' name='MAX_FILE_SIZE' value=200000>
yes... this is where you did put it...
<input type='file' name='imgpath'>



And my configuration is :



file_uploads = on

upload_max_filesize = 4M

upload_tmp_dir = /tmp



so, what 's wrong?
what do you *think* is wrong :| I mean... just *read* the warning :S
And can I catch the exceeded file error before it is
passed back to the client?
a) it's checked for size and discarded immediately
b) the file is never passed 'back' to the client. It just disappears into the abyss that is /dev/null





Best wishes.



yangshiqi









--- End Message ---
--- Begin Message ---
All right.
I know that it exactly does what it is, and can't be really caught directly
since this happens before the script gets control.
After display_errors = off, I can pick it up from error logs.

Thanks all.

-----邮件原件-----
发件人: M. Sokolewicz [mailto:[EMAIL PROTECTED] 
发送时间: 2004年12月17日 14:48
收件人: [EMAIL PROTECTED]
主题: [PHP] Re: upload file warning

Yangshiqi wrote:
> I got a php waring when I upload my file:
> 
>  
> 
> Warning: MAX_FILE_SIZE of 200000 bytes exceeded - file
[imgpath=mz-n10.pdf]
> not saved in Unknown on line 0
> 
that seems like a very descriptive warning to me...
>  
> 
>  
> 
> In the form I write like these:
> 
>  
> 
> <input type='hidden' name='MAX_FILE_SIZE' value=200000>
yes... this is where you did put it...
> <input type='file' name='imgpath'>
> 
>  
> 
> And my configuration is :
> 
>  
> 
> file_uploads = on
> 
> upload_max_filesize = 4M
> 
> upload_tmp_dir = /tmp
> 
>  
> 
> so, what 's wrong? 
what do you *think* is wrong :| I mean... just *read* the warning :S
And can I catch the exceeded file error before it is
> passed back to the client?
a) it's checked for size and discarded immediately
b) the file is never passed 'back' to the client. It just disappears 
into the abyss that is /dev/null
> 
>  
> 
>  
> 
> Best wishes.
> 
>  
> 
> yangshiqi
> 
>  
> 
>  
> 
>  
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
i would like to better understand pear. is there some ver basic doc that
you know of?
 
-------------------------------------------

Jason Wydro

voice: 727 489 2684

fax: 727 489 7422

email: [EMAIL PROTECTED]

web:  <http://www.jasonwydro.com/> www.jasonwydro.com

---------------------------------------------

 

--- End Message ---
--- Begin Message --- All I know of is the PEAR documentation (http://pear.php.net/manual/en/introduction.php) and a couple of books on the market. I have "Essential PHP Tools..." by David Sklar (http://www.amazon.com/exec/obidos/tg/detail/-/1590592808/qid=1103298277/sr=1-10/ref=sr_1_10/104-7552277-0639155?v=glance&s=books)

Respectfully,
Ligaya Turmelle

---
Life is a game... so have fun.
---
www.PHPCommunity.org
Open Source, Open Community
Visit for more information or to join the movement



Jason Wydro wrote:
i would like to better understand pear. is there some ver basic doc that
you know of?
-------------------------------------------

Jason Wydro

voice: 727 489 2684

fax: 727 489 7422

email: [EMAIL PROTECTED]

web:  <http://www.jasonwydro.com/> www.jasonwydro.com

---------------------------------------------




--- End Message ---
--- Begin Message ---
Hi there!

Can someone explain the major difference between fgets and fopen? Which is
the best together with plain textfiles? and why?

eof and feof. What's the difF? *don't get it*

When using fget. Is it something special you should think when taking care
of line-breaks? (/n, /r/n ...)

/G

--- End Message ---
--- Begin Message ---
fgets uses the resource created by fopen.

Read the manual:

http://it.php.net/fopen

http://it.php.net/fgets

look at the example:

<?php
$handle = fopen("/tmp/inputfile.txt", "r");
while (!feof($handle)) {
   $buffer = fgets($handle, 4096);
   echo $buffer;
}
fclose($handle);
?>

Ian

On Fri, 2004-12-17 at 11:24 +0100, [EMAIL PROTECTED] wrote:
> Hi there!
> 
> Can someone explain the major difference between fgets and fopen? Which is
> the best together with plain textfiles? and why?
> 
> eof and feof. What's the difF? *don't get it*
> 
> When using fget. Is it something special you should think when taking care
> of line-breaks? (/n, /r/n ...)
> 
> /G
> 

--- End Message ---
--- Begin Message ---
Hello all,

Has anyone had an experience with storing sessions in mysql (or sqlite)? If so, what if any are the performance benefits? Obviously, there would have to be an extra db query per page... but would that be faster then opening a text file?

Also, I was trying to post to the php news server, but my messages weren't showing up. Is it read only? Or just slow?

Cheers,
-J

--
 Vendorama
 http://www.vendorama.com
 The evolution of e-commerce

--- End Message ---
--- Begin Message ---
Jason Morehouse wrote:

Hello all,

Has anyone had an experience with storing sessions in mysql (or sqlite)? If so, what if any are the performance benefits? Obviously, there would have to be an extra db query per page... but would that be faster then opening a text file?

Speed depends on several factors and I would not comment on it. One of the main advantages of placing session information in the database is that your web application can then be clustered more easily. The other advantage is that if you are on a shared hosting enviorenment there some measure of additional protection for your session data when it's stored in the database.
The main disadvantage is that you are complicating your application a bit and session management errors may become harder to track.


Also, I was trying to post to the php news server, but my messages weren't showing up. Is it read only? Or just slow?

Cheers,
-J



--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload
--- End Message ---
--- Begin Message ---
Hi, I have a form which when submitted adds a record to a DB. However if
the user clicks back it resubmits the same record.

I have tried using cache control to no avail :

header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified:" . gmdate("D, d M Y H:i:s"). " GMT");
header ("Cache-control: no-store, no-cache, must revalidate");
header("Cache-control: post-check=0, pre-check=0, false");
header ("Pragma: no-cache");
session_cache_limiter("nocache");

I also tried testing for the presence of a submit button so if the user
enters data submits the form and clicks back the page will refresh.

<?php 

if ($_POST['submit']) { 
echo "<META HTTP-EQUIV='refresh' CONTENT='0; URL=$PHP_SELF'>";
} else { 
} 
?>

The problem is I need to display a confirmation message after the user
submits, and with this technique the page always redisplays the (empty)
form after submission.

Any ideas?



Steve


--- End Message ---
--- Begin Message ---
Would something like this work....

If($_POST['submit']){//add error checking for whatever critical fields

echo "Thank you for filling out my form.\n";

} else {
//display form with a <input type="submit" name="submit" value="Save">

}

--- End Message ---
--- Begin Message ---
Hi...

 I am looking for a FREE PHP IDE that uses syntax highlighting and
code completion amongst other features...

Do any of you have any recommendations... again I am looking for FREE
(not much budget for me)?

I use BOTH Linux and Windows....

Thanks
Gary

--- End Message ---
--- Begin Message --- GH wrote:
Hi...

 I am looking for a FREE PHP IDE that uses syntax highlighting and
code completion amongst other features...

Do any of you have any recommendations... again I am looking for FREE
(not much budget for me)?

I use BOTH Linux and Windows....

Thanks
Gary


Yeah, search the archives and/or read the email that you got when you subscribed to this list.

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message ---
On Fri, Dec 17, 2004 at 08:20:36 -0500, GH wrote:
> Hi...
> 
>  I am looking for a FREE PHP IDE that uses syntax highlighting and
> code completion amongst other features...
> 
> Do any of you have any recommendations... again I am looking for FREE
> (not much budget for me)?
> 
> I use BOTH Linux and Windows....

I can heartily recommend SciTE (http://www.scintilla.org/SciTE.html)
i believe it has the features you desire, plus, there is a version customised
for php, available here http://amip.tools-for.net/SciTE-CVS.exe

btw, there is a GTK+ version so you can use it on linux as well.

> Thanks
> Gary

hope this helps

mat

-- 
Cats land on their feet. 
Toast lands jellyside down.
A cat glued to some jelly toast will hover in quantum indecision 

perl -e'$_=q#: 13_2: 12/o{>: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7:\
        1           m m::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
        
Yes, of course it's the right cabl [le0: NO CARRIER]

Attachment: pgpvdEzWtNLPE.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Mat Harris wrote:

On Fri, Dec 17, 2004 at 08:20:36 -0500, GH wrote:


Hi...

I am looking for a FREE PHP IDE that uses syntax highlighting and
code completion amongst other features...

Do any of you have any recommendations... again I am looking for FREE
(not much budget for me)?

I use BOTH Linux and Windows....



I can heartily recommend SciTE (http://www.scintilla.org/SciTE.html) i believe it has the features you desire, plus, there is a version customised for php, available here http://amip.tools-for.net/SciTE-CVS.exe

btw, there is a GTK+ version so you can use it on linux as well.



Thanks
Gary



hope this helps

mat



here you go.. a well maintained list: http://www.thelinuxconsultancy.co.uk/phpeditors/

cheers,
Jeffery
http://melbourne.ug.php.net

--- End Message ---
--- Begin Message ---
>Hi, I'm trying to make a little script to edit arrays.
>For example, i have an array file named config.php, and it holds this:
>
><?php
>$config = array(
>        'email' => 'E-mail',
>        'meta_author' => 'Author',
>?>
>
>I wish to edit this file, through another file, named edit.php, or
>admin.php, i would like to use forms for it. At the moment i've found out
>how to show the arrays within a text field, but now i wish to edit them
>through the same text field. With buttons etc.
>
>Here's how i call the arrays from the file:
>
><input name="hiddenfield" type="text" value="<?php print $config[email];
>?>"> <input name="hiddenfield" type="text" value="<?php print
>$config[meta_author]; ?>">
>
>Is there anything that can let me edit it? I think i will have to edit it
>through a form, it might be simple, though it might not be, please help me
>out!

--- End Message ---
--- Begin Message --- I assume by edit you mean change the value to something completely new. If you are having the user input the new value you 1) must make sure it is valid input and 2)move it into the array value (maybe set the array as a session variable so it crosses over to the next page instead of being re initialized).

Maybe something like:

if(isset($_POST['submit']){
    // make sure the input is valid first
    $_SESSION['config']['email'] = $_POST['email'];
    $_SESSION['config']['meta_author'] = $_POST['author'];
}

if (!isset($_SESSION['config'])){
    $_SESSION['config']= array(
        'email' => 'E-mail',
        'meta_author' => 'Author')
}

<input type = "hidden" name="email" type="text"
    value="<?php print $config[email];?>">

<input type = "hidden" name="author" type="text"
    value="<?php print $config[meta_author]; ?>">

Respectfully,
Ligaya Turmelle

---
Life is a game... so have fun.
---
www.PHPCommunity.org
Open Source, Open Community
Visit for more information or to join the movement



Tom Luigjes wrote:
Hi, I'm trying to make a little script to edit arrays.
For example, i have an array file named config.php, and it holds this:

<?php
$config = array(
      'email' => 'E-mail',
      'meta_author' => 'Author',
?>

I wish to edit this file, through another file, named edit.php, or
admin.php, i would like to use forms for it. At the moment i've found out
how to show the arrays within a text field, but now i wish to edit them
through the same text field. With buttons etc.

Here's how i call the arrays from the file:

<input name="hiddenfield" type="text" value="<?php print $config[email];
?>"> <input name="hiddenfield" type="text" value="<?php print
$config[meta_author]; ?>">

Is there anything that can let me edit it? I think i will have to edit it
through a form, it might be simple, though it might not be, please help me
out!



--- End Message ---
--- Begin Message ---
Consider the following:

  function test() {
    static $i = 0;

    $i++;
    $retval = ( $i <= 10 ) ? $i : '';

    return $retval;

  }
  while( $bob = test()) {
    echo $bob . '<br>';

  }

You would expect the while loop to go on forever just looking
at the above code.  However, what's happening is that when the
empty string is getting returned due to $i being > 10, the while
loop is resolving FALSE when $bob is set to the value of the
empty string.
Is there any way that I can force this not to happen?  That the
while loop resolves as FALSE only when the function actually
returns a (boolean) FALSE value?

thnx,
Chris

--- End Message ---

Reply via email to