php-general Digest 21 Jun 2002 09:55:07 -0000 Issue 1418

Topics (messages 103207 through 103247):

Re: Speed tests? RAM usage displays?
        103207 by: 1LT John W. Holmes
        103208 by: Uros Gruber

Re: JPGrapgh and GD Library SAMBAR server
        103209 by: Nico Jansen - NiRo IT Consultants B.V.

Re: Architecture problem? Google want index files exept the main page.
        103210 by: Kevin Stone

Installing & Syncronizing
        103211 by: César Aracena
        103232 by: Mark
        103238 by: César Aracena

Re: alternatives? (Was: Shot in the dark)
        103212 by: Chris Garaffa
        103213 by: John Taylor-Johnston

Re: How many copies
        103214 by: Martin Towell

Hex operations
        103215 by: Frank S. Kicenko
        103217 by: Martin Towell
        103222 by: Frank S. Kicenko
        103223 by: Frank S. Kicenko

include() question...
        103216 by: Phil Schwarzmann
        103218 by: Purushotham Komaravolu
        103220 by: Philip Olson
        103221 by: David Freeman

session in class problem
        103219 by: ninti.ninti.com

Questions on uploading files.
        103224 by: By Proxy

Re: insert date with a calendar
        103225 by: Justin French

Re: Error Reporing Questions with Mac
        103226 by: Justin French

Re: Can I be an ASP with PHP?
        103227 by: Justin French

Re: read how many caracter
        103228 by: 1LT John W. Holmes

PHP, Java integration failed: Red Hat 7.1, JDK 1.4, Apache 1.3x
        103229 by: William John Burns

How to Show my Own Error Message Instead of Mysql Error?
        103230 by: Jack
        103231 by: Martin Towell
        103235 by: Andy

Script text
        103233 by: sonjaya

Mysql Insert from select problem with php
        103234 by: David McInnis
        103236 by: Andy
        103239 by: Rasmus Lerdorf
        103245 by: 1LT John W. Holmes

Sybase Database CONNECTIVITY!
        103237 by: Vivek Kumar Agrawal

Stumped on a function
        103240 by: Jason Soza
        103241 by: David Freeman
        103244 by: 1LT John W. Holmes

OSX + Apache + PHP + MySQL
        103242 by: Justin French

PHP + SUN SOLARIS + exec() or sytem()
        103243 by: Fatih Üstündað

ARRAY, IF & INSERT
        103246 by: César Aracena
        103247 by: Jesper Brunholm

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 ---
> Is there any way to determine script's memory usage?

Depends on your web server. There is a way in apache. Rasmus answered this
same question for me a couple weeks ago, look through the archives. I saw an
option in IIS to put memory usage into the logs, that may work, too.

> What about execution time in ms (with breakpoints)?

Plenty of classes around that'll do basic timing, but not sure on the
breakpoint. shouldn't be that hard to implement, though. PEAR has a class to
do it, I think, or search phpclasses.org

> And is there way to measure MySQL query speed in ms?

Not really. I really wish there was a function to return query time, but
there isn't. Best you can do is take a timestamp before you issue the query
and one afterwards. That's not going to be the actual query time, but it'll
give you an idea. Best way to implement that is to make a wrapper for
mysql_query()

---John Holmes...

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

Thursday, June 20, 2002, 10:56:40 PM, you wrote:

PS> Is there any way to determine script's memory usage?

When you configure and compile you have some option
--with-memory-limit  something like that and then add

\"%{mod_php_memory_usage}n\"

in you http.conf of Apache where you define how log files
look like.


PS> What about execution time in ms (with breakpoints)?
PS> And is there way to measure MySQL query speed in ms?

u can use microtime function

    function getMicrotime()
    {
        list($usec, $sec) = explode(" ",microtime()); 
        return ((float)$usec + (float)$sec); 
    }

in your head of your script than call:

$start = getMicrotime();

and then in the end of script

$stop = getMicrotime();
$diff = $stop - $start;
echo "Execution time was: ".$diff;

You can also use Benchmark module from PEAR there is also
support for markers.

-- 
lp,
 Uros                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hi Christopher,

I think that we have the same configuration. I'm running PHP with the SAMBAR server as 
well and the JP Graph module is working OK with me so it should be working.
Have you tried the JP Graph - testsuit : On my notebook ( W2K ) I installed it at 
http://localhost/jpgraph-1.6.1/src/Examples/testsuit_jpgraph.php


Hopes this help :

Good Luck N:-J
www.niro-it.nl

My phpini looks like this:

include_path=.

[PHP]
extension=php_gd.dll

My modifications in jpgraph.php for my configuration:
// The full absolute name of directory to be used as a cache. This directory MUST
// be readable and writable for PHP. Must end with '/'
DEFINE("CACHE_DIR","/db/njhome/jpgraph-1.6.1/jpgraph_cache/");

// The URL relative name where the cache can be found, i.e
// under what HTTP directory can the cache be found. Normally
// you would probably assign an alias in apache configuration
// for the cache directory. 
DEFINE("APACHE_CACHE_DIR","/jpgraph-1.6.1/jpgraph_cache/");

// Directory for TTF fonts. Must end with '/'
DEFINE("TTF_DIR","/dv/fonts/jpgttf/ttf/");


 
PHPinfo looks like this:
      PHP Version 4.1.1 

      System Windows NT 5.0 build 2195 
gd
      GD Support enabled 
      GD Version 1.6.2 or higher 
      FreeType Support enabled 
      FreeType Linkage with TTF library 
      JPG Support enabled 
      PNG Support enabled 
      WBMP Support enabled 



      SERVER["SERVER_SOFTWARE"] SAMBAR 5.0  


"Andy" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Christopher,
> 
> it seems to me that you have gd1.8 enabled but jdgraph in you version
> requires gd2.
> 
> Check your php.ini if the propper library is activated.
> 
> Hope this helps,
> 
> Andy
> --
> ----------------------------------------------------
> http://www.globosapiens.net
> Global Travellers Network!
> 
> 
> 
> "Christopher J. Crane" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]...
> > I recently installed and got working the GD library under a Windows 2K
> > server running SAMBAR server as the web server. I got a simple test script
> > to try to be sure the GD Library was working and it is and I am able to
> > output images in PNG JPEG and GIF formats.
> >
> > My problem is that I can not get the JPGraph scripts running correctly. I
> > get error messages such as:
> > Warning: Undefined index:  gd2 in ../jpgraph.php on line 3418
> >
> > Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
> >
> > Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
> >
> > Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
> >
> > Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
> >
> > Warning: Cannot add header information - headers already sent by (output
> > started at ../jpgraph.php:3418) in ../jpgraph.php on line 4257
> > ?PNG
> >
> > I am not sure what I am doing wrong. I would like to use JPGraph because
> of
> > the nice graphs I have seen on his website. Any help would be great.
> >
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
It took me a few minutes to figure out where the /profiles link was on your
hompage.  You understand that the only way a spider can read the content on
your webpage is to fopen() and parse the contents.  Google's software cannot
"explore" your dynamic content like a human can.  If the random profiles
link does not point to A000000201.html when the page is parsed for the
spider's visit then the spider will never know about that page and it won't
get indexed.  If you want these pages to be indexed then build a new page on
your website called "profiles" and have it print links to all profile pages
on the same page.  Link the to the profiles page from the home page.
-Kevin

----- Original Message -----
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 2:41 PM
Subject: [PHP] Architecture problem? Google want index files exept the main
page.


> Hi guys,
>
> I did recently launch my first web site and I am asking myself why google
is
> only indexing the first page.
> To get a better index on other search engines I am passing parameters a
bit
> strange and the dynamic pages
> look more like static ones. So I hope this was not a shoot in a hole :-(
>
> I am getting the parameters from the url and decode them after a certain
> key. The file looks to the visitor like
> it is a directory while I am forcing apache to parse it with php.
>
> So this is the first day google is indexing it, but as I said I tryed to
> search the site with google site search and it
> does only find the first page.
>
> A site like:
> http://www.globosapiens.net/profiles/A0000002021.html
>
> is not indexed at all!!
>
> Did I go the wrong path, or what else is going on? Thank you for any help,
>
> Andy
>
> --
> ----------------------------------------------------
> http://www.globosapiens.net
> Global Travellers Network!
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Hello all,
 
I have this client who has a T connection and would like to run a PHP /
MySQL based program in local mode, but also be able to make the data
available from the web but hosted in a remote server… kinda strange u
think? Me too… The problem is that his server doesn’t run with IIS but
with a little ap called WinGate, which gives him all the approach for
his little network. Have anyone installed the PHP / MySQL under MS NT4.0
running WinGate before? Anything to tell me that will help me in the
process?
 
Also, I would need the MySQL people to tell me how can I make the local
& remote databases to stay synchronized let’s say with a one hour
interval top… Is this possible? FYI the remote db is hosted under a
Cobalt RAQ4i server running Red Hat Linux Apache Web server.
 
Thanks in advance.
 
 <mailto:[EMAIL PROTECTED]> Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 
--- End Message ---
--- Begin Message ---
I think you're confused. the only WinGate I know of is an alternative
to windows' internet connection sharing. It's not a web server.

and what's a T connection?

On Thu, 20 Jun 2002 19:26:37 -0300, César Aracena wrote:
>Hello all,
>
>I have this client who has a T connection and would like to run a
>PHP /
>MySQL based program in local mode, but also be able to make the data
>available from the web but hosted in a remote server… kinda strange
u
>think? Me too… The problem is that his server doesn’t run with IIS
>but
>with a little ap called WinGate, which gives him all the approach
for
>his little network. Have anyone installed the PHP / MySQL under MS
>NT4.0
>running WinGate before? Anything to tell me that will help me in the
>process?
>
>Also, I would need the MySQL people to tell me how can I make the
>local
>& remote databases to stay synchronized let’s say with a one hour
>interval top… Is this possible? FYI the remote db is hosted under a
>Cobalt RAQ4i server running Red Hat Linux Apache Web server.
>
>Thanks in advance.
>
><mailto:[EMAIL PROTECTED]> Cesar Aracena
>CE / MCSE+I
>Neuquen, Argentina
>+54.299.6356688
>+54.299.4466621
>
>



--- End Message ---
--- Begin Message ---
This is where we find several problems. The first one, is the price for
such equipment here in Argentina (more than double in US Dollars), which
is the main reason we try to get around with software.

The second issue, is that the local DB may have to work synchronized
with an on-line one in the near future, in order to serve as information
to my client's customers. I think I won't be able to tell the PHP
scripts to connect to my customer's server, due to a daily IP change
from his ISP.

> -----Original Message-----
> From: Dave Goodrich [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 7:41 PM
> To: César Aracena
> Cc: PHP General List; MySQL General
> Subject: Re: [PHP] Installing & Syncronizing
> 
> On Thu, Jun 20, 2002 at 07:26:37PM -0300, César Aracena wrote:
> > Hello all,
> >
> > I have this client who has a T connection and would like to run a
PHP /
> > MySQL based program in local mode, but also be able to make the data
> > available from the web but hosted in a remote server… kinda strange
u
> > think? Me too… The problem is that his server doesn’t run with IIS
but
> > with a little ap called WinGate, which gives him all the approach
for
> > his little network. Have anyone installed the PHP / MySQL under MS
NT4.0
> > running WinGate before? Anything to tell me that will help me in the
> > process?
> 
> Do you mean the Wingate connection sharing software?
> 
> The experiences I have with clients running Wingate were not good. My
> thoughts are that if the customer can pay you for the application then
> they can pay for a gateway router. SOHO routers are not expensive.
> 
> The customers connection will work better, his application will be
more
> stable, and your task will be easier. Everyone wins.
> 
> But then again, it is just my opinion ;^)
> 
> DAve
> 
> 
> --
> Dave Goodrich
> System Administrator
> TLS.NET
> Columbus IN
> http://tls.net
> [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello,
any chance you could set your clock to the correct date? It says July 6, 
and is really screwing up my sorting order for mail... thanks

On Saturday, July 6, 2002, at 04:49 PM, jtjohnston........


--
Chris Garaffa
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Sorry Chris,
It's set at June 20th here? Maybe my NNTP server?
John

Chris Garaffa wrote:

> Hello,
> any chance you could set your clock to the correct date? It says July 6,
> and is really screwing up my sorting order for mail... thanks
>
> On Saturday, July 6, 2002, at 04:49 PM, jtjohnston........
>
> --
> Chris Garaffa
> [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
For the first question: Will this work?
In class A, you wont get anything when you use $this->bar if the class
hasn't been instantiated.

besides that fact, you'll should get the output of:
settig:bar+foo
if you call A::foo();

As for the second question: How many times A will be made
answer: zero time - you're not instantiating it anywhere


-----Original Message-----
From: Uros Gruber [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 7:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How many copies


Hi!

my example

class A {
  var $bar = "bar";
  function set($data) {
    echo "settig:" .$data;
  }

  function foo() {
    B::get($this->bar) ;
  }
}

class B {
  function get($bar) {
    $bar = $bar . "+foo";
    A::set($bar);
  }
}

My question is. Will this work and how many time class A will
be made. one or 2 times. And is it possible to use properties
from class A in funstion set if i call it from class B, how
do i reference to it.

-- 
lp,
 Uros                          mailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Ugggg... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!

--- End Message ---
--- Begin Message ---
looks like it's trying to treat $cap1 as a decimal number, and not a hex
number
have a look at this:

for ($cap = 0; $cap < 64; $cap++)
{
  $cap1 = dechex($cap);
  $bit = ($cap1 | 0x01);
  echo "$cap - $cap1 - $bit\n";
}

and you'll see what I mean...

-----Original Message-----
From: Frank S. Kicenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Hex operations


Ugggg... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I think the goofy variable is getting truncated.... 

(3FFF | 4) is returning 7
(4FFF | 4) is returning 8

-----Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 6:37 PM
To: Frank S. Kicenko; [EMAIL PROTECTED]
Subject: RE: [PHP] Hex operations


looks like it's trying to treat $cap1 as a decimal number, and not a hex
number
have a look at this:

for ($cap = 0; $cap < 64; $cap++)
{
  $cap1 = dechex($cap);
  $bit = ($cap1 | 0x01);
  echo "$cap - $cap1 - $bit\n";
}

and you'll see what I mean...

-----Original Message-----
From: Frank S. Kicenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Hex operations


Ugggg... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
sorry... (4FFF | 4) is returning 4

-----Original Message-----
From: Frank S. Kicenko 
Sent: Thursday, June 20, 2002 7:34 PM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] Hex operations


I think the goofy variable is getting truncated.... 

(3FFF | 4) is returning 7
(4FFF | 4) is returning 8

-----Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 6:37 PM
To: Frank S. Kicenko; [EMAIL PROTECTED]
Subject: RE: [PHP] Hex operations


looks like it's trying to treat $cap1 as a decimal number, and not a hex
number
have a look at this:

for ($cap = 0; $cap < 64; $cap++)
{
  $cap1 = dechex($cap);
  $bit = ($cap1 | 0x01);
  echo "$cap - $cap1 - $bit\n";
}

and you'll see what I mean...

-----Original Message-----
From: Frank S. Kicenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Hex operations


Ugggg... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


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

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

--- End Message ---
--- Begin Message ---
Okay, let's say I want to send a user to a certain webpage...

usually I would use...

include("website.php");

but, if i want to send a user to a website along with a variable like...

$temp = "website.php?var=".$var;
include($temp);

...this doesn't work.  

any suggestions??

THANKS!!
--- End Message ---
--- Begin Message ---
use header
ob_start()
$temp = "website.php?var=".$var;
header ("Location: $temp");


Puru
----- Original Message ----- 
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 4:31 PM
Subject: [PHP] include() question...


> Okay, let's say I want to send a user to a certain webpage...
> 
> usually I would use...
> 
> include("website.php");
> 
> but, if i want to send a user to a website along with a variable like...
> 
> $temp = "website.php?var=".$var;
> include($temp);
> 
> ...this doesn't work.  
> 
> any suggestions??
> 
> THANKS!!
> 
--- End Message ---
--- Begin Message ---

> but, if i want to send a user to a website along 
> with a variable like...
> 
> $temp = "website.php?var=".$var;
> include($temp);
> 
> ...this doesn't work.  

Example:

<?php
  $var = 'foo';
  include 'somefile.php';
?>

somefile.php now has access to $var.  This is 
talked about in the manual too:

  http://www.php.net/include

In your case above, $var will already be available 
to website.php if you simply include it.

Regards,
Philip Olson

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

 > Okay, let's say I want to send a user to a certain webpage...
 > 
 > usually I would use...
 > 
 > include("website.php");
 > 
 > but, if i want to send a user to a website along with a 
 > variable like...
 > 
 > $temp = "website.php?var=".$var;
 > include($temp);
 > 
 > ...this doesn't work.  

If you are just including the file in what's already loading then all
you need to do is make sure that $var is already set when you include
the file.  Including is logically the same as opening up the other file
and then doing a copy/paste into the current page.  It's exactly the
same as if the contents of your included file was in the file that's
doing the including.

If you are actually trying to load a new page and pass a variable to it
then you probably want to look at using header("Location:
website.php?var=$var"); instead.  This will actually load a whole new
page in the browser rather than just including an extra file in a page
that's already being loaded.

CYA, Dave


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

Try enclosing the function code in brackets:

function Check_Session()
{
      code goes here
}


Mick


Quoting Mark Colvin <[EMAIL PROTECTED]>:

> I have the following .php script and .inc file which doesn't work:
> 
> =====  .php file =====
> 
> <?PHP
>       // Include function files
>       require_once "includefiles/session_functions.inc";
> 
>      // Create instances of the required class
>      $sess = new Sessions;
> 
>      // chech for valid session
>      $sess->Check_Session();
> 
>      phpinfo();
> ?>
> 
> <html>
> <head>
> <title>Untitled</title>
> </head>
> <body>
> <table summary="">
> <tr><td>admin</td></tr>
> </table>
> </body>
> </html>
> 
> 
> ===== .inc file =====
> 
> <?PHP
> class Sessions
> {
> 
>    function Check_Session()
> 
>      session_start();
>    if (!session_is_registered("SESSION"))
>    {
>       header("Location: http://???.???.??.?/index.php?logintext=Please
> login.");
>       exit();
>    }
> 
> }
> 
> The session was created in a previous login script. When I enter the
> .php
> script I get the following error:
> 
> Parse error: parse error, expecting `'{'' in
> /var/www/html/includefiles/session_functions.inc on line 7
> 
> Fatal error: Cannot instantiate non-existent class: sessions in
> /var/www/html/adminoutput.php on line 8
> However, if I copy the code from the function in the .inc file and place
> it
> at the top of my php script, and delete the class code in the php
> script
> everything works OK. Why is this happening? I also tried placing
> session_start() in the php script before calling the class method
> Check_Session but this had no effect.
> 
> Thanks in advance
> 
> 
> Mark
--- End Message ---
--- Begin Message ---
Hi, sorry if this is one of those oft-answered questions, but...

I am using the script below to upload a file to the server, however if I
upload a file, say, 'pamnude.jpg' then the tmp path, file name and file size
are returned but not the mimetype. Why could this be?

Also, I read about there being a bug where arbitrary files could be
specified as the file parameter and cause files on the server to be
processed. This can be checked with the is_uploaded_file($file) function.
The example on the php.net site was /etc/passwd
Using the script below, I used /etc/passwd as the file name (or even if I
entered no file name, or any garbage text) and I always get the 'True'
response.
What am I doing wrong?

Finally, is there any way of uploading that won't cause the file to be saved
to the server, but be handled directly by a script to a database?

Thanks

Lee

<?php
 if(!$ulfile_size)
 {
 $source=$HTTP_POST_FILES['ulfile']['tmp_name'];
 $name=$HTTP_POST_FILES['ulfile']['name'];
 $mimetype=$HTTP_POST_FILES['ulfile']['type'];
 $size=$HTTP_POST_FILES['ulfile']['size'];
 echo "$source<br>$name<br>$mimetype<br>$size";
 }

 if(is_uploaded_file($ulfile))
 {
    echo"True";
 }
 else
 {
    echo"False";
 }

echo"
<html>
<head>
</head>
<body>
<form enctype='multipart/form-data' method='post' action='$PHP_SELF'>
<br>
File to upload: <input type='file' name='ulfile' id='ulfile'>
<br>
<input type=submit name='Upload' value='Upload File'><br>
</form>
</body>
</html>
";
?>

--- End Message ---
--- Begin Message ---
When users have to enter dates on my forms, I always provide them with three
drop-down menus, for day (1-31), Month (1-12) and year (usually current
year, the next and the next, depending on the application).

Then I have three values on the next page ($_POST['day'], $_POST['month'],
$_POST['year']) which I can combine into a date format I like, or even into
a Unix timestamp.

With the addition of JavaScript, I COULD make sure that months with less
than 31 days could not have "non existent" days selected, but I prefer to do
all my validation server-side and spit the form back to them with their
current values.

I can't see the need for a pop-up, GUI callendar, or anything else.

Just let them select a start and end date via 6 drop-down menus, make sure
the date is correct, make sure the end date is after the start date, format
them however you want as strings, then insert them into your DB.

Easy.


Justin French



on 21/06/02 1:51 AM, Kevin Meredith ([EMAIL PROTECTED]) wrote:

> Hi there.
> 
> I have an app that requires users to insert an 'end' date.  The date is
> saved in MYSQL in the date format.  The problem is that the user input,
> which is not always reliable, has to be in the correct format.  I was
> wondering if there is a way to have a simple calendar option, either on the
> page on in a pop-up window, where a user can select a date which will then
> have the correct format to be inserted.  There is also other data being
> captured on this page so this preferably needs to be done without refreshing
> the page.
> 
> Any ideas would be greatly appreciated.
> 
> Thanks
> Kevin
> 

--- End Message ---
--- Begin Message ---
Ed,

Read the rest of the email.  The problem WASN'T to do with what CLIENT was
reading the page at the time, it was to do with what SERVER was running the
PHP code.

Saving his text files onto the Mac, and then trying to run them produced
"Error on line 1", whilst saving and running the code on Win X resulted in
"Error on line 43".

Hence, it was a problem with line ending on Mac files.  Once again, you
would get an "error on line 1" if PHP doesn't recognise the line-endings,
and sees just one really long line.

If you read the rest of the thread, you'll find that the OP has "got it
sorted" and it was infact a problem with Mac line breaks.  He changed the
default in Dreamweaver to Windows-line-breaks, and all is well.


Justin French
--------------------
Creative Director
http://Indent.com.au
--------------------



on 21/06/02 3:00 AM, Lazor, Ed ([EMAIL PROTECTED]) wrote:

> Why would this be the case?  PHP is server-side and client independent...
> 
>> -----Original Message-----
>> Your problem is undoubtably to do with the difference in line
>> endings on
>> mac/pc/unix.

--- End Message ---
--- Begin Message ---
1. the problems of licensing, copyright, people who don't pay, etc etc could
all be handled with a decent license agreement/contract and a lawyer to
follow up any possible bad apples.

2. usually people connect to MySQL as "localhost", but you can connect to
the server remotely IF the server allows it.  I'm not aware of many ISPs
that do.  of course, there's no reason why they couldn't write another
front-end which extracts the data out of their own database and cut you off.

3. you could store all the PHP code and MySQL database AND DATA on one
server (yours), and this way only one MySQL database has to allow external
connections... I believe this would slow their website down somewhat though.

4. rather than a fully dynamic website, you might want to consider a "build"
type tool which generates a site worth of static HTML pages, and FTPs them
to the server... so they don't actually get a dynamic site, they get a CMS,
and a build tool which merges templates and data into static HTML pages.


If all else fails with this stuff, option 1 is always the answer.  A clear
license/contract/terms of use will deter 99% of business' from breeching
copyright.


I can relate this problem to a client of mine, who pays a monthly fee for
the inventory system in their warehouse.  At one stage they got sick of the
payments and said "thanks, we'll take it from here".  The developer just
shrugged their shoulders and left... obviously

Within two months, my client had called them back and re-established the
monthly payments, because they required:

- some bug fixes
- some new functionality
- support / advice / etc


Your best option may be to charge a nominal LICENSE fee for the product AS
IS (perhaps base it on the total product's worth, divided by the # of units
you think you might sell in 6 months, so eventually you'll start turning a
profit).

So if they back out after one month, they've got license to USE the product
as is, but they give up the right for support, bug fixes, extensions, new
bits, etc etc.

Or, they may choose to pay the small monthly fees, get the updates, get the
support, get the bugs fixed, etc etc.

This process might be done in 12 month blocks too...



Justin French







on 21/06/02 4:29 AM, René Fournier ([EMAIL PROTECTED]) wrote:

> I have a question to which I'm pretty sure the answer will be "no", but
> I would like to hope I'm wrong...
> 
> I've developed a very simple Content Management tool--called
> "Europa"--that even retarded monkeys can use to change/update text in
> their web site. It's web-based, user-authenticated (sessions), and runs
> with PHP4 and MySQL.
> 
> Now, Europa is pretty much plug and play, so long as the web site is
> getting its text from a MySQL database. There's a web agency in town
> that is interested in Europa for their clients. Their clients want to be
> able to easily and quickly update certain elements of their site without
> begging some outside webmaster. They would really benefit from Europa.
> 
> Problem: I don't want to "sell" Europa, or even install it on someone's
> web server for a one-time fee. I've spent a long time on this little
> tool, and want to continue to improve it. So, I would rather license it
> to companies. They pay a quarterly subscription fee, and get to use
> Europa as it continues to grow and improve.  I'm just a little worried
> about one thing: If I install Europa on their server, and they pay their
> paltry quarterly subscription fee, and then decide they don't need any
> updates, I'm screwed. The value of Europa is much greater than what I
> want to sell subscriptions to it for (not much--I'm not really greedy),
> but I need some kind of control.
> 
> The idea: In order for Joe User to update text on his web site, he comes
> to my "Europa" web site, enters his company name, user ID, password, and
> clicks Login, and--voilà--he sees a handsome list of tables containing
> the text content of his site--which is pulled from a MySQL database
> residing on HIS web site's web host.
> 
> And this is the trick: Can PHP somehow fetch MySQL data over the
> Internet? Is this possible? If so, is it necessary for me to resort to
> new, unknown technologies like XML or SOAP, or can I do it with PHP
> alone?
> 
> Thanks for your comments.
> 
> ...Rene
> 
> ---
> René Fournier,
> [EMAIL PROTECTED]
> 
> Toll-free +1.888.886.2754
> Tel +1.403.291.3601
> Fax +1.403.250.5228
> www.smartslitters.com
> 
> SmartSlitters International
> #33, 1339 - 40th Ave NE
> Calgary AB  T2E 8N6
> Canada
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
> i want read how caracter from onepage like this
> 
> asasassasa
> sasassasa
> sasasassas
> sasassasasa
> sasasassasa

Yes, I want to one give you answer like this, okay? Thanks, no.



--- End Message ---
--- Begin Message ---
All:

None of the many online user posts in setting up Java connectivity from 
within PHP have worked. RPM or tarball.

Do you know of anyone who has an RPM of PHP, with the standard MySQL, 
GD, Postgres, WDDX, etc...but also libphp_java.so correctly set-up?

The Windows PHP has Java support right off the bat with an edit the the 
.ini file. On Win 98, no problems at all. But on my Linux paritions...

There are at least dozens of people trying to get this to work. All of 
them could be helped with an RPM or a definitive answer. Why can't 
someone release linux binaries with this sort of thing compiled in?

My system: Sun Java2 JDK 1.4.0, Red Hat 7.1, Apache 1.3x. I have tried 
all versions of PHP tarballs since 4.04p1 And I'm not alone in this 
frustration.

Yes, sometimes there is a libphp_java. There is always the .jar file. 
But after editing the .ini, doing all manner of things with 
LD_LIBRARY_PATH/ldconfig, nothing!

The best I ever got was a page that registered the .so module, but never 
finished output. (I use a test page with phpinfo(), then and a sample 
call to get a Java timestamp. In this circumstance, the page cuts off 
before the sample Java timestamp and instance.

Any help or leads would be appreciated.

Regards,

WJ Burns


--- End Message ---
--- Begin Message ---
Dear all
i made a Registration Form for user to input their Data, but i also had some
Field Check before the data can be insert to the Mysql_Database!
I had a question here, sometime the mysql shows the error :
"Duplicate Key for xxx"
I know what is this about, reguarding to my Registration Form, it mean the
Login Name is Duplicated! But i want to show my own message to the user for
this error instead the Mysql Error! It is meanness to show User the Mysql
Error, cause they won't understand it!!!

Could Someone pls tell me how i can do this?


--
Thx a lot!
Jack
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
what about doing a "select count(*) from table where username = 'foobar'"
then, if ($cnt > 0) { /* display error */ } else { /* insert new username */
}

-----Original Message-----
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 2:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [PHP] How to Show my Own Error Message Instead of Mysql Error?


Dear all
i made a Registration Form for user to input their Data, but i also had some
Field Check before the data can be insert to the Mysql_Database!
I had a question here, sometime the mysql shows the error :
"Duplicate Key for xxx"
I know what is this about, reguarding to my Registration Form, it mean the
Login Name is Duplicated! But i want to show my own message to the user for
this error instead the Mysql Error! It is meanness to show User the Mysql
Error, cause they won't understand it!!!

Could Someone pls tell me how i can do this?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
<jack>
But i want to show my own message to the user for
this error .
</jack

hello Jack,

do a check of the insert was successfull and redirect with php to your
original page and include a error var
e.g

if (!mysql...)
    HEADER(LOcation:....file.php?error=mysqlfailed

Then on your sign up page do an error check

if (!empty($errror))
    switch ($error){
        case 'mysqlfailed':
            echo 'please choose a different user name...';
            break;
    }

Good luck,

andy

--
----------------------------------------------------
http://www.globosapiens.net
Global Travellers Network!



"Jack" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear all
> i made a Registration Form for user to input their Data, but i also had
some
> Field Check before the data can be insert to the Mysql_Database!
> I had a question here, sometime the mysql shows the error :
> "Duplicate Key for xxx"
> I know what is this about, reguarding to my Registration Form, it mean the
> Login Name is Duplicated! But i want to show my own message to the user
for
> this error instead the Mysql Error! It is meanness to show User the Mysql
> Error, cause they won't understand it!!!
>
> Could Someone pls tell me how i can do this?
>
>
> --
> Thx a lot!
> Jack
> [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
I have capture serial port (pabx phone) ,and get the file dat like in
attachement.
So iwant make some page for read that conten in the file I just take
some part like this

1.date 
2.extension
3.long
4.number 
Exsample :

17/06/02  07:27:30    08  00:00:59   437  2034224

16/06/02  08:11:25    06  00:03:55   437  2532034

15/06/02  08:25:19    08  00:00:12   234  0818797107

15/06/02  08:26:39    06  00:01:20   234  0818797107

15/06/02  08:33:52    07  00:09:25   437  2500682

15/06/02  08:49:12    07  00:02:47   303  7806168

15/06/02  08:51:12    08  00:01:52   303  7806584

15/06/02  08:53:02    06  00:01:46   303  7211716

15/06/02  09:00:40    07  00:01:06   326  2501682

I want make screen lay out like this

Date      extension  No Phone    Long          Type call     Cost
17/06/02   437       2034224     00:00:59      Local          500

16/06/02   437       2532034     00:03:55      local         1000

15/06/02  234        0818797107  00:00:12      Handphones    3500 

15/06/02  234      0818797107  00:01:20      Handphone     5000

15/06/02  437      0212500682  00:09:25      Interlocal    10000  

15/06/02  303       7806168        00:02:47      Local          600

15/06/02  303         7806584    00:01:52      Local          500    

15/06/02  303         7211716    00:01:46      Local          500 

15/06/02  326         2501682    00:01:06      Local          500 




--- End Message ---
--- Begin Message ---
After posting this on the MySQL list and getting some feedback we were
able to determine that this was not a flaw with MySQL.  Any ideas from
the PHP community?

=======

Can anyone tell me why this does not work?  I am using php and mysql.

When I do an insert from select into a mysql table I get an error
whenever a value from the select portion of the query contains an
apostrophe.  Before I insert the initial value I use the php
addslashes() function to escape the ' and " characters.

For example:

If clients table contans a field called fname and it has a value of
"O'Henry".  Remembering that I have used addslashes() before inserting
the value into mysql in the first place.

The following query will fail on insert:

Sql = "insert into orders (fname) SELECT fname from clients where
clientid = '$clientid'";


David McInnis
                

--- End Message ---
--- Begin Message ---
why don't you do a quick fix and just add addslashes again if obviously
there is no escap slash present right now?

Good luck,

Andy

--
----------------------------------------------------
http://www.globosapiens.net
Global Travellers Network!



"David McInnis" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
005001c218e8$699e0c40$221d7041@bigdaddy">news:005001c218e8$699e0c40$221d7041@bigdaddy...
> After posting this on the MySQL list and getting some feedback we were
> able to determine that this was not a flaw with MySQL.  Any ideas from
> the PHP community?
>
> =======
>
> Can anyone tell me why this does not work?  I am using php and mysql.
>
> When I do an insert from select into a mysql table I get an error
> whenever a value from the select portion of the query contains an
> apostrophe.  Before I insert the initial value I use the php
> addslashes() function to escape the ' and " characters.
>
> For example:
>
> If clients table contans a field called fname and it has a value of
> "O'Henry".  Remembering that I have used addslashes() before inserting
> the value into mysql in the first place.
>
> The following query will fail on insert:
>
> Sql = "insert into orders (fname) SELECT fname from clients where
> clientid = '$clientid'";
>
>
> David McInnis
>
>


--- End Message ---
--- Begin Message ---
I bet you are double-escaping it.  Try without the AddSlashes() call.  By
default PHP will escape this for you automatically.

-Rasmus

On Thu, 20 Jun 2002, David McInnis wrote:

> After posting this on the MySQL list and getting some feedback we were
> able to determine that this was not a flaw with MySQL.  Any ideas from
> the PHP community?
>
> =======
>
> Can anyone tell me why this does not work?  I am using php and mysql.
>
> When I do an insert from select into a mysql table I get an error
> whenever a value from the select portion of the query contains an
> apostrophe.  Before I insert the initial value I use the php
> addslashes() function to escape the ' and " characters.
>
> For example:
>
> If clients table contans a field called fname and it has a value of
> "O'Henry".  Remembering that I have used addslashes() before inserting
> the value into mysql in the first place.
>
> The following query will fail on insert:
>
> Sql = "insert into orders (fname) SELECT fname from clients where
> clientid = '$clientid'";
>
>
> David McInnis
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
MySQL doesn't care about quotes when doing INSERT INTO ... SELECT. It's
got to be something you're doing in PHP. Are you using that exact query?

mysql> create table list (clientid int, fname varchar(20));
Query OK, 0 rows affected (0.07 sec)

mysql> create table list2 (fname varchar(20));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into list values (1,'John'),(2,'O\'Hare'),(3,'Smith');
Query OK, 3 rows affected (0.02 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select * from list;
+----------+--------+
| clientid | fname  |
+----------+--------+
|        1 | John   |
|        2 | O'Hare |
|        3 | Smith  |
+----------+--------+
3 rows in set (0.03 sec)

mysql> insert into list2 (fname) select fname from list where clientid =
2;
Query OK, 1 row affected (0.00 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> select * from list2;
+--------+
| fname  |
+--------+
| O'Hare |
+--------+
1 row in set (0.00 sec)


Even if you're using double addslashes(), it'll work...


mysql> insert into list values (4,'O\\\'Henry');
Query OK, 1 row affected (0.00 sec)

mysql> insert into list2 (fname) select fname from list where clientid =
4;
Query OK, 1 row affected (0.00 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> select * from list2;
+----------+
| fname    |
+----------+
| O'Hare   |
| O\'Henry |
+----------+
2 rows in set (0.00 sec)

---John Holmes...

> -----Original Message-----
> From: David McInnis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 1:57 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Mysql Insert from select problem with php
> 
> After posting this on the MySQL list and getting some feedback we were
> able to determine that this was not a flaw with MySQL.  Any ideas from
> the PHP community?
> 
> =======
> 
> Can anyone tell me why this does not work?  I am using php and mysql.
> 
> When I do an insert from select into a mysql table I get an error
> whenever a value from the select portion of the query contains an
> apostrophe.  Before I insert the initial value I use the php
> addslashes() function to escape the ' and " characters.
> 
> For example:
> 
> If clients table contans a field called fname and it has a value of
> "O'Henry".  Remembering that I have used addslashes() before inserting
> the value into mysql in the first place.
> 
> The following query will fail on insert:
> 
> Sql = "insert into orders (fname) SELECT fname from clients where
> clientid = '$clientid'";
> 
> 
> David McInnis
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Hi,

How can I connect PHP application on Linux to the Sybase database which is lying on 
the different machine.

Please help me.

Regards,
Vivek

--- End Message ---
--- Begin Message ---
I've been using the following function successfully for months, tonight I
literally copied/pasted it to another page I was creating, called it exactly
the same using the same data type, and I'm getting an incorrect result. The
function is supposed to take a standard MySQL "CCYY-MM-DD" date format and
convert it to a "Month Day, CCYY" format. Here's the function code:

function cleandate($indate) {
        str_replace("-", "/", $indate);
        return date("F j, Y", strtotime($indate));
        }

And I'm calling it with:

$newdate = cleandate($birthdate);

$birthdate is a MySQL DATE field and if I echo "$birthdate" I get
"2002-11-04", which is what is entered for that $birthdate record. However,
when I echo $newdate using the above code, I get "June 20, 2002" - today's
date.

Now, again I'm using this code as-is successfully on another page. I don't
understand why it's returning today's date on this page, but returning the
correct date on another page.

This is the error that PHP is throwing regarding the above code:
[Thu Jun 20 23:16:38 2002] [error] PHP Warning:  strtotime() called with
empty time parameter in test.php on line 19

Line 19 is the 'return' line in the function. I do not get this error in my
successful application of this code.

Any ideas? Thanks in advance...

Jason Soza

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

 > function cleandate($indate) {
 >      str_replace("-", "/", $indate);
 >      return date("F j, Y", strtotime($indate));
 >      }

I suspect that you actually need something like this:

function cleandate($indate) {
  $indate = str_replace("-", "/", $indate);
  return date("F j, Y", strtotime($indate));
}

Although, to be honest, you can probably get away with:

function cleandate($indate) {
  return date("F j, Y", strtotime($indate));
}

And, ultimately, you may even find that you're better off just doing the
date manipulation in mysql instead and leave it at that.

CYA, Dave


--- End Message ---
--- Begin Message ---
Why don't you just use DATE_FORMAT() in your query, then you don't have
to do any extra PHP code at all??

---John Holmes...

> -----Original Message-----
> From: Jason Soza [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 3:50 AM
> To: PHP-General Mailing List
> Subject: [PHP] Stumped on a function
> 
> I've been using the following function successfully for months,
tonight I
> literally copied/pasted it to another page I was creating, called it
> exactly
> the same using the same data type, and I'm getting an incorrect
result.
> The
> function is supposed to take a standard MySQL "CCYY-MM-DD" date format
and
> convert it to a "Month Day, CCYY" format. Here's the function code:
> 
> function cleandate($indate) {
>       str_replace("-", "/", $indate);
>       return date("F j, Y", strtotime($indate));
>       }
> 
> And I'm calling it with:
> 
> $newdate = cleandate($birthdate);
> 
> $birthdate is a MySQL DATE field and if I echo "$birthdate" I get
> "2002-11-04", which is what is entered for that $birthdate record.
> However,
> when I echo $newdate using the above code, I get "June 20, 2002" -
today's
> date.
> 
> Now, again I'm using this code as-is successfully on another page. I
don't
> understand why it's returning today's date on this page, but returning
the
> correct date on another page.
> 
> This is the error that PHP is throwing regarding the above code:
> [Thu Jun 20 23:16:38 2002] [error] PHP Warning:  strtotime() called
with
> empty time parameter in test.php on line 19
> 
> Line 19 is the 'return' line in the function. I do not get this error
in
> my
> successful application of this code.
> 
> Any ideas? Thanks in advance...
> 
> Jason Soza
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I currently develop using a FreeBSD unix box on my network, but when I get
OSX, I'm thinking of having everything on the one machine...

Do I need OSX SERVER to run everything I'd need for a development
environment, or will the base version of OSX have the capabilities I need
(running a test server of Apache/PHP4/MySQL/Perl/etc?

Sorry it's slightly OT,

Justin French

--- End Message ---
--- Begin Message ---
I have php 4.2.1 + apache 1.3.24 on sun solaris 8.
In my php files, system() and exec() commands ara not running.
Any help? ( my php.ini file, safe_mode=off  and safe_mode_exec_dir=no
value )

--- End Message ---
--- Begin Message ---
Hi all.
 
I have this form in which one Administrator can insert new members and
after that, in another page, a form where he/she can insert the new
member’s sons & daughters. I want to display a table with “text inserts”
into the admin can type let’s say a maximum of 5 kids in the second
page. The “members” table will have one memberID field (which will be
shared between parents and kids) and a levelID which will grant 0 for
the parent and 1, 2, 3, 4, 5 for the kids.
 
Now, how do I tell PHP to make an array from the kids input, but only
from the fields in which let’s say the “name” field was filled out in
order to spend the necessary table’s rows. Another thing… the Array
should also specify new levelID’s for each kid from 1 to 5. It would be
great if you also show me how to deal with it after it’s created.
 
Thanks a lot and sorry for so many questions,
 
Cesar Aracena <mailto:[EMAIL PROTECTED]> 
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 
--- End Message ---
--- Begin Message ---
(i am new to these groups, but shouldn't there be a follow-up-to on a 
X-post?)

César aracena wrote:
> I have this form in which one Administrator can insert new members and
> after that, in another page, a form where he/she can insert the new
> member’s sons & daughters. I want to display a table with “text inserts”
> into the admin can type let’s say a maximum of 5 kids in the second
> page. 

The number doesn't matter if you design you db well (I suppose we are 
talking database).

I suppose that you have a table with members with unique ID's?

Make a new table with relatives, where you connect to their parents 
through a ParentID-field

This way you'll avoid empty fields for the folks with eg. only 2 sons :-)

The query for father + sons and daughters would then be like

mysql_query("
select members.Name, members.ID, relatives.Name as RelativeName, 
relatives.ID
from parents, relatives
where parents.ID = relatives.ParentID
")

The “members” table will have one memberID field (which will be
> shared between parents and kids) and a levelID which will grant 0 for
> the parent and 1, 2, 3, 4, 5 for the kids.

You _can_ put them all in the same table, but I suppose that you have a 
lot of data stored on the parents/members, that is non-existing and 
irellevant for the children - this will give a lot of empty fields, 
which is why i propose the solution above...

> Now, how do I tell PHP to make an array from the kids input, but only
> from the fields in which let’s say the “name” field was filled out in
> order to spend the necessary table’s rows. Another thing… the Array
> should also specify new levelID’s for each kid from 1 to 5. It would be
> great if you also show me how to deal with it after it’s created.

It's easy to select only rows with contents for at certain field:

select * from relatives
where Name <> 0

I hope this was of some help?

regards

Jesper Brunholm

-- 
Phønix - Danish folkmusic from young musicians - http://www.phonixfolk.dk

--- End Message ---

Reply via email to