RE: [PHP] SELECT?

2005-12-28 Thread Christian Ista
 From: William Stokes [mailto:[EMAIL PROTECTED]
 I have one MySQL table with about 500 rows. I need to read the table one
 row at a time, make some changes to data in one field and then store the 
 changed data to another table.

1. May be add a column, CHANGED_FL with default value N.
2. Select to find the ID minimum with a select CHANGED_FL is N
3. Select the row with the ID found above and make you business
4. Make change and change CHANGED_FL to Y

Repeat operation 2 to 4 

C.

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



[PHP] Location ....

2005-12-28 Thread Christian Ista
Hello,

Could you tell me a efficient solution for change page (new location) in
PHP? I tried this code : header(Location: mypage.php);

But in some case, I have error message heade already send. Then I use a
javascript solution : window.location.href=mypage.php;

Is there a good solution in php ?

Thanks,

C.

___
Christian Ista
http://www.cista.be 

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



RE: [PHP] Location ....

2005-12-28 Thread Christian Ista
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]
 Header is a good solution, and is the only one available in PHP for
 redirects. It requires that you do not send anything else out to the
 browsers before sending the redirect, which is what is causing your error.
 You can always use the output buffer functions to assist with that.

Ok but there is something more strange.

I use header location in a switch/case. An header location by case. I
don't understand at the end of the case, the header location don't work and
I go through the others cases.

Any idea why ?

Thanks,

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



[PHP] PHP/MYSQL Connection trouble (charset)

2005-12-26 Thread Christian Ista
Hello,


I Have MySQL 4.1.14 and 5.0.15 installed on my Windows XP Pro SP2.

There are installed in D:\Tools\MySQL\MySQL Server 4.1.14 and MySQL Server
5.0.15 for the version 5. They work on port 3306 and 3307.

When I try a DB connection, I receive this error:

File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2) Character set
'#33' is not a compiled character set and is not specified in the
'c:\mysql\share\charsets\Index' file Resource id #5

I tried several solution from this :
http://dev.mysql.com/doc/refman/4.1/en/problems-with-character-sets.html

but no result.

Could you help me ?

Thanks,

Christian,


___
Christian Ista
http://www.cista.be

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



RE: [PHP] PHP/MYSQL Connection trouble (charset)

2005-12-26 Thread Christian Ista
 From: Christian Ista [mailto:[EMAIL PROTECTED] File 
 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2) Character set 
 '#33' is not a compiled character set and is not specified in the 
 'c:\mysql\share\charsets\Index' file Resource id #5

I answer to myself.

In fact I reinstall MySQL 4.x in the same directory with latin as default
charset and that's work now :)

Christian,
 

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



[PHP] Recover POST form

2004-11-06 Thread Christian Ista
Hello,

In a PHP page I use a form with POST method.

I'd like in the action page recover all the variable posted. Could you tell 
me how to do that ?

Thanks,

Christian, 

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



Re: [PHP] Recover POST form

2004-11-06 Thread Christian Ista

 echo 'pre';
 print_r($_POST);
 echo '/pre';

I have something like that :

Array
(
[5980915] = on
[ToDo5980915] = N
[5941846] = on
[ToDo5941846] = N
[5916500] = on
[ToDo5916500] = N
[5907115] = on
[ToDo5907115] = N
[5900019] = on
[ToDo5900019] = N
[5899239] = on
[ToDo5899239] = N
[5897854] = on
[ToDo5897854] = N
[5896483] = on
[ToDo5896483] = N
[5893286] = on
[ToDo5893286] = N
[5865056] = on
[ToDo5865056] = N
[fa] = test
)

I'd like to access this array in a for loop from an array from 0 to 21 
(in this case). How to transform this array ?

I tried $_POST[2] but not work 

Thanks, 

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



Re: [PHP] Recover POST form

2004-11-06 Thread Christian Ista

 I tried $_POST[2] but not work 

with arrays_keys :)

Thanks, 

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



Re: [PHP] PHP in CGI ....php.in

2004-10-31 Thread Christian Ista

 where did you place your php.ini?

In the root of my application in www. /home/mydomaine/www

Thanks,


Christian, 

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



Re: [PHP] PHP in CGI ....php.in

2004-10-30 Thread Christian Ista

 #!/usr/bin/php -c /path/to/php.ini

I tried this

#!/usr/local/lib/php -c php.ini

In the php.ini :
register_globals = on

but that's not work

Any idea ?

Christian, 

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



[PHP] PHP in CGI ....php.in

2004-10-29 Thread Christian Ista
Hello,

On a server with linux redhat and apache 1.3 I have PHP4 and 5 installed  in 
CGI.

In the php.ini, register_globals is set to off.

I'd like for a website have this flag set to on,. I tried with a .htaccess 
file with this value in :

php_flag register_globals on

but that's not work. Someone told me that's not work with php in CGI.

Someone else told me it's possible to have a php.ini by website. Could you 
tell me where put in and what in ?

Regards,

Christian, 

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



Re: [PHP] PHP in CGI ....php.in

2004-10-29 Thread Christian Ista
 php -c /path/to/php.ini

Could you explain ??

My php pages are in /home/mysite/www

Thanks, 

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



[PHP] Re: include_path and safe_mode in virtualhost

2004-10-01 Thread Christian Ista
 because you've got allow_url_fopen = On. safe_mode doesn't stop that. You 
 need to turn the allow_url_fopen Off to limit that ability...

Thanks, That's work fine :)


Christian, 

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



[PHP] include_path and safe_mode in virtualhost

2004-09-30 Thread Christian Ista
Hello,

I have a didecated server (linux redhat + apache 1.31.x and PHP 4.3.x).

I'd like for a specific virualhost, set the include_path and safe_mode

To do that, I did :
Virtualhost
.
php_admin_value safe_mode  on
php_admin_value include_path .:/design:/home:/manager:/login:/style
/Virtualhost

Then I make 2 tests with a test.php page placed on this server.

1. I try in a test page, include an HTML file. This file is on another server. I have 
in the test page ?php include(www.other-server.com/myfile.html ?. In the 
myfile.html there is only the text MY TEST.

When I call test.php, I see MY TEST.

It's not normal I thing because I include a file from outside the include_path.

Do you have an idea what's happen ?

2. I do an another include but this time from a local file (/etc/my.cnf, it's the 
configuration file for MySQL, the owner is root)

With php_admin_value values in the virtual host, impossible to include even if I 
specify the path of this file in the include_path. Is it normal ?

For me the most important point is the first, why is it still possible ton include a 
remote file?

Regards,

Christian,

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



[PHP] Reset auto_increment field

2003-11-11 Thread Christian Ista
Hello,

It's not really a PHP question, sorry.

How reset a MySQL auto_incrment field ?

Thanks,

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



[PHP] Date to string (with mask)

2003-11-08 Thread Christian Ista
Hello,

I have in a database a date field (this format yyy/mm/dd). I'd like when I
display the value use an another format dd/mm/ (format in europ), could
you tell me if there is a format DateString function ?

Thanks,

Christian,

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



[PHP] HTML and PHP

2003-06-05 Thread Christian Ista
Hello,

Look the code below. Is it an obligation to multiply the number of ?php ?.
There is no other way ? not possible to use only an open php tag (?php) and
a clode php tag (?)  ?

Christian,


?php
   switch($constant_lastupdate[$i][3]){
   case '1' :?
img src=design/logo_windows.gif alt= width=12 height=10
border=0
?php
break;
   case '2' :?
img src=design/logo_mac.gif alt= width=10 height=10 border=0
?php
break;
   case '3' :?
img src=design/logo_linux.gif alt= width=9 height=11
border=0
?php
break;
   }
  ?



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



[PHP] Find IP address

2003-02-19 Thread Christian Ista
Hello,

I'd like when a customer fill in a form to  recover his IP address, is there
a PHP function to do that ?

Thanks,

Christian,



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




Re: [PHP] Find IP address

2003-02-19 Thread Christian Ista

 Be warned: This is NOT a reliable way to identify a user. These days you
 are probably /more/ likely to get the address of a proxy than the
 address of the user.


Is there a better way to be sure, I have the IP address of the user (the ISP
ip address)

Your suggestions are welcome.

Christian,



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




[PHP] Javascript function

2003-02-19 Thread Christian Ista
Hello,

Example, I have this function :

void function MyExampleFunction(){
 document.form_name.element_name.focus();
}

I'd like do something like that, I call the function like that :
MyExampleFunction('form_name.element_name');

And do that :
void function MyExampleFunction(theelement){
 document.theelement.focus();
}

but that's not work ?

An idea ?

Christian,



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




[PHP] Javascript function

2003-02-19 Thread Christian Ista
Hello,

Example, I have this function :

void function MyExampleFunction(){
 document.form_name.element_name.focus();
}

I'd like do something like that, I call the function like that :
MyExampleFunction('form_name.element_name');

And do that :
void function MyExampleFunction(theelement){
 document.theelement.focus();
}

but that's not work ?

An idea ?

Christian,




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




[PHP] POP3 ... syntax error

2003-02-05 Thread Christian Ista
Hello,

I'm trying to access pop3 server via PHP code. I can establish the
connection, send the USER command (I receive the +OK answer). After that
I sent the PASS command but I receive the answer -ERR syntax error. 

I don't understand why syntax error.

Do you have an idea ?


Christian,

---
Christian Ista (AFAS member)
Hosting - Dedicated server
http://www.bee-hosting.com
http://www.your-softwares.com



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




[PHP] Use Pop3

2003-01-29 Thread Christian Ista
Hello,

Is it possible via PHP to :
- join a pop3 server
- make a query to recover mails header, subject, date, sender, to 
create a list.
- we I have the list when I click on an element of the list recever the 
email content (text and attachment) and why not see the email's header
- Have the possibility to delete a specific message (or more)
- Send email too.


Thanks for your help,


Christian,


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




[PHP] Sendmail function

2003-01-25 Thread Christian Ista
Hello,

A friend would like to know how to check on the server (dedicated) if the
function sendmail is enable or not, how ? if not activated how activate ?

Thanks,



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




[PHP] Know the path

2002-12-10 Thread Christian Ista
Hello,

I have a web site with several directories or subdorectories, I'd like to
know when I call (include) php page, the path where I'm. Is it possible?

Christian,



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




[PHP] PHP query to javascript array

2002-12-06 Thread Christian Ista
Hello,


Could you tell me how to transform a PHP query result to a javascript 
array ?

Same question, if you want to store several field from the query to the 
javascript.

Christian,


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




[PHP] SQLInsert and recover the ID

2002-10-31 Thread Christian Ista
Hello,

In a table, I have some fields and the primary key is an autoincrement
field. I insert an row and I'd like to recover the ID used for the last
record I inserted.

For the moment, I do a select max(Id) just after the insert but there
is, my be a best way to do it.

Thanks for your help

Christian,



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




RE: [PHP] SQLInsert and recover the ID

2002-10-31 Thread Christian Ista
 use mysql_insert_id().  Much more reliable when and if you use the
system
 with more than one person inserting at the same time.

Sure it's for that I ask

Thanks for your help.


Christian,



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




[PHP] Add picture in DB

2002-10-28 Thread Christian Ista
Hello,

I have a form, with 2 inputs ( a type file and a type text) and a
submit.

When I submit I receive an error, like this :
':\\Inetpub\\wwwroot\\test\\small2158.jpg)' at line 3

Could you tell me what can I do ?

The better solution is save the picture in the database or save the link
to this picture un the database ?

Christian,



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




[PHP] Read XML file

2002-10-16 Thread Christian Ista

Hello,

Look the code below. The code work I can see on the screen the value of 
each tags (except SOFT, no need it). I'd like now put the value in a 2 
dimensions array, for each tag, first cell the tag name, and the value in 
the second cell. Could you tell me the change to do ?

Thanks,

Christian,



?php
$parser = xml_parser_create();

xml_set_element_handler($parser, startElement, endElement);
xml_set_character_data_handler($parser, characterData);
$filehandler = fopen(FileXML.xml, r);

while ($data = fread($filehandler, 4096)) {
xml_parse($parser, $data, feof($filehandler));
}

fclose($filehandler);
xml_parser_free($parser);

function startElement($parser, $tag) {
switch($tag){
case SOFT:
break;

default :
break;
}

}

function endElement($parser, $tag) {
}   
string function characterData($parser_instance, $xml_data) {
echo $xml_data.'br';
}
?


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




[PHP] Trouble with \\ and form

2002-10-16 Thread Christian Ista

Hello,

I'm trying the example1 give in xml_parse_into_struct section here :
http://www.php.net/manual/en/function.xml-parse-into-struct.php

works fine.

But know I'm trying to change the file name moldb.xml by a file name 
come from a form input type=file .

I receive from the form something like that :
C:\\Directory1\\Directory2\\File.xml
That's not work( the code to parse the XML file)

But If you replace the the string by
C:\Directory1\Directory2\File.xml
That's work.

Is there an easy way to change \\ by \ or an another solution 

Christian,




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




[PHP] Image resize

2002-10-13 Thread Christian Ista

Hello,

I have an image (selected via a form), I know the original size of this
picture 800x600. I'd like when I put the files in the database resize to
240x180, or 120x90. 

How do that ?


Bye



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




[PHP] An small SQL problem

2002-10-12 Thread Christian Ista

Hello,

I'm probably sleepy because I can't do a very easy query. :(

I have 2 tables TableA(FieldA1, FieldA2, FieldA3) and TableB(FieldB1,
FieldB2, FieldB3).

I'd like to see the TableA records (FieldA2) where the FieldA1(Primary
key) not exist in TableB(FieldB2). I tried not exists without success.

Could you help me ?

Christian,


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




[PHP] Trouble wirh in a string

2002-10-11 Thread Christian Ista

Hello,

I have a small problem a string I have for example : $myvar= hello my
friend;  
When I display the content of $myvar with echo I see hell and not the
rest.

I suppose the problem come from the  how solve the problem ?

Bye


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




[PHP] Put an query in a DB field

2002-10-08 Thread Christian Ista

Hello,

I change my code to catch error query. I have a table with 4 files
(Query,
Error_no, create_date, create_time).

When I have an error on a query, I call a page and I add a row in a
table
log_query.

The query (with error is like that) :
$query=
 SELECT
 auteur.NO AS AUTEUR_NOM,
 auteur.PRENOM AS AUTEUR_PRENOM,
 auteur.EMAIL AS AUTEUR_EMAIL,
 auteur.EMAILVISIBLE AS AUTEUR_EMAILVISIBLE,
 auteur.LANGUE_ID AS AUTEUR_LANGUE_ID
 FROM auteur
 WHERE
 ID = '$Auteur_id';

When I have an error, I put the query in a new row in the log_query
table
$query_error=
 INSERT INTO log_error_sql (QUERY, QUERY_NO, CREATE_DT, CREATE_TIME)
 VALUES ('$query', '3', '$NDate', '$NTime')
 ;

The problem when I execute this query, I have a trouble with the ''
around
$query when I look the query_error I see something linke that :
.FROM auteur WHERE ID = '1'', '2', '2002-10-08', '14:06:31')

I have twice a single quote. What can I do in the query_error to solve
that
?


Bye



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




RE: [PHP] MySQLLimit size

2002-10-06 Thread Christian Ista

 Are you using POST or GET for your form? Show some code...

I use get. But I tried to post and look ok. Why this difference ?

Christian,



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




[PHP] MySQLLimit size

2002-10-05 Thread Christian Ista

Hello,

I have a form with a textarea. When I put a long text(one word page for
example), when I submit, the form is not submitted. I have to remove
some line to submit. I don't have any limit in the textarea. The content
of this form is sorted in a MySQL database. I tried to set the field
where the textarea will be stored to LONGTEXt or LONGBLOB but I have all
the time the same problem.

Is it a MySQL limit problem ? or form (textarea) problem ?


Christian,



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




[PHP] Manager SQL error

2002-09-30 Thread Christian Ista

Hello,

I'd like to catch all the queries. I'd like to use a log table, when I 
have a problem with the query, add a record with the query number, the 
query, date and time, and have a url to go to a page without error.

My idea was to create a session array with, by cell :
- the query
- query number
- date
- time
- URL to go back

Do you think it's a good idea ? Do you have an another idea to do this 
kind of think ? 

array_error[0] = $query;
array_error[1] = 1;
array_error[4] = /main/index.php
msql_query($query) or die(header ../add_error.php);

Have any experience in this domain (error catching)

Christian,






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




[PHP] Send mail in HTML

2002-09-27 Thread Christian Ista

Hello,

I use the mail function to send mail. On my development PC, I receive
the mail in HTML, with the high priority,...

I put the files on the production server, a linux machine, when I
receive the mail is not in HTML but in plain text, I don't see the high
priority. I receive that :

Content-Type: text/html; charset=iso-8859-1

X-Priority: 1

X-Mailer: PHP / 4.2.3

Click on the link to activate the 

Could you tell me what can I do ?

I use this code to send mail :

$sender_name = MyWebsite; 
$sender_email = ; 

$contactemail = $Email1;
$myreplyemail = ; 

$message = Click on the link to activate the account..'br';
$message .= http://www.website.com;

$subject = TEST; 

$header = From: \.addslashes($sender_name).\
.$sender_email.\r\n;
$header .= Reply-To: .$sender_email.\r\n;
$header .= MIME-Version: 1.0\r\n;
$header .= Content-Type: text/html; charset=iso-8859-1\r\n;
$header .= X-Priority: 1\r\n;
$header .= X-Mailer: PHP / .phpversion().\r\n;

mail($contactemail, $subject, $message, $header);  


thanks,


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




[PHP] Create login procedure...

2002-09-24 Thread Christian Ista

Hello,

I change the procedure to create an account for users. For the moment, 
the user (to create and log in), have to create an account with e-mail + 
password. I'd like to create a procedure to check the e-mail (login) 
validity. But I'd like to check if the e-mail used exist or not.

The procedure, I'd like implement :
1. User create new account (enter : fisrt name, last name, e-mail, 
password, )

2. An e-mail is send to user to check if e-mail exist. In the e-mail, my 
first idea is to send with an auto-generated number

3. User have to join a specific page to enter the auto-generated number 
to check the validity.


My question are :
1. What do you think about this procedure ? your advise, idea are welcome
2. Is it possible with mySQL to delete user after for example 2 days, if 
the user not confirm the subscription ?

Bye


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




[PHP] Click....download and update

2002-09-19 Thread Christian Ista

Hello,

I'd like when I click on a link a href=http://www.website.com/file.zip
update a table and start the download without change the page.

Could you tell me how to do ?

Christian, 



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




RE: [PHP] Click....download and update

2002-09-19 Thread Christian Ista

 You'll need to prompt the download by sending the appropriate headers.
 Something like..
 
 a href=http://www.mydomain.com/downloadmyfile.phpDownload/a
 
 ? // downloadmyfile.php
 header(Content-Type: application/zip);
 header(Content-Disposition: attachment);
 readfile(file.zip);
 ?

It's not only .zip file but may be .exe or .rar

That's change something in your code ?

I can put the code to update a database field in the downloadmyfile.php
?


Bye


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




Re: [PHP] Query result to an array

2002-09-12 Thread Christian Ista


   $result = mysql_query(...);
   while( $t = mysql_fetch_row($result) ){
 $array[] = $t;
   }

No. I need a 2 dimensions arrays, each line of this array, is the result 
of one row of the query and each cell of this row is a field from the 
select.

Example, the query return 2 row and 3 fields for each row :
Christian, Ista, Belgium
zak, PhpNet, Dontknowfrom

resulf of SELECT NAME, LASTNAME, COUNTRY FROM MyTable;

I'd like to put that in an array and later because I use a session array.

I'd like via a for loop access these data by
echo(MyArray[1][1]);  result is PhpNet
echo(MyArray[0][2]);  result is Belgium
echo(MyArray[1][0]);  result is zak

Is it clearer now ?

Thanks,

Christian



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




[PHP] Trouble on php.net

2002-09-12 Thread Christian Ista

Hello,

I use in general the chm help file in English. Today I downloaded the 
french version (php_manual_fr.chm) but it's not french it's a mix 
german/english.

Downloaded from this page : http://www.php.net/download-docs.php

Christian,


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




[PHP] session_register trouble ?

2002-09-12 Thread Christian Ista

Hello,

I use this code :
$myarray= array();
session_register (myarray);
$i=0;
while ($row = mysql_fetch_object($result)) {
$myarray[$i][0] = $row-ID;
$myarray[$i][1] = $row-NOM;
$myarray[$i][2] = $row-PRENOM;
$i = $i + 1;
}

for($i=0; $isizeof($myarray);$i++){ ?
a href=index.php?argumenthere=testid=?php  echo($myarray[$i][0]); ?
?php echo($myarray[$i][2]); ?/a
?php }

mysql_free_result($result);
mysql_close($link);
?

That's work. But when I add an a href= to call an another page 
(at the end of this) and in this another page I use axactly the same for 
loop than in the previous code

?php
for($i=0; $isizeof($myarray);$i++){ ?
a href=index.php?argumenthere=testid=?php  echo($myarray[$i][0]); ?
?php echo($myarray[$i][2]); ?/a
?php } ?

I receive the error :
Notice: Undefined variable: myarray in 


I solved the problem, I did that :
- register_globals = On
- use session_start(); on the top of the second page too

Is it normal ?

Bye


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




[PHP] Query result to an array

2002-09-11 Thread Christian Ista

Hello,

A query return x rows, by rows there are 4 fields. I'd like to put the
result in an array, a 2 dimensions array. Could you tell me how to do
that ?

Bye



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




RE: [PHP] Query result to an array

2002-09-11 Thread Christian Ista

 while( $temp = mysql_fetch_row($mysql_result_handle) ) {
   $array[] = array(
   'key0' = array(
   'keya' = $temp[0],
   'keyb' = $temp[1],
   ),
   'key1' = array(
   'keya' = $temp[2],
   'keyb' = $temp[3],
   )
   );
 }

Hello,

Thanks for your help. But that's not work at all.

bye



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




Re: [PHP] Query result to an array

2002-09-11 Thread Christian Ista

   array(
   array( $temp[0], $temp[1] ),
   array( $temp[1], $temp[2] )
   )

I thinks it's not the right way.

I have a query, this query can return 1,5,20, 200, ... rows, each row has 
5 fields (or more or less).

I'd like a 2 dimensions array, one line by row and each cell is a field 
content of the query.

I program in a lot of language C/C++, Java, Delphi, C++Builder, 
ColdFusion, C# and I don't undersand why the PHP syntax for this kind of 
think is so complex and not clear.

Bye


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




[PHP] Server date and time

2002-09-10 Thread Christian Ista

Hello,

When a use insert the row in a table, I'd like to know the date and time
of this insertion. Is there a function to know the server date and time,
not the local time user ?

Bye



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




[PHP] PHP, MySQL and Transaction

2002-08-16 Thread Christian Ista

Hello,

In an MySQL table, I insert some records. Before each insert (just
before), 
I do a Select max() ... and I increment the result by one, to give a
number (unique), and I have an auto_incremente field too.

I'd like to know if there is a mechanism in PHP, if several person do
the same thing in the same moment, to not have several record with the
same number.


Christian,



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




[PHP] Drop down reload

2002-08-16 Thread Christian Ista

Hello,

Could you tell me if it possible to reload the current page when I
select a value in a drop down ?

On a page, I have 2 drop down, the content on the first one come from
the database. The content of the second one too (from database) but
depend of the first drop down value.

An idea to do that ?

Bye 



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




[PHP] Session variable in query

2002-08-16 Thread Christian Ista

Hello,

Is it possible to use a session variable in a query (mysql_query)
without passé by an temp variable ?

Bye


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




[PHP] Header and Target

2002-08-15 Thread Christian Ista

Hello,

I have some frame on the website, and I'd like specify a target name in
the header function, is it possible ?


Bye



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




Re: [PHP] Header and Target

2002-08-15 Thread Christian Ista


 That's a HTML thing.  I think you're confusing header() with HEAD/HEAD
I
 believe.

No no

I explaine, I do that :

FRAMESET
  FRAMESET rows=80,*,80
  FRAME src=top.html noresize scrolling=No border=0
frameborder=No
   FRAMESET cols=150,*
   FRAME src=left.html noresize scrolling=No border=0
frameborder=No
   FRAME src=mainpage.html border=0 frameborder=No name=content
   /FRAMESET
   FRAME src=menu.html noresize scrolling=No border=0
frameborder=No
  /FRAMESET
/FRAMESET


I'd like to display all my pages in the frame content. Some times, from
the menu for example, I do a a href=. target=content that it's ok
but sometimes, I call a php page by header( header(Location:
mypage.php); ) but I'd like to display the content in content section
frame.

To do something like that :

www.padeg.be

Bye



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




[PHP] Error

2002-08-15 Thread Christian Ista

Hello,

Could you tell me the signification of this error :

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in
d:\inetpub\wwwroot\TEST\test3\act_language_fr.php on line 20


Bye


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




RE: [PHP] Error

2002-08-15 Thread Christian Ista

 Havn't the foggiest idea what it means, but what has usually happened
is
 that I missed a ; on an earlier line.


That's happen when I include a page. But the strange this, I include the
same page earlier and without any problem.

The content of this page is a lot of variable (string), like that (a
small part) :

$var_login_nom  = 'Last name';
$var_login_prenom   = 'First name';
$var_login_email= 'Email';
$var_login_password1= 'Password (6 char.
min.)';
$var_login_password2= 'Password
(verification)';
$var_login_creer_compte = 'Create a new
account';

Bye




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




[PHP] Destroy session variable when IE close

2002-08-14 Thread Christian Ista

Hello,

Is it possible to set to null (or destroy) the session variables when I
close IE ?

Bye


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




[PHP] Header utilisation problem

2002-08-14 Thread Christian Ista

Hello,

I'd like to know why this code not work :
case   :
include(act_create_new_compte.php);
header(Location: ../manager/index.php);
  break;

I receive this error :
Warning: Cannot add header information - headers already sent by (output
started at
d:\inetpub\wwwroot\website\test2\login\act_create_new_compte.php:31) in
d:\inetpub\wwwroot\ website\test2\login\index.php on line 18

But when I place header(Location: ../manager/index.php);
in the end of the file act_create_new_compte.php and remove the line in
the case, like that :
case :
include(act_create_new_compte.php);
  break;

That's work. 

Could you explain me that ?

Bye



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




[PHP] Destroy session variable when IE close

2002-08-14 Thread Christian Ista

Hello,

Is it possible to set to null (or destroy) the session variables when I
close IE ?

Bye


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




[PHP] Session variable problem

2002-08-13 Thread Christian Ista

Hello,

I'd like to use session variable.

I do that (see below) but I receive an error. Other question, how can I do
to know if a session variable is already defined ?

?php session_start()?
?php$_SESSION[LG] = 'EN';?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
 titletitle
/head
body
/body
/html

But I receive this error :
Parse error: parse error, unexpected T_VARIABLE in
d:\inetpub\wwwroot\test\index.php on line 2

thanks,
Christian,





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




Re: [PHP] Session variable problem

2002-08-13 Thread Christian Ista

 Add a missing space.

ok thanks :)

How use this variable in a query (mysql_query) ?

Is it possible if a session variable is already defined ?

Bye



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




[PHP] parse URL good syntaxe please

2002-08-13 Thread Christian Ista

Hello,

Could you tell me why on PHP 4.2.2 this code work

?php
  switch ($_GET['fuseaction'])
 {
case 0:
print i equals 0;
break;
default:
print i is not equal to 0, 1 or 2;
 }
?

and this one not :

?php
  switch ($fuseaction)
 {
case 0:
print i equals 0;
break;
default:
print i is not equal to 0, 1 or 2;
 }
?

In both cases when fuseaction is not defined, I receive an error. Could you
tell me how to know if the variable is defined in the URL. In coldfusion you
can do cfif isDefined(URL.fuseaction)

but in php ?

Bye



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




[PHP] Re: parse URL good syntaxe please

2002-08-13 Thread Christian Ista


 Could you tell me why on PHP 4.2.2 this code work

My previous mail it was for my development machine, IIS, windows 2000 and
PHP4.2.2.

My host use PHP4.2.2 on linux and that's work.

Could you tell me why this difference ?

Bye



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




RE: [PHP] parse URL good syntaxe please

2002-08-13 Thread Christian Ista

 First of all, you need to use the $_* superglobals if register_globals
is
 off.  That is, to access get variables, you use $_GET['variable_name']

What do you mean by that ? (I'm newbie in PHP)

Bye


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




[PHP] relocation

2002-08-13 Thread Christian Ista

Hello,

Is there a possibility to call (jump not include) with some parameters
(index.php?var1=var2=) a php page without click.

For example :
case todo:
 call here index.php?var1=var2=  --- jump to this page
break;

bye

Christian,


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




[PHP] IP and Language

2002-08-11 Thread Christian Ista

Hello,

I'd like to know if it's possible to redirect a visitor of my website to the
page index.php if he comes from Belgium, France, Luxembourg, Switzerland and
all the others redirect to index_uk.php

Possible ?

Thanks,

Christian,



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




[PHP] Update PHP

2002-06-16 Thread Christian Ista

Hello,

I have a dedied server (with linux RedHat 7.2) and PHP 4.1.2.

I'd like to update to the version 4.2.1

Is it enought :

tar -zxvf phpfile4-2-1.gz

It's the first time I install PHP on linux in general I work on Windows.

Bye



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




RE: [PHP] Update PHP

2002-06-16 Thread Christian Ista

 If you were the person who installed PHP before, then you probably
 remember the process.  It's a configure/make/make install process.


Sure :)

But I rent a dedicated server with all preinstalled, PHP, MySQL ...


Bye



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




[PHP] RE4: Update PHP

2002-06-16 Thread Christian Ista

 Ok, if you're saying you do not have root access, then  you have to
 have someone with root access do it for you.

I have root access :)

 If you are saying that you didn't do it the first time and you don't
 know how, then read the instruction manual or tutorial _very_ closely,
 since it will be your first time.

Well classical answer, don't need newsgroup or mailing list to say that.

Bye




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




RE: [PHP] Update PHP

2002-06-16 Thread Christian Ista

 You may want to do a phpinfo() on your existing installation, to
 determine the configuration directives that were used.  Likely, you
 will want to use the same ones (or nearly the same) with this new
 build.

I have that :

System Linux localhost.localdomain 2.4.7-10BOOT #1 Thu Sep 6 16:15:00
EDT 2001 i686 unknown 

Build Date May 30 2002 

Configure Command  
'./configure' '--with-apache=../apache_1.3.24' '--with-dbase'
'--with-filepro' '--with-xml' '--enable-ftp' '--with-db'
'--enable-bcmath' '--enable-calendar' '--with-jpeg-dir' '--with-png-dir'
'--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir'
'--with-gettext' '--with-pgsql=/usr' '--with-mysql=/usr'
'--with-zlib-dir' '--enable-trans-sid' '--with-imap' '--with-kerberos'
'--with-imap-ssl' '--with-openssl' '--enable-sysvsem' '--enable-sysvshm'


Server API 
Apache 

Virtual Directory Support 
disabled 

Configuration File (php.ini) Path
/usr/local/lib/php.ini 

ZEND_DEBUG disabled 
Thread Safety disabled


Could you explain me a little bit more, how to do ?

Bye


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




[PHP] Session question

2002-05-25 Thread Christian Ista

Hello,

I'm a newbie in PHP, I use a lot ColdFusion (at work).

With ColdFusion, it's very easy to create and use session variable. I do
something like that :
cfset session.myvariable = hello and this variable can be use
everywhere.

Could you tell me how that's work in PHP. I saw in help file session.start.
But it's not very clear for me.

Thanks for your help,

Bye





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




Re: [PHP] Session question

2002-05-25 Thread Christian Ista


 Just be sure you call session_start() on any page you want to access
 session variables.


I have to call this function on each page I use session variable or juste
once ?

 This assumes the latest version of PHP. The procedure is similar on
 older versions, you just have to use session_register().

From wich version session_start() is include ?

Bye



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




[PHP] Query Close

2002-05-01 Thread Christian Ista

Hello,

What's happen if when I used a query, I don't do that :

mysql_close($connection);

Bye





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




[PHP] Re: Query Close

2002-05-01 Thread Christian Ista


 Depends on how you opened it.  Did you use mysql_pconnect or
mysql_connect?

mysql_connect

bye



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




[PHP] HTML in PHP

2002-04-28 Thread Christian Ista

Hello,

I have a newbie question for you.

I do a query, I'd like to display the result but I'd like to go to a new
line for each row.

I use this code that's work :
?php
for ($i = 0; $imysql_num_rows($result); $i++)
  {
   echo mysql_result($result,$i, NAME);
  }
?

but this not work

?php
for ($i = 0; $imysql_num_rows($result); $i++)
  {
   echo mysql_result($result,$i, NAME);br
  }
?

Could you tell me how I can do to have a br after each row.

Thanks for your help :)

Bye