[PHP] Refresh Page

2004-06-05 Thread Mike Mapsnac
I want to refresh page every 10 seconds, without clicking on "Refresh" 
button.
Any ideas how this can be done?

Thanks
_
MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/

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


[PHP] Linux command in PHP

2004-05-12 Thread Mike Mapsnac
I have script  that basically process a file. If  something found in the 
file, the script send email.

Today I tried to add another  option, that gives sound and send email.
The script works ok when I run from  shell. But when I add the code to 
cronjob, the email is send but NO SOUND. Any ideas what can cause such 
problem?

# Below the code that start the xmms sound
$alert = "/usr/bin/xmms /home/mike/Desktop/song1.mp3";
`$alert';
_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Re: [PHP] Re: Remove cahracters in string

2004-05-10 Thread Mike Mapsnac
No. It just an example


From: "Torsten Roehr" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Remove cahracters in string
Date: Mon, 10 May 2004 22:49:27 +0200
"Mike Mapsnac" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Below is string let's name it A.
> ttPhiladelphiaFirstadate05Oct2004tt
>
> I want to get string B. That looks like
> PhiladelphiaFirstadate05Oct2004
>
> No characters before Philadelphia and after 20004
Is the character you want to remove ('t') always the same?

Torsten

>
>
>
>
> >From: "Torsten Roehr" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: [PHP] Re: Remove cahracters in string
> >Date: Mon, 10 May 2004 22:37:36 +0200
> >
> >"Mike Mapsnac" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> > > I search on php.net and couldn't find the function. I need a 
function
> >that
> > > will remove characters in the string  until it reached the pattern 
and
> > > remove characters in the string after another pattern.
> > >
> > > The program reads huge file, and remove unnessary data.
> > > So I need to remove characters before and after the line.
> >
> >Could you post an example to make absolutely clear what you have and 
what
> >you want? Thanks.
> >
> >Torsten
> >
> > >
> > > FedoraPHPLINUXOct72004
> > >
> > > _
> > > Is your PC infected? Get a FREE online computer virus scan from
McAfee®
> > > Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> _
> FREE pop-up blocking with the new MSN Toolbar – get it now!
> http://toolbar.msn.com/go/onm00200415ave/direct/01/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Remove cahracters in string

2004-05-10 Thread Mike Mapsnac
Below is string let's name it A.
ttPhiladelphiaFirstadate05Oct2004tt
I want to get string B. That looks like
PhiladelphiaFirstadate05Oct2004
No characters before Philadelphia and after 20004




From: "Torsten Roehr" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Remove cahracters in string
Date: Mon, 10 May 2004 22:37:36 +0200
"Mike Mapsnac" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I search on php.net and couldn't find the function. I need a function 
that
> will remove characters in the string  until it reached the pattern and
> remove characters in the string after another pattern.
>
> The program reads huge file, and remove unnessary data.
> So I need to remove characters before and after the line.

Could you post an example to make absolutely clear what you have and what
you want? Thanks.
Torsten

>
> FedoraPHPLINUXOct72004
>
> _
> Is your PC infected? Get a FREE online computer virus scan from McAfee®
> Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/

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


[PHP] Remove cahracters in string

2004-05-10 Thread Mike Mapsnac
I search on php.net and couldn't find the function. I need a function that 
will remove characters in the string  until it reached the pattern and 
remove characters in the string after another pattern.

The program reads huge file, and remove unnessary data.
So I need to remove characters before and after the line.
FedoraPHPLINUXOct72004

_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


[PHP] Save page

2004-05-10 Thread Mike Mapsnac
Hello

I' m writing php script that will request page and save it locally. The page 
URL will be parameter (example: http://www.pagetoget.com/thispage.html). How 
php can request such page and save it locally on the file?

Thanks

_
Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/

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


Re: [PHP] How to do this?

2004-04-10 Thread Mike Mapsnac
Thanks a lot
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Mike Mapsnac" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, April 10, 2004 10:34 AM
Subject: Re: [PHP] How to do this?


> Mike Mapsnac wrote:
> > My php page takes data from the database such as ID, Date, Value and
> > prints on the screen. About 20 entries are printed on the screen. The
> > each entry has option 'yes' or 'no'.
> >
> > So I need to gather the information about each entry and update
> > database. I cannot access the variable from $_POST because parameter is
> > not static and $_POST is not working like this $_POST['$id'];
>
> Make a radio button such as:
>
> 
> 
>
> Then, you'll have $_POST['option'][$id] that you can use.
>
> $yes_ids = array_keys($_POST['option'],'Yes');
> $yes_list = implode(',',$yes_ids);
>
> $no_ids = array_keys($_POST['option'],'No');
> $no_ids = implode(',',$no_ids);
>
> $entire_list = implode(',',array_keys($_POST['option']));
>
> $query = "UPDATE table SET option = CASE WHEN id IN ($yes_list) THEN
> 'Yes' WHEN id IN ($no_list) THEN 'No' END CASE WHERE id IN
($entire_list)";
>
> Need to add in some validation, but that's the basic idea. Well, that's
> not really "basic", but it gives you an idea of a very efficient way to
> handle this. :)
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
>
>
>

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



[PHP] How to do this?

2004-04-10 Thread Mike Mapsnac
My php page takes data from the database such as ID, Date, Value and prints 
on the screen. About 20 entries are printed on the screen. The each entry 
has option 'yes' or 'no'.

So I need to gather the information about each entry and update database. I 
cannot access the variable from $_POST because parameter is not static and 
$_POST is not working like this $_POST['$id'];

Any ideas how I can make this working?

_
Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and 
more! http://moneycentral.msn.com/tax/workshop/welcome.asp

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


[PHP] Pass by references

2004-03-29 Thread Mike Mapsnac
I write some small program that uses xml. So I will use this function 
http://us3.php.net/manual/en/function.xml-parse-into-struct.php.

Quote: "This function parses an XML file into 2 parallel array structures, 
one (index) containing pointers to the location of the appropriate values in 
the values array. These last two parameters must be passed by reference".

What does it mean pass by reference in PHP?

Thanks

_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: [PHP] Re: Attach Image to email

2004-03-24 Thread Mike Mapsnac
Yes. I want to make it as attachment.

Any ideas how that's can be done?

Thanks


From: "Elliot J. Balanza" <[EMAIL PROTECTED]>
Reply-To: "Elliot J. Balanza" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Attach Image to email Date: Wed, 24 Mar 2004 18:12:18 
-0600

Send it in HTML form, and use an img meta tag... now if you want to do is 
an
attachement that is a different story.

Vamp
"Mike Mapsnac" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Hello
>
> I know how to use mail "function" in php to send an email with text. But 
I
> want to add new feature to my website that allow to send email with
> attachment ( image). Any ideas how to do this?
>
> Thanks
>
> _
> Get reliable access on MSN 9 Dial-up. 3 months for the price of 1!
> (Limited-time offer)
>
http://join.msn.com/?page=dept/dialup&pgmarket=en-us&ST=1/go/onm00200361ave/direct/01/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
http://toolbar.msn.com/go/onm00200414ave/direct/01/

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


[PHP] Attach Image to email

2004-03-24 Thread Mike Mapsnac
Hello

I know how to use mail "function" in php to send an email with text. But I 
want to add new feature to my website that allow to send email with 
attachment ( image). Any ideas how to do this?

Thanks

_
Get reliable access on MSN 9 Dial-up. 3 months for the price of 1! 
(Limited-time offer) 
http://join.msn.com/?page=dept/dialup&pgmarket=en-us&ST=1/go/onm00200361ave/direct/01/

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


[PHP] what can be wrong here?

2004-03-22 Thread Mike Mapsnac
Hello

In CSS file all links are black:
/* Part from CSS file  */
a:link{color:#00; text-decoration: none;} /*unvisited link*/
a:visited{color:#00; text-decoration: none;} /*visited link*/
a:hover {color:#00; text-decoration: none;} /*mouse over link*/
a:active { color:#00}
On the page also all links are black (visited or unvisited). In the PHP code
I print the image and link to medium image:
$thumb = "";
In the Mozilla the Image frame/border is black but on IE it is (blue unvisit 
and red  visit).

When I try to print just image
echo "";
The image frame is black on IE and Mozilla. Any ideas why the image frame is 
blue or red when I print
$thumb = "";
I want to make the image fram "black";
Thanks

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


[PHP] Image info?

2004-03-19 Thread Mike Mapsnac
Using php function I was able to get such information about image such as:
size(width, height), type of image and size of the image.
Can I get more information about image?

Thanks

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


[PHP] How to do this in PHP?

2004-03-18 Thread Mike Mapsnac
I have a table that has 5 cells and each cell has a  link.
So when I click on a cell , the visited cell will get background color.
In other words, when I click on the cell the color of the cell changes.
Thanks

_
Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/

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


Re: [PHP] refresh page

2004-03-16 Thread Mike Mapsnac
Can you show the code?
Thanks

From: Jeff Oien <[EMAIL PROTECTED]>
To: Mike Mapsnac <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] refresh page
Date: Tue, 16 Mar 2004 20:11:49 -0600
Mike Mapsnac wrote:

I  need to refresh page every 2 minutes. How that's can be done in PHP?
This would just be an HTML thing but if you want a user to specify
a page I've done it here:
http://www.ttrader.com/stockchat/refresh.html
You have to basically go back and forth between two pages.
Let me know if you want the code.
Jeff Oien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


[PHP] refresh page

2004-03-16 Thread Mike Mapsnac
Hello

I  need to refresh page every 2 minutes. How that's can be done in PHP?

THanks

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


Re: [PHP] failed to open stream: No such file or directory in

2004-03-15 Thread Mike Mapsnac
thanks for explanation

Is it possible in php.ini declare $basedir(for libraries)?





From: Richard Davey <[EMAIL PROTECTED]>
Reply-To: Richard Davey <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [PHP] failed to open stream: No such file or directory in
Date: Mon, 15 Mar 2004 17:55:13 +
Hello Mike,

Monday, March 15, 2004, 5:43:14 PM, you wrote:

MM> But When I try to declare the library   in /var/ww/html/account/
MM> include('lib/account/lib_main.php');
lib_main.php = /var/www/html/lib/lib_main.php
index.php= /var/www/html
You are including files RELATIVE to the location of the script. At the
point in which you try to include the lib_main file, you are currently
in the account directory, so it's trying to look for:
/var/www/html/account/lib/account/lib_main.php

which, needless to say, doesn't exist.

A good solution to save you some hassle will be to define a global
variable/constant called something like $basedir and set that.
$basedir = "/var/www/html";

Now just use this in all your include lines:

include "$basedir/lib/lib_main.php";

This will work from *anywhere* and not fail.

--
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get business advice and resources to improve your work life, from bCentral. 
http://special.msn.com/bcentral/loudclear.armx

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


[PHP] failed to open stream: No such file or directory in

2004-03-15 Thread Mike Mapsnac
Hello
I know that problem is related how I include library file (lib_main.php).
I just don't understand what I do wrong:
lib_main.php is located at /var/www/html/lib/lib_main.php
When I include in the index.phplocated at  /var/www/html/  I do the 
following
include ('lib/lib_main.php'); // this works fine

But When I try to declare the library   in /var/ww/html/account/
include('lib/account/lib_main.php');
It gives me the error message:
Warning: main(lib/account/lib_main.php): failed to open stream: No such file 
or directory in /var/www/html/account/index.php on line 6

I have no idea what is wrong here

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


RE: [PHP] [Q] Session management when WEB site is based on template

2004-03-13 Thread Mike Mapsnac
I like this tutorial about session:
http://www.phpfreaks.com/tutorials/41/0.php



From: "Michael T. Peterson" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] [Q] Session management when WEB site is based on template
Date: Sat, 13 Mar 2004 18:15:24 -0800
I'm having difficulty figuring out where/how to integrate PHP session
management into a web site whose pages are based on a template.  Pointers 
to
docs and/or examples would be very helpful.

Cheers,

Michael

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get business advice and resources to improve your work life, from bCentral. 
http://special.msn.com/bcentral/loudclear.armx

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


[PHP] Create table .. script

2004-03-13 Thread Mike Mapsnac
Hello

When I need to create table I have to login into mysql and run the query. Is 
there a way to create some sort of scipt that can create all my tables?.So 
If I need create a table in new database I  just run the script.

I know that I can do mysql_query("QUERY OF TABLE");
But is there another way of doing this?
Thanks

_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

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


[PHP] RE: R: [PHP] Get "nice" variables from POST

2004-03-12 Thread Mike Mapsnac
I try to use quotes in the query and this doesn't work.
  $query = "SELECT * FROM user WHERE user_id = '$_POST['user_id']}'";
But you use brackets and it works.. Why do you use brackets ?
$query = "SELECT * FROM user WHERE user_id = ${_POST['user_id']}";

From: "Alessandro Vitale" <[EMAIL PROTECTED]>
To: "Mike Mapsnac" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: R: [PHP] Get "nice"  variables from POST
Date: Thu, 11 Mar 2004 17:30:57 +0100
hi,

why don't you simple use the $_POST vars? they are already available to 
you,
so why you should copy them?

example:

function show_function()
{
   $query = "SELECT * FROM user WHERE user_id = ${_POST['user_id']}";
   
}
at the same time:
- you save a lot of time ( you don't need to write code for copying vars )
- you can always identify in your script the variable you are using is the
one that comes from POST
cheers,

alessandro

-Messaggio originale-
Da: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Inviato: giovedì 11 marzo 2004 15.51
A: [EMAIL PROTECTED]
Oggetto: [PHP] Get "nice" variables from POST
I have about 10 fields in the form. And I get the fields through POST:
//Get Variable from the form
$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$nickname = $_POST['name'];
$city = $POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$misc = $_POST['misc'];
$country = $_POST['country'];
It works but it looks ugly. For each variable I have statemet. Is there a
way to get the variables in the loop?
I'm looking for "nice" way to get variables from POST?

Thanks

_
Frustrated with dial-up? Lightning-fast Internet access for as low as
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


[PHP] PHP regular expression

2004-03-11 Thread Mike Mapsnac
Hello

I found this function online and want to understand how it works.
I don't understand "/^" and "$/". I know that "^" beginning of the string 
but what is "/^".

Thanks

function validEmail($email)
{
   return 
preg_match("/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+[a-zA-Z0-9_-]$/",$email);
}

_
Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1! 
(Limited-time Offer) http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

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


Re: [PHP] Get "nice" variables from POST

2004-03-11 Thread Mike Mapsnac
Thanks.

It looks much nicer :)


From: Marek Kilimajer <[EMAIL PROTECTED]>
To: Mike Mapsnac <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Get "nice"  variables from POST
Date: Thu, 11 Mar 2004 15:59:07 +0100
Mike Mapsnac wrote:

I have about 10 fields in the form. And I get the fields through POST:
//Get Variable from the form
$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$nickname = $_POST['name'];
$city = $POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$misc = $_POST['misc'];
$country = $_POST['country'];
It works but it looks ugly. For each variable I have statemet. Is there a 
way to get the variables in the loop?

I'm looking for "nice" way to get variables from POST?

Thanks

Does this look nicer?

$fields = array('username', 'password', ...);
foreach($fields as $key) $$key = $_POST[$key];
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


[PHP] Get "nice" variables from POST

2004-03-11 Thread Mike Mapsnac
I have about 10 fields in the form. And I get the fields through POST:
//Get Variable from the form
$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$nickname = $_POST['name'];
$city = $POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$misc = $_POST['misc'];
$country = $_POST['country'];
It works but it looks ugly. For each variable I have statemet. Is there a 
way to get the variables in the loop?

I'm looking for "nice" way to get variables from POST?

Thanks

_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


[PHP] Letters and Numbers limitation

2004-03-10 Thread Mike Mapsnac
Form takes parameter username, so I want to accept username taht includes 
only numbers and letters.
How can I check if variable contains only letters and numbers?

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


RE: [PHP] Warning: Cannot modify header information - headers already sent by (o

2004-03-10 Thread Mike Mapsnac
Thank for your help ..

One more question:
I include header to the acount.php page. And it gives the same error, but in 
this situation I don't have any outputs.

Also, I start session in header, not in the account.


include_once 'header_account.php';

$password = $_POST['password'];
$username = $_POST['username'];
$sql_login = mysql_query("SELECT id from user WHERE username='$username' and 
password=password('$password')");

if(mysql_num_rows($sql_login)) {
 $_SESSION['login'] = 'register';
 $_SESSION['name'] = "$username";
 Header("Location: " ."index.php");
}
echo "";
?>

 Username: 
 Password: 

 "; ?>

//File: header_account.php

session_start(); ?>


    

  HomeResize
 


From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "Mike Mapsnac" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: RE: [PHP] Warning: Cannot modify header information - headers 
already sent by (output sta
Date: Tue, 9 Mar 2004 17:46:21 -0800

Mike Mapsnac <mailto:[EMAIL PROTECTED]>
on Tuesday, March 09, 2004 5:42 PM said:
> This code below gives me this error message:
> Warning: Cannot modify header information - headers already sent by
> (output started at /var/www/html/account.php:6) in
> /var/www/html/account.php on line 17
>
> The script check in the database if user exists and than redirect the
> page to the home index.php page. I know the problem exist in the
> header() .. But I don't understand why?
the error is telling you that you cannot output anything to the client
BEFORE modifying the headers, i.e. redirecting. you have a lot of output
starting on line 6 in /var/www/html/account.php.
hth,
chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


[PHP] Warning: Cannot modify header information - headers already sent by (output sta

2004-03-09 Thread Mike Mapsnac
This code below gives me this error message:
Warning: Cannot modify header information - headers already sent by (output 
started at /var/www/html/account.php:6) in /var/www/html/account.php on line 
17

The script check in the database if user exists and than redirect the page 
to the home index.php page. I know the problem exist in the header() .. But 
I don't understand why?




echo "";?>

 Username: 
 Password: 

";
$password = $_POST['password'];
$username = $_POST['username'];
$sql_login = mysql_query("SELECT id from user WHERE username='$username' and 
password=password('$password')");
if(mysql_num_rows($sql_login)) {
   header("Location: http://www.index.php";);
  } ?>

_
Find things fast with the new MSN Toolbar – includes FREE pop-up blocking! 
http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/

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


[PHP] absolute path

2004-03-08 Thread Mike Mapsnac
I'm looking for PHP function that takes $filename as parameter and returns 
absolute path.

I looked on php.net but cannot find such function. Any ideas if such 
function exist?

Thanks

_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


Re: [PHP] Re: Parse error ???

2004-03-04 Thread Mike Mapsnac
It works now.

I run the script as user mike and mike:mike is owner of the directory, when 
I upload something to directory the owner of the file is apache:apache.
Why the owner of the file is not mike ?

thanks

From: Neil Freeman <[EMAIL PROTECTED]>
To: Mike Mapsnac <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED],  [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:58:26 +
If I remember correctly the second parameter of move_uploaded_file() needs 
to be the full filename, ie path plus required filename.

so...

if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
("/var/www/html/upload/" . $_FILES['myfile']['name'])))
Neil

Mike Mapsnac wrote:

***
This Email Has Been Virus Swept
***
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: 
Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die("Error! The expected file wasn't a part of the submitted form");

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

--
--
 www.curvedvision.com
--
This communication is confidential to the intended recipient(s). If you are 
not that person you are not permitted to make use of the information and 
you are requested to notify the sender immediately of its receipt then 
destroy the copy in your possession. Any views or opinions expressed are 
those of the originator and may not represent those of Advanced System 
Architectures Ltd.

*** This Email Has Been Virus Checked ***

_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


RE: [PHP] Re: Parse error ???

2004-03-04 Thread Mike Mapsnac
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: 
Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die("Error! The expected file wasn't a part of the submitted form");

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

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


[PHP] Parse error ???

2004-03-04 Thread Mike Mapsnac
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
//Upload.php (form)





//uploadproc.php
if(!isset($_FILES['myfile'])) {
die "Error! The expected file wasn't a part of the submitted form";
}
if($_FILES['myfile']['error'] != UPLOAD_ERR_OK) {
die "Error The file uploaded failed.";
}
if(!move_uploaded_file($_FILES['myfile']['tmp_name
'],
"/var/www/html/upload/")) {
die "Error! Moving the uploaded file failed.";
}

echo "File successfully uploaded.";
?>
_
Learn how to help protect your privacy and prevent fraud online at Tech 
Hacks & Scams. http://special.msn.com/msnbc/techsafety.armx

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


[PHP] Set Library Path

2004-02-28 Thread Mike Mapsnac
How to set up the path for PHP Library?
I want to create a directory that will contain all libraries files. And than 
I want to include the directory in each file. How to specify the path in php 
setting?

Thanks

_
Take off on a romantic weekend or a family adventure to these great U.S. 
locations. http://special.msn.com/local/hotdestinations.armx

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


[PHP] boolean type function ?

2004-02-18 Thread Mike Mapsnac
I search on php.net. How to declare php function as  type boolean?

I tried the following declaration;
function booolean check_ip_remote() &
boolean check_ip_remote()
But both declaration are wrong. I got the error messages

_
Say “good-bye” to spam, viruses and pop-ups with MSN Premium -- free trial 
offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/

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


[PHP] empty file's content?

2004-02-16 Thread Mike Mapsnac
How can I empty a file's content through php defined functions?
Thanks
_
Check out the great features of the new MSN 9 Dial-up, with the MSN Dial-up 
Accelerator. http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

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


[PHP] Resource id #1

2004-02-16 Thread Mike Mapsnac
I print variable to the screen and get the result "Resource id #1". Any 
ideas waht Resource id #1 is?
Thanks

_
Plan your next US getaway to one of the super destinations here. 
http://special.msn.com/local/hotdestinations.armx

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


Re: [PHP] Exectution Time?

2004-01-30 Thread Mike Mapsnac
.
smart guy ..

From: "John W. Holmes" <[EMAIL PROTECTED]>
Reply-To: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Mike Mapsnac" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: Re: [PHP] Exectution Time? Date: Fri, 30 Jan 2004 16:42:56 -0500
From: "Mike Mapsnac" <[EMAIL PROTECTED]>

> Is there a way to find out the execution time of php program?

If you start a task at 10:00 and finish at 10:15, how long did it take?

---John Holmes...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Let the new MSN Premium Internet Software make the most of your high-speed 
experience. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1

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


[PHP] Exectution Time?

2004-01-30 Thread Mike Mapsnac
Is there a way to find out the execution time of php program?

Thanks

_
Check out the coupons and bargains on MSN Offers! 
http://shopping.msn.com/softcontent/softcontent.aspx?scmId=1418

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


[PHP] Print All parameters

2004-01-28 Thread Mike Mapsnac
Is it possible to print all values of all variables in php file? Including 
global, local...
Thanks

_
Get a FREE online virus check for your PC here, from McAfee. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


[PHP] Create PDF FIle

2004-01-20 Thread Mike Mapsnac
Hello

I want to create PDF file from PHP output. So instead of sending output to 
the browser, I need to insert PHP output  into PDF FILE. How that's can be 
done? Looking for some short example or some documentation.

Thanks

_
Let the new MSN Premium Internet Software make the most of your high-speed 
experience. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1

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