php-general Digest 14 May 2001 08:59:38 -0000 Issue 685

Topics (messages 52635 through 52664):

passing variables without form submit
        52635 by: brent simpson

Multiple Selections?
        52636 by: Jason Caldwell
        52640 by: Sean Cazzell

indexing records
        52637 by: midget2000x

One database, different forms
        52638 by: midget2000x

Re: File upload !!!!
        52639 by: Chris Cameron
        52657 by: Matthias Roggendorf
        52662 by: James Holloway
        52664 by: Deependra B. Tandukar

Receiving a text stream
        52641 by: Todd Cary

validate form with javascript
        52642 by: Chris Mason
        52645 by: Steve

changing error messages
        52643 by: todd kennedy

Re: mysql - SUBSTRING
        52644 by: Nuno Silva

Re: Search engines and mod_rewrite
        52646 by: Steve

fgetcsv
        52647 by: Steve Wade
        52648 by: Jason Murray
        52649 by: Steve Wade
        52650 by: Jason Murray

Re: HallMark uses PHP!!!!
        52651 by: Joseph Blythe
        52652 by: Steve Wade
        52653 by: Jason Murray
        52656 by: Maxim Maletsky

writing updateable code
        52654 by: Scott Mebberson
        52655 by: elias

Re: File upload !!!
        52658 by: Rares

How can PHP 3.0.12 recognize semicolons as var delimiters in URL?
        52659 by: Christian Capito

Cookies
        52660 by: Sascha Andres
        52663 by: Simon Robson

my query results won't clear!! :(
        52661 by: Sandeep Hundal

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]


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



I'm trying to write what I thought would be a pretty simple script 
action to pass a variable from a form element without a sumbit button to 
subsequent pages; instead of a form button i would like any number of
links to other pages to be able to pass this checkbox value: ie whether
it is checked or not.

Doesn't seem as easy as I thought. I tried using some crazy JavaScript / 
PHP thing whereby an onChange in the form element submitted the form to 
itself, hoping perhaps nievely that the php in the links to pages i want 
to recieve this variable would pick it up:

ie: <A href="this.html?source=<?php echo $value;?>">this page</a>

where value would be whether the checkbox was checked or not, but no go.

Then I tried using Javascript to do the same onChange thing but set a 
cookie, that could be read by subsequent pages through php, but no luck 
there. Can someone tell me where i'm going wrong in my thinking about this?

brent.





I have a Multiple Selection HTML Field --- the user can select any number of
items by holding down the CTRL key.  When I submit my form to my (say)
TestProg.php -- in the Hidden Input Field I only see the value for the
*last* item I selected... how can I see all the items I selected?

Thanks.
Jason






> I have a Multiple Selection HTML Field --- the user can select any number of
> items by holding down the CTRL key.  When I submit my form to my (say)
> TestProg.php -- in the Hidden Input Field I only see the value for the
> *last* item I selected... how can I see all the items I selected?

If you want to allow the user to select multiple items, you should append
'[]' to the end of the name of your select.

<select name="color[]" size="3" multiple>

Now when you get the value, it will be an array of the items they
selected.

You may run into a problem with your hidden input type on the second page
- I'm not sure how PHP will handle things because your value will now be
an array.  You may want to write out a hidden field for each of the users
selections - like:

<input type="hidden" name="color[]" value="one">
<input type="hidden" name="color[]" value="two">
<input type="hidden" name="color[]" value="three">


Regards,

Sean

On Sun, 13 May 2001, Jason Caldwell wrote:

> 
> Thanks.
> Jason
> 
> 
> 
> -- 
> 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]
> 





What I want to do is figure out a way to index MySQL query results on my PHP
site that's not dependent on the id of each record.

I've got a MySQL photo database that runs my photo site.  Right now, the 'id'
field is a sequential, auto-incremented number, and I am using that id as an
index for the photos (because it was easy for me to grasp).

It works now because the groups are organized in order (for example all the
Iran pictures are sequential).  But 

 -----------
providing the finest in midget technology




I am writing a PHP application that will operate on a MySQL database.  There
will be 4 types of forms (like catalog request, info request, etc.) calling
the code which writes the data to the database.

Since the variable names on the forms will equal the MySQL column names (as they
should), I am wondering if there is a way for me to create my SQL statements on
the fly so that only data passed is written.  Otherwise I'll have to create 8
types of SQL statements...INSERT (if the record, keyed by e-mail address,
doesn't exist), and UPDATE (if the record does exist) for all 4 forms.

For example, on my "add to mailing list" form, only the e-mail address is
collected.  I'd like the PHP to recognize that only the 'email' field is passed
and create the SQL statement that only writes the e-mail to the database.

Any ideas greatly appreciated!

Thanks,

Rory

 --  -----------
providing the finest in midget technology




Unless you're using PHP3, I'd try using $HTTP_POST_FILES variable as
suggested in http://www.php.net/manual/en/features.file-upload.php.

Chris
--
"... perhaps yer just such a man you put an embarasing fire in her loins"
        - Noah A.

On Sun, 13 May 2001, Matthias Roggendorf wrote:

> Hi,
> sorry for asking such easy things but I really have a hard time to get this
> to work:
>
> I use exactly the scripts which are given on the PHP website to upload
> files. The problem is that the variable $userfile just contains "none" and
> $userfile_size is "0". The rest of the variables have the right values.
> When I use a larger file it takes more time so I assume that the file is
> uploaded, but I cannot save it because I don't know the temporary filename.
>
> Can anybody help me? I really need this to work.
>
> Thanks, Matthias
>





Hi,
thanks for the responses! Here is the code snippet:

The form:

<FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">

The PHP part:

if (is_uploaded_file($userfile)) {
    copy($userfile, "./");
} else {
    echo "Possible file upload attack: filename '$userfile'.";
}

It always runs into the file attack line.
When I read out the $HTTP_POST_FILES I get
userfile=array
userfile_size=0
userfile_type=img/gif
 It would be great if you can write back again.
Thanks, Matthias










""Kevin Williams"" <[EMAIL PROTECTED]> wrote in message
003001c0dbdc$e8e6c5e0$[EMAIL PROTECTED]">news:003001c0dbdc$e8e6c5e0$[EMAIL PROTECTED]...
Hi,
A snippet of code could help, but I recently experienced two problems with
uploading and gaining the information.

Are you using the correct ENCTYPE for the upload, along with using POST (GET
doesn't work).
Also, if you are trying to us the information from inside a function, I had
to either globally define all of the attributes, or you could pass them to
the function.

Hope this helps

Kevin Williams

"Matthias Roggendorf" <[EMAIL PROTECTED]> wrote in message
9dmisb$bhq$[EMAIL PROTECTED]">news:9dmisb$bhq$[EMAIL PROTECTED]...
> Hi,
> sorry for asking such easy things but I really have a hard time to get
this
> to work:
>
> I use exactly the scripts which are given on the PHP website to upload
> files. The problem is that the variable $userfile just contains "none" and
> $userfile_size is "0". The rest of the variables have the right values.
> When I use a larger file it takes more time so I assume that the file is
> uploaded, but I cannot save it because I don't know the temporary
filename.
>
> Can anybody help me? I really need this to work.
>
> Thanks, Matthias
>
>
>
> --
> 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]
>
>







Hi Matthias,

well, for starters, from that code snippet your max upload size is less than
a kilobyte.  So "large files" will not even stand a chance of getting
copied. Remeber that 1024 bytes is 1Kb, so if you wanted to limit to 100Kb,
the max_upload would be 102400.  You ideally need to specify a directory and
name for the destination file, too.

@copy($userfile, "/path/to/" . $userfile_name);

would do it, if you wanted to keep the original filename, though it's better
to change the filenames, so none are ever overwritten.

James.

""Matthias Roggendorf"" <[EMAIL PROTECTED]> wrote in message
9dnv7f$t1f$[EMAIL PROTECTED]">news:9dnv7f$t1f$[EMAIL PROTECTED]...
> Hi,
> thanks for the responses! Here is the code snippet:
>
> The form:
>
> <FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST">
> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
> Send this file: <INPUT NAME="userfile" TYPE="file">
> <INPUT TYPE="submit" VALUE="Send File">
>
> The PHP part:
>
> if (is_uploaded_file($userfile)) {
>     copy($userfile, "./");
> } else {
>     echo "Possible file upload attack: filename '$userfile'.";
> }
>
> It always runs into the file attack line.
> When I read out the $HTTP_POST_FILES I get
> userfile=array
> userfile_size=0
> userfile_type=img/gif
>  It would be great if you can write back again.
> Thanks, Matthias
>
>
>
>
>
>
>
>
>
>
> ""Kevin Williams"" <[EMAIL PROTECTED]> wrote in message
> 003001c0dbdc$e8e6c5e0$[EMAIL PROTECTED]">news:003001c0dbdc$e8e6c5e0$[EMAIL PROTECTED]...
> Hi,
> A snippet of code could help, but I recently experienced two problems with
> uploading and gaining the information.
>
> Are you using the correct ENCTYPE for the upload, along with using POST
(GET
> doesn't work).
> Also, if you are trying to us the information from inside a function, I
had
> to either globally define all of the attributes, or you could pass them to
> the function.
>
> Hope this helps
>
> Kevin Williams
>
> "Matthias Roggendorf" <[EMAIL PROTECTED]> wrote in message
> 9dmisb$bhq$[EMAIL PROTECTED]">news:9dmisb$bhq$[EMAIL PROTECTED]...
> > Hi,
> > sorry for asking such easy things but I really have a hard time to get
> this
> > to work:
> >
> > I use exactly the scripts which are given on the PHP website to upload
> > files. The problem is that the variable $userfile just contains "none"
and
> > $userfile_size is "0". The rest of the variables have the right values.
> > When I use a larger file it takes more time so I assume that the file is
> > uploaded, but I cannot save it because I don't know the temporary
> filename.
> >
> > Can anybody help me? I really need this to work.
> >
> > Thanks, Matthias
> >
> >
> >
> > --
> > 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]
>






Increase your file size limit from 1000 or only the file size smaller or
equal to 1000bytes will be uploaded.

DT

----- Original Message -----
From: "Matthias Roggendorf" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 12:36 PM
Subject: Re: [PHP] File upload !!!!


> Hi,
> thanks for the responses! Here is the code snippet:
>
> The form:
>
> <FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST">
> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
> Send this file: <INPUT NAME="userfile" TYPE="file">
> <INPUT TYPE="submit" VALUE="Send File">
>
> The PHP part:
>
> if (is_uploaded_file($userfile)) {
>     copy($userfile, "./");
> } else {
>     echo "Possible file upload attack: filename '$userfile'.";
> }
>
> It always runs into the file attack line.
> When I read out the $HTTP_POST_FILES I get
> userfile=array
> userfile_size=0
> userfile_type=img/gif
>  It would be great if you can write back again.
> Thanks, Matthias
>
>
>
>
>
>
>
>
>
>
> ""Kevin Williams"" <[EMAIL PROTECTED]> wrote in message
> 003001c0dbdc$e8e6c5e0$[EMAIL PROTECTED]">news:003001c0dbdc$e8e6c5e0$[EMAIL PROTECTED]...
> Hi,
> A snippet of code could help, but I recently experienced two problems with
> uploading and gaining the information.
>
> Are you using the correct ENCTYPE for the upload, along with using POST
(GET
> doesn't work).
> Also, if you are trying to us the information from inside a function, I
had
> to either globally define all of the attributes, or you could pass them to
> the function.
>
> Hope this helps
>
> Kevin Williams
>
> "Matthias Roggendorf" <[EMAIL PROTECTED]> wrote in message
> 9dmisb$bhq$[EMAIL PROTECTED]">news:9dmisb$bhq$[EMAIL PROTECTED]...
> > Hi,
> > sorry for asking such easy things but I really have a hard time to get
> this
> > to work:
> >
> > I use exactly the scripts which are given on the PHP website to upload
> > files. The problem is that the variable $userfile just contains "none"
and
> > $userfile_size is "0". The rest of the variables have the right values.
> > When I use a larger file it takes more time so I assume that the file is
> > uploaded, but I cannot save it because I don't know the temporary
> filename.
> >
> > Can anybody help me? I really need this to work.
> >
> > Thanks, Matthias
> >
> >
> >
> > --
> > 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]
>
>





I am not sure about this topic, so my question may refect this lack of
knowledge.  I have an application where I send a credit card request to
a credit card processor.  They return the information in a POST stream
and I open a socket and read the information into a variable.  This
works very well.

Now I want to switch positions.  I would like to send a stream of text
data to a surfer (e.g. their IP) and I would like to have them get the
data when they are in a program like Delphi or Visual Basic so that they
can use it within their program.  How does on "get" the data when they
are in a browser like EI or Netscape?  Does it have to be written to a
file first?

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






I have a form in which I validate the email address using a php function
then alert the operson if the email address is not correct. However, I would
like to pop up an alert with javascript if the email field is left blank. I
am using the function below but it down't work with php, probably works
great with a cgi.

Does anyone have a better way to do this?

Chris Mason
Code:
in the head

                function validForm(replyForm)
                {
                        if(replyForm.email.value==\"\"){
                        alert(\"You must enter an email address\")
                        replyform.email.value.focus()
                        return false
                        }
                return true
                }


in the form:
<FORM  onSubmit=\"return validForm(this)\" METHOD=\"POST\"
ACTION=\"reserve.php3?action=send\" ENCTYPE=\"x-www-form-urlencoded\">
<table>
<TR CLASS=\"$c\">       <TD CLASS=\"$c\">E-Mail </TD>   <TD COLSPAN=\"$i\"><INPUT
TYPE=\"text\" NAME=\"email\" VALUE=\"$email\" SIZE=\"50\"></TD></TR>

</table>
</form>
")








What is the particular error you're getting?

""Chris Mason"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a form in which I validate the email address using a php function
> then alert the operson if the email address is not correct. However, I
would
> like to pop up an alert with javascript if the email field is left blank.
I
> am using the function below but it down't work with php, probably works
> great with a cgi.
>
> Does anyone have a better way to do this?
>
> Chris Mason
> Code:
> in the head
>
> function validForm(replyForm)
> {
> if(replyForm.email.value==\"\"){
> alert(\"You must enter an email address\")
> replyform.email.value.focus()
> return false
> }
> return true
> }
>
>
> in the form:
> <FORM  onSubmit=\"return validForm(this)\" METHOD=\"POST\"
> ACTION=\"reserve.php3?action=send\" ENCTYPE=\"x-www-form-urlencoded\">
> <table>
> <TR CLASS=\"$c\"> <TD CLASS=\"$c\">E-Mail </TD> <TD COLSPAN=\"$i\"><INPUT
> TYPE=\"text\" NAME=\"email\" VALUE=\"$email\" SIZE=\"50\"></TD></TR>
>
> </table>
> </form>
> ")
>
>
>
>
>
> --
> 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]
>






do you know of an easy way to change the errors generated by PHP to come
out in WML instead of HTML do they're easier to debug in a WML emulator?

thanks.

todd kennedy






hello,

i would try this:

SELECT SUBSTRING(field,pos,len) AS mystring, id, blah FROM mytable WHERE 
mystring LIKE '%ABC%';

regards,
Nuno Silva


andreas (@work) wrote:

> hi,
> 
> if i use SUBSTRING(field,pos,len) in a SELECT statement it works fine
> 
> but i cant work it out how to use this function in the WHERE clause 
> 
>  ... WHERE  SUBSTRING(field,pos,len) LIKE "ABC"
>  ... WHERE SUBSTRING(field,pos,len) = 'ABC'
>  ... WHERE SUBSTRING(field,pos,len) LIKE 'ABC'
> 
> none of them work
> 
> is this not possible or whats wrong ?
> 
> 
> thank you
> 
> andreas
> 
> 
> 






Tom,

I can't be sure, since I'm not too knowledgeable with this, but I would
think this would work just fine.  The search engine should be seeing the URL
just as the user would.  Further, a site I know does a similar trick (though
I'm not sure they use mod_rewrite) where /users/username is converted into
something.pl?user=username and they get indexed, so I can't think of any
reason you're case would be any different.

- Steve

"Tom Carter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi all,
>
> On one of my sites we make extensive use of variable passed through the
> url, particullarly for browsing the main content of the site which is
> organised into main and sub categories, eg
> browse.php?maincat=Weather&subcat=sunny kind of thing.
>
> I understand from colleagues who know much on these things that public
> search engines bots (eg google) stop parsing thru that part of the site
> when they reach a '?' (I could well be wrong on this).
>
> a way around this that I have heard is installing the mod_rewrite module
> in apache and mapping browse/weather/sunny to
> browse.php?maincat=weather&subcat=sunny.
>
> Would this in fact even  fix the problem? Its a hard thing to test!
>
> Does anyone have any experience using this? And what is the advice from
> people on how best to get google&co to spider your site and find your
> content effectively?
>
> Thanks in advance
>
> Tom
>
>
> --
> 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]
>






Hi all - just wondering if anyone knows of a function like fputcsv - that
is, writes a line to a csv file - opposite of fgetcsv.

Any help would be appreciated :-)

swadie

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110





> Hi all - just wondering if anyone knows of a function like 
> fputcsv - that is, writes a line to a csv file - opposite of fgetcsv.

A CSV file is just a text file with a different file extension,
so you can use fgets to write it out...

Jason




Thanks - what I want to do is just say something like fputcsv($myarray) -
and not have to worry about putting in the commas or whatever myself... will
fputs do that?

(In case it wasn't clear - I'm wanting to write back to the file, having
already read from it using fgetcsv)

swadie


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-----Original Message-----
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Monday, 14 May 2001 14:19
To: 'Steve Wade'; PHP News
Subject: RE: [PHP] fgetcsv


> Hi all - just wondering if anyone knows of a function like
> fputcsv - that is, writes a line to a csv file - opposite of fgetcsv.

A CSV file is just a text file with a different file extension,
so you can use fgets to write it out...

Jason

--
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]





> Thanks - what I want to do is just say something like 
> fputcsv($myarray) - and not have to worry about putting in the 
> commas or whatever myself... will fputs do that?
> 
> (In case it wasn't clear - I'm wanting to write back to the 
> file, having already read from it using fgetcsv)

How about fputs($filehandle, implode(",", $array)) ...? :)

(I haven't used fgetcsv, sorry)

J




[EMAIL PROTECTED] wrote:

> I was just looking at Hallmark Channels' website, and noticed them to be using PHP, 
>wow, PHP has rocketed to something, eh.

Yes, when I first started using php nearly 2 years ago not many people 
even knew what it was (most thought it was some form of a drug). Now 
days you are hard pressed not to at least come across one site using it 
during a normal web browsing session.

Long Live PHP,

Joseph








Hmm - seems clear to me that PHP *is* some form of drug - judging by the way
it seems to affect some people's lives... *grin*




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-----Original Message-----
From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
Sent: Monday, 14 May 2001 14:31
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] HallMark uses PHP!!!!


[EMAIL PROTECTED] wrote:

> I was just looking at Hallmark Channels' website, and noticed them to be
using PHP, wow, PHP has rocketed to something, eh.

Yes, when I first started using php nearly 2 years ago not many people
even knew what it was (most thought it was some form of a drug). Now
days you are hard pressed not to at least come across one site using it
during a normal web browsing session.

Long Live PHP,

Joseph





--
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]





> Yes, when I first started using php nearly 2 years ago not 
> many people even knew what it was (most thought it was some form of 
> a drug). Now days you are hard pressed not to at least come across one 
> site using it during a normal web browsing session.

At this point, I'll throw in that NeuLevel (the .biz registry) are 
using PHP ... :)

Well, I thought it was kinda cool anyway.

It's funny how many comments we get here at Melbourne IT about how
pleased various people are to see us using it :)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"What'll Scorpy use wormhole technology for?"
'Faster pizza delivery.'




Alltheweb - the world biggest search engine uses it,
Altavista, not the biggest anymore, but I heard it has something to do with
PHP as well.

Maxim Maletsky,
PHPBeginner.com
 

-----Original Message-----
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 1:34 PM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] HallMark uses PHP!!!!


> Yes, when I first started using php nearly 2 years ago not 
> many people even knew what it was (most thought it was some form of 
> a drug). Now days you are hard pressed not to at least come across one 
> site using it during a normal web browsing session.

At this point, I'll throw in that NeuLevel (the .biz registry) are 
using PHP ... :)

Well, I thought it was kinda cool anyway.

It's funny how many comments we get here at Melbourne IT about how
pleased various people are to see us using it :)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"What'll Scorpy use wormhole technology for?"
'Faster pizza delivery.'

-- 
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]




Has anybody ever written some code for a product and want it to be able to
update itself... and made it look for updates? Does anybody have some ideas
or information on this?

Thanks

Scott.






Should be actually hard...
Write Update.php file that connects to your web-site and reads your
version-information file and then read version information site from the
hoster site and check if you have a new version, if so then the update.php
will again query the version-info file and get new files lists and update
the hoster (by copying new files from your server to their server)
You can make whatever you want!

I mean by the Hoster (The one who's hosting your script, let's say the
update.php)

-elias
http://www.eassoft.cjb.net

""Scott Mebberson"" <[EMAIL PROTECTED]> wrote in message
9dnr1o$gv5$[EMAIL PROTECTED]">news:9dnr1o$gv5$[EMAIL PROTECTED]...
> Has anybody ever written some code for a product and want it to be able to
> update itself... and made it look for updates? Does anybody have some
ideas
> or information on this?
>
> Thanks
>
> Scott.
>
>
>
> --
> 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]
>






Is your file greater than 1000 bytes?
If it is, this is the answer: the file you try to upload is too large.
Increase the limit (beware of the built-in limit of PHP - in php.ini)

<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">





Hello,

i'm using htdig 3.1.5 on a box with PHP 3.1.12

the program htsearch provides me with html, in which following URLs can be 
found:

http://myserver.de/search/results.php?words=sms;page=2

The problem is, the results.php script can't properly parse the URL and I 
can't use the variables $words or $page. I suppose this is because of the 
semicolons, because the same URL with '&' between the variables works.

How can I get php to correctly recognise the semicolons? Semicolons between 
variables are supposed to be valid HTTP links.

Thanks,

christian capito






hi,
i want to set cookies.
cookies can only be set before <html>
and <head> tags. i think this is
because php sends all output immediatly.
is there a statement that stops sending
immediatly and a statement that tells
to send now (at the end of the doc)?

ciao sascha





Hi,

You should look into output buffering:

http://www.php.net/manual/en/ref.outcontrol.php

There's a few tutorials listed in the user contributed notes at the end too.

Simon

At 10:10 14/05/01 +0100, Sascha Andres wrote:
>hi,
>i want to set cookies.
>cookies can only be set before <html>
>and <head> tags. i think this is
>because php sends all output immediatly.
>is there a statement that stops sending
>immediatly and a statement that tells
>to send now (at the end of the doc)?
>
>ciao sascha





i'm running a select query on a table, and ihave a form right underneath it,
with similar names to the
information selected in the query above.

yet despite using mysql_free_results before my form starts, it still
keeps the last result of the query 1 in memory :(

are there any solutions??

thanks

/sunny


Reply via email to