Re: [PHP] strange problem

2002-01-18 Thread Malte Fucks

hmmm
try

$coding = "%coding";
$a[$coding]='whatever this array shall contain';

please let me know if it worked...
diggn

- Original Message -
From: "Marc Logghe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 3:44 PM
Subject: [PHP] strange problem


> Hi,
> my PHP (PHP Version 4.1.1) suddenly does not take this anymore:
>  $a['color'] = 'red';
> I get this error: Parse error: parse error, expecting `T_STRING' or
> `T_VARIABLE' or `T_NUM_STRING'
> when I remove the quotes around the key, it works.
> Problem is , that a certain key is "%coding" (I know, I know, I should not
> use non-alphanumerics, but it used to work) and this key I cannot use
> anymore: php does not take %coding, nor '%coding', nor "%coding".
> Can someone help me out ?
> Marc
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>




Re: [PHP] strange problem

2002-01-18 Thread Malte Fucks

hmmm
try

$coding = "%coding";
$a[$coding]='whatever this array shall contain';

please let me know if it worked...
diggn

this is a test because my email client gave me an error message so if this message 
arrives twice, it wasnt meant to be spam...



[PHP] function arguments

2002-01-18 Thread Malte Fucks

Hi, how  do i tell a function which arguments can be passed and which must be passed...

example:
function func($arga, $argb, $argc)
{
do_something_with_arga;
do_another_thing_with_argb;
and_if_argc_was_passed_do_something_with_it_too;
}

because i dont want to pass argc if i dont need it, and to pass void arguments like '' 
is annoying...



Re: [PHP] Upload & View Image

2002-01-20 Thread Malte Fucks

I think the PHP image functions aren't what this guy needs...

First thing : File Uploads
You have to make a form, including an 
tag, which refers to a php script like...



$yourfile_size includes the size of the file in bytes, use an if-statement
to check if the picture-size fits your needs...
$yourfile_type includes... guess what... the file type..
this should solve the upload problem...

To control the size of an image is a matter of your HTML... do something
like
. Its even possible to
insert height and width-values in percent...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Upload & View Image

2002-01-20 Thread Malte Fucks

oops... should be if($yourfile) instead of if($file)... sorry 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Upload & View Image : Database Thingy!!!!

2002-01-20 Thread Malte Fucks

ooh... i dont know if i understood you correctly..but if i did, you simply
have to insert the location of the file in the users tupel like..

UserIDNameBlaBlapicture
001 John   ...  ...  ./images/john.jpg

preferably i would only store the location when the user did upload an image
with an update query, so when fetching the information from your database,
you can check for empty location values... if you're working with mysql it
would be like...

while($my_array = mysql_fetch_array($result))
{
echo "Stuff about the User";
if($my_array[location])
{
echo "";
} else echo "
}

but as i said, i dont know if i really understood your question.. (im
german, you know *g*)


- Original Message -
From: "Thomas Edison Jr." <[EMAIL PROTECTED]>
To: "Malte Fucks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, January 20, 2002 6:26 PM
Subject: Re: [PHP] Upload & View Image : Database Thingy


> Malte,
>
> Thanks a lot. I was going through the File Upload
> Functions in the manual and i think that's what they
> were talking about too.
>
> Now there's just one thing. I can run the upload
> scripts and get the image for display too. But like i
> mentioned, this is for a PenPal system, a database
> based PenPal sysem.
> Basically there has to be some connection between the
> record entry by the user and the image. Which also be
> required when this record is displayed, for the
> corresponding image to be displayed. How migh that
> work?
>
> Thanks again,
> T. Edison jr.
>
> --- Malte Fucks <[EMAIL PROTECTED]> wrote:
> > I think the PHP image functions aren't what this guy
> > needs...
> >
> > First thing : File Uploads
> > You have to make a form, including an  > type="file" name="yourfile">
> > tag, which refers to a php script like...
> >
> >  > if($file)
> > {
> >if(@copy($yourfile,"./$yourfile_name"))
> >{
> >echo "$yourfile_name was uploaded
> > succesfully";
> >}
> > else echo "ERROR - UPLOAD ABORTED";
> > }
> > ?>
> >
> > $yourfile_size includes the size of the file in
> > bytes, use an if-statement
> > to check if the picture-size fits your needs...
> > $yourfile_type includes... guess what... the file
> > type..
> > this should solve the upload problem...
> >
> > To control the size of an image is a matter of your
> > HTML... do something
> > like
> > .
> > Its even possible to
> > insert height and width-values in percent...
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> =
> Rahul S. Johari (Director)
> **
> Abraxas Technologies Inc.
> Homepage : http://www.abraxastech.com
> Email : [EMAIL PROTECTED]
> Tel : 91-4546512/4522124
> ***
>
> __
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]