[PHP] How know from wich page you came from

2002-12-10 Thread Rodrigo
Hi guys I need a way to know how to know from wich page the visitor
came, something like:
 
I wanna put in a php file a switch to do a certain action if the visitor
came from a certain page, and something else if he came from a diferent
one, this way I could write, update, insert, delete or anything I need
from a single file.
 
Thanks for any kind of input,
Rodrigo
 



[PHP] Session Login

2003-06-04 Thread Rodrigo
Hi guys I’m trying to build a login system with a diferential for na administration
login and a partner, where a partner would have certain editing rights and the
administrator would have editing rights for all the articles, but I’m having
problems with sessions, and I’d like to know where could I get a good example
of login with session MySql based.



Rodrigo de Oliveira Costa



http://www.ieg.com.br

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



[PHP] parse html code

2002-09-26 Thread Rodrigo

I want to enter an url, get the html code, and obtain from this all the referenced 
urls.
Anybody knows the way to do that?

Bergus



[PHP] Quotes

2001-01-14 Thread rodrigo

I recently came across this problem and I am sure that there is a quick
fix for it. I need a solution to the quotes problem when sending
queries. I use single quotes to construct my SQL queries. This worked
fine since the data entered into the DB was all in spanish.

However, yesterday I was typing in an English name that had a single
quote (say, like O'reilly) and the SQL querie was all wrong.

What is the solution to this? Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 640-0370
Republic of Panama * 


-- 
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] Making sure a class is declared only once

2001-05-12 Thread rodrigo

Someone on the list mentioned a way to check if a classed is already
declared so it will only declare it once. I can't find it in the
archives so if someone knows how to accomplish this I would appreciate
it if you send me the code.

Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Threaded discussion Phorum algorithm

2001-05-23 Thread rodrigo

I need to implement a custom discussion phorum for a news site. I would
like to know what is the most common algorithm to display the message
list threaded and indented. This to accomplish one task: to show the
reply to a post directly below the parent post and so on.

Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Append a line to a text file

2002-04-28 Thread Rodrigo

I need to add a email to the text file that is already written, but I
get the file writen over , so I always get only the last email send by
the form.
 
What I need is a form that get the e-mail and it writes the email at the
end of a text file.
 
Thanx,
 
Rodrigo 



[PHP] Append a line to a Text File

2002-04-28 Thread Rodrigo

I still need to know how to do it, since the "a+" or the "a" give me
problems...
I need to be able to add a line at the end of a text file thru sending
the information (and by this I mean the e-mail to be writen) thru a
form, and this new information should be added to the file at the end of
it without overwriting it.
Thanx,
Rodrigo
 
PS: If possible send a code for instruction. ;)
 



[PHP] append line to text file HELP !!!

2002-04-28 Thread Rodrigo

Ok guys, this is the code and under it you can see what I get when I try
to submit the form. 
 
 

 
 
Warning: Supplied argument is not a valid File-Handle resource in
/home/restricted/home/h4ck3r/public_html/write.php on line 4

Warning: Supplied argument is not a valid File-Handle resource in
/home/restricted/home/h4ck3r/public_html/write.php on line 6 



[PHP] Last time Append line to text file

2002-04-28 Thread Rodrigo

Ok, but I'm trying the following code wich is basicaly the same Miguel
sent me and I still get the same message.
Please excuseme for being so repetitive but Í don't seem to see where is
the mistake, Sorry guys for the trouble.
 

 
 
 
Warning: Supplied argument is not a valid File-Handle resource in
/home/restricted/home/h4ck3r/public_html/write.php on line 4

Warning: Supplied argument is not a valid File-Handle resource in
/home/restricted/home/h4ck3r/public_html/write.php on line 6 



[PHP] How to findout if the file is over

2002-04-29 Thread Rodrigo

I've got the following problem:
 
I'm trying to send a number of messages to a certain number of e-mails,
the e-mails are writen in a text file and I need to findout when the
file is over.
 
The sample code is under this line , if someone can help me, I'd
apreciate it.
 
";
$Assunto = "Assunto do E-mail";
$Mensagem = $Anuncio;
For ($Cont=0; $Cont != feof; $Cont++)
{
$Destino = $Emails[$Cont];
mail($Destino,"Assunto",$Mensagem,"From: $Remetente\n");
}
?>



[PHP] Login with Text Files

2002-04-30 Thread Rodrigo

Hi guys, I'm trying the following code and the problem is that I always
get the denied page... 
What I'm trying here is to make a login thru a text file. The logins are
in one file named login.txt, and the passwords are in the file called
pass.txt . I need Help, I can't seem to get thru here and I need it just
like that, cause the other option would be to use my server database
which uses a PHPMYADMIN that I don't know anything about. I can't seem
to make it work, so let's stay with the text files, cause I don't need
it to be safe ( security sound ). The code goes after this message.
Thanks to all.
Rodrigo. 
 
 
 
http://www.domain.com/restricted/restricted.htm');
}
else
header('Location:http://www.domain.com/denied.htm');
?>



[PHP] Help with Bookmark

2002-05-02 Thread Rodrigo

Hi guys I'm trying to make a online bookmark adress book, this bookmark
adress book, would consist of the following:
 
A text file named name.txt, that would content the name of each of the
users.
 
A text file named pass.txt, that would contain a non-secure password for
each user.
 
A text file for each user named loginbookmarks.txt containing the list
of urls and hopefully an indicator, as in a hash, to call the bookmark
by it's name.
 
That's all, I've figured the first two but I can't seem to make the
third one. Anyone can send me any ideas... Code hopefully.
 
Thanks,
Rodrigo



[PHP] Hashes in text files

2002-05-02 Thread Rodrigo

Can I store Hashes in text files? If yes, how?
 
Can I store a  multi dimensional array in a text file? If not how should
I do to store the data in one file and the "pointer" in another file?
 
Thanx, Rodrigo
 



[PHP] phpMyAdmin

2002-05-03 Thread Rodrigo

Hi guys, I need some help using the phpMyAdmin, I'm trying to create a
table with three fields, one for the indexing of the database, the
second for the logins and the third for the password.
 
I get the following doubts:
 
On the table of the phpMyAdmin there are the following fields:
 
A field for the name of the field.
A field for the kind of information that will be stored in the field
(TINYINT,DOUBLE,TEXT...)
A field for the size of the field.
A field for the atributes of the field (BINARY, UNSIGNED, UNSIGNED ZERO
FILL)
A field for the null option (NULL, NOT NULL).
A field for an information that I don't know...
A field for the Extra(AUTO_INCREMENT).
A selectable field named primary(check it or not).
A selectable field named index(check it or not).
A selectable field named unique(check it or not).
A selectable field named Fulltext(Check it or not).
 
The information that I would need would be what are the configurations
that I have to put in each of these fields.
And also I would need to know a php script to access the fields, and
write to new fields.
 
Thanx, Rodrigo
 



[PHP] phpMyAdmin

2002-05-03 Thread Rodrigo

Hi guys, I need to know the script to insert some fields into the
database.
 
Like this:
 
I need to get from a form the email, login, password and store it on the
database. I'd like to know how this script would be.
Code is apreciated.  ;)
Thanks, Rodrigo



[PHP] Help php MySql link

2002-05-03 Thread Rodrigo

Hi guys, what I need is how to make the link between the php and the
Database.
 
Is this the code for it? ro something like that? Help me guys...
 
If you could tell me what each command line do I'd appreciate it, cause
I got almost all from a friend, but is incomplete.
 
The code follows this message.
 
 
$db = ("localhost","databasename","databasepassword");
mysql_select_db("your name?",$db);
$result = mysql_query("select column1, column2 from domain", $db);
echo "column 1 - column 2";
 



[PHP] Message isn't received in form mailer

2002-05-04 Thread Rodrigo

Hi guys, I'm trying to send the contents of a form thru the php script
under this message, but I'm not receiving the message itself, I just
receive the message in blank. Just with the subject and the from.
Does anybody know what the problem is?
Thanks for the help, Rodrigo
 
 
 
 
mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]";
 $Remetente = "$name <$email>";
 $Assunto = "Form Domain.com";
 $Mensagem = $coments;
 mail($Destino,"$Assunto",$Mensagem,"From:$Remetente\n");
 header("Location:http://www.domain.com/success.htm";);
?>



[PHP] Text file

2002-05-20 Thread Rodrigo

Hi guys:
 
What I need is a php file that will read a text file and show it on a
html file.
 
And it will also write to a text file, but at the end of the file.
 
Thanx, Rodrigo de Oliveira Costa.
 



[PHP] Function

2002-05-21 Thread Rodrigo

Hi guys I’m trying to use a function on na .inc file, how should I do?
 
How should I write the function and what should I write on the file so
that the function file is “Included” to be used on a function call on
the php file?
 
I appreciate any kind of sample code.
 
Thanx,
Rodrigo de Oliveira Costa



[PHP] How do I prevent remote loading of jpegs from my site

2001-10-28 Thread rodrigo

Hello. I run a site that has lots of pictures (jpegs). It is pretty
popular, but some visitors have gotten into the habit of going to forums
and bulletin boards on other sites and making direct links (you know,
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] Preventing remote linking of files

2001-10-28 Thread rodrigo

Hello. I found this on the web after a couple of people who answered my
original request pointed me to it. It is a document that tells you how
to prevento people from inserting files directly from your site,
stealing your bandwidth.

I hope it is useful to you.

http://apachetoday.com/news_story.php3?ltsn=2000-06-14-002-01-PS
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Automatic backup application

2001-06-30 Thread rodrigo

Hello. I was wondering if there was a free app that will:

a) Backup my entire Mysql Database (via a dump, I guess).
b) Backup the entire directory where my pages are, preferrably to a
different location (say a remote server by FTP or Mail).

Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] How to prevent people from downloading images

2001-07-03 Thread rodrigo

This is probably more of a client side programming issue rather than
something that has to do with PHP. But I figure that some of you might
have something meaningful to comment.

I need a way to prevent the download of some images in a web page. I
also require that these images be presented within the web page. That
is, I don' want them to be displayed in another window. They should
remain embedded in the web page along with the rest of the page
elements.

Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Algorithm for repeating calendar events

2001-07-10 Thread rodrigo

Have any of you seen those calendar applications that let you program
events that repeat periodically? You can set it to repeat every
thursday, every week, every third week, every six months, and so on?

I am developing such an application in PHP and I know that the client
will ask for this feature. So in thinking ahead of time, I would like to
know if any of you has had any experience developing such an application
so that you can point me in the right direction.

Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] HTML tags in database fields

2001-07-11 Thread rodrigo

Hello. I wrote a comments application that allows the use of some HTML
tags for text formatting (). I ran into a problem of users not
closing the tags (), so when I display a page with all the
comments, if the user did not close the  tag then all the text in the
other comments is bold.

Is there a solution to this?
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Problems with mail() function

2001-07-11 Thread rodrigo

Hello. I wrote a routine that queries a table (Mysql) to pull about 300
records and record their emails. I iterate over this recorset invoking
the mail() function to send an email for each record in this recordset.

The problem is that on my providers server, there is a big delay before
the script end execution. When it takes too long I hit the "stop" button
on the browser, but when I do this the users receive the same email
twice.

Why is this happening?
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Problems with Mail() and BCC

2001-07-16 Thread rodrigo

I must be doing something wrong with the headers. Can someone send me an
example of how to send a message with multiple addresses as BCCs?

It is a program i wrote that builds the header from multiple email
addresses in a database. The people on the emails are not getting the
message.

Thanks in advance.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] mysql database has gone away

2001-08-30 Thread rodrigo

There is a Mysql error that is driving me mad. My ISP won't claim
resposibility for it and it tells me it is a scrpting error. I don't
agree with them. The error number is 2006, and it seems to restart the
database every now and then.

Please advice me as to what may be causing this problem. The error
message is sent before the headers and it generates an error that stops
script execution. Maybe I can trap the error so the script can continue.

Pleas help.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 612-1103
Republic of Panama * 


-- 
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] Passing arrays as arguments to a method

2001-02-08 Thread rodrigo

Is it possible to pass arrays as arguments to class methods? If so, how?
What is the proper syntax and things to look out for.

Thanks in advanced.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 640-0370
Republic of Panama * 


-- 
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] Form posted?

2001-02-08 Thread rodrigo

Is there a function that can tell me whether a form was posted?

Thank you.
-- 

Ivan R. Quintero E.* (507)228-3477  
Aptdo 1263 * (507)228-9105
Balboa, Ancon  * 640-0370
Republic of Panama * 


-- 
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] PHP with JSP

2002-12-09 Thread Rodrigo Rezende
Hello,

I hava to develop a solution that use PHP and JSP. But the system has to use the same 
session.

I´ve already installed the PHP integration with Java and it works. But I can´t find 
the class to call a session?

Regards

Rodrigo Rezende
PHP Developer


[PHP] Help with Filesize

2003-01-27 Thread Rodrigo Corrêa

How do i use the function filesize, because i´m using like:

I just want associate the variable $body with a html file

$file_name = 'c:/templates/resp_rep_efetiva_contrato.php';
$fd = fopen($file_name,"r");
line 27   $size = filesize($file_name);  / Dá erro aqui
$body = fread($fd, $size);
$mail = mail($address, $subject, $body, $header); 
it keeps saind that:

Warning: stat failed for c://templates/resp_rep_efetiva_contrato.php (errno=2 - No 
such file or directory) in line 27

but, the file exists because the fopen function works ok, I don´t known what to do



Thanks in advance



Equipe Pratic Sistemas
Rodrigo Corrêa
Fone: (14) 441-1700
[EMAIL PROTECTED]
[EMAIL PROTECTED] 
 





[PHP] Calling PHP from Java usign CGI...

2003-06-26 Thread Rodrigo Reyes
Hi all
Has anyone been able to call php from a servlet (JAVA) using CGI
interface? I am trying to do that here, and everything seems to work without
problems, except that no data returns from the execution of my scripts. Any
idea what could be happening? Is there information on how to configure the
CGI variables in order to be able to call PHP? Thanx in advance...

Rodrigo



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



[PHP] Re: Calling PHP from Java usign CGI...

2003-06-27 Thread Rodrigo Reyes
Catalin
I am also quite new to all this. I'll tell you a bit more about what I
am trying to accomplish here. I am working on some project which has a a lot
of code written in PHP and is going to need also a lot of code in JAVA. So,
I was thinking that it would be great if we could have PHP connected to our
servlet container and web server, which is Jetty. I looked in the mailing
lists for info about this, and I found a servlet which connects (or at least
tries) to PHP using CGI (Common Gateway Interface).
The HttpURLConnection is algo a good idea. Still, it would be a lot
better if I could just connect PHP to Jetty the same way PHP connects to
Apache using CGI. Any idea on how to accomplish this? Thanx...

Rodrigo

"Catalin Trifu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I didn't quite understood what you mean by CGI in this case,
> but if you reffer to calling a script which resides on a server via HTTP
> protocol, i suggest you take a look at the java.net.* package, You can
> use the java.net.URLConnection to connect to the PHP script and act
> as a client (like a browser) for it from your servlet.
> You should het the response from the script back through the
> getInputStream()
> ar any other method that suits you.
> Also take a look at java.net.HttpURLConnection which has more
> specific methods for dealing with HTTP.
> Once again, I may have misunderstood you, but I hope this is
> helpfull anyhow.
>
> Cheers,
> Catalin
>
> "Rodrigo Reyes" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi all
> > Has anyone been able to call php from a servlet (JAVA) using CGI
> > interface? I am trying to do that here, and everything seems to work
> without
> > problems, except that no data returns from the execution of my scripts.
> Any
> > idea what could be happening? Is there information on how to configure
the
> > CGI variables in order to be able to call PHP? Thanx in advance...
> >
> > Rodrigo
> >
> >
>
>



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



[PHP] Connecting PHP to Jetty...

2003-06-30 Thread Rodrigo Reyes
Hi all
Has someone been able to have PHP connected to Jetty? Thanx...

Rodrigo



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



[PHP] search in serialized string

2002-08-21 Thread Rodrigo Peres

Hi list, 

I have a form to post resumes. In one parte the user have a option to choose
up to 5 languages and his knowledge in it. example : english: basic advanced

My problem is that was stored serialized in the BD and now I need to do a
search by language and knowledge. How can I do this. I've tried everything
unsuccessfully. example: search english advanced. If the user have english
basic and another advanced he/her appear in the search.

Thank's in advance

Rodrigo


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




[PHP] search in serialized string

2002-08-22 Thread Rodrigo Peres

Hi list, 

I have a form to post resumes. In one parte the user have a option to choose
up to 5 languages and his knowledge in it. example : english: basic advanced

My problem is that was stored serialized in the BD and now I need to do a
search by language and knowledge. How can I do this. I've tried everything
unsuccessfully. example: search english advanced. If the user have english
basic and another advanced he/her appear in the search.

Thank's in advance

Rodrigo


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




Re: [PHP] search in serialized string

2002-08-26 Thread Rodrigo Peres

well, I my opinion is not the way to work, but like I said the work was done
by other guy, and now I have the problem to solve. So i back to old question
:-)
How can I search with some precision in a serialized string?



on 8/24/02 12:13 PM, DL Neil at [EMAIL PROTECTED] wrote:

> Rodrigo,
> 
> Then the question to be asked is: is serialize()ing this data good
> design/technique, or is there a better way?
> 
> Regards,
> =dn
> 
> 


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




Re: [PHP] search in serialized string

2002-08-26 Thread Rodrigo Peres

I mean double ouch!!! :-)

well..

1 no, it's a select for the language ( Rodrigo,
> 
> Inherited problems = ouch!
> 
> Sorry I don't keep old list msgs, perhaps you mentioned this before: does
> the language skills field contain:
> 1 both the language and the skill-level, eg English - Advanced
> 1b what separator is used between the two words?
> 2 more than one language/skill-level where applicable, eg English -
> Advanced, German - Intro.
> 2b what separator is used between language entries?
> 
> What is the database field description in the table schema?
> 
> Please advise,
> =dn
> 
> 
> 
>> well, I my opinion is not the way to work, but like I said the work was
> done
>> by other guy, and now I have the problem to solve. So i back to old
> question
>> :-)
>> How can I search with some precision in a serialized string?
>> 
>> 
>> 
>> on 8/24/02 12:13 PM, DL Neil at [EMAIL PROTECTED] wrote:
>> 
>>> Rodrigo,
>>> 
>>> Then the question to be asked is: is serialize()ing this data good
>>> design/technique, or is there a better way?
>>> 
>>> Regards,
>>> =dn
>>> 
>>> 
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
> 

-- 



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




[PHP] PHP OOP

2002-09-03 Thread Rodrigo Dominguez

I have a problem, I can't create an array of classes into a class, for
example:

class one {
var $a;

function foo() {
echo "foo";
}
}

class two {
var $b;

function initialize() {
$b[0] = new one();
$b[1] = new one();
}
}

$test = new two();
$test->initialize();

$test->b[0]->foo();  //It doesn't work
$test->b[1]->foo();  //It doesn't work

Any suggestion?




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




[PHP] PHP OOP

2002-09-03 Thread Rodrigo Dominguez

I have a problem, I can't create an array of classes into a class, for
example:

class one {
var $a;

function foo() {
echo "foo";
}
}

class two {
var $b;

function initialize() {
$b[0] = new one();
$b[1] = new one();
}
}

$test = new two();
$test->initialize();

$test->b[0]->foo();  //It doesn't work
$test->b[1]->foo();  //It doesn't work

Any suggestion?




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




[PHP] Re: PHP OOP

2002-09-03 Thread Rodrigo Dominguez

I made a mistake while I was writting the example, in my original code I
wrote it as you did, with $this->b[0] = new one(); but it doesn't work.
Thank you.

"Philip Hallstrom" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Not tested, but what if you change
>
>  $b[0] = new one();
>  $b[1] = new one();
>
> to:
>
>  $this->b[0] = new one();
>  $this->b[1] = new one();
>
> On Tue, 3 Sep 2002, Rodrigo Dominguez wrote:
>
> > I have a problem, I can't create an array of classes into a class, for
> > example:
> >
> > class one {
> > var $a;
> >
> > function foo() {
> > echo "foo";
> > }
> > }
> >
> > class two {
> > var $b;
> >
> > function initialize() {
> > $b[0] = new one();
> > $b[1] = new one();
> > }
> > }
> >
> > $test = new two();
> > $test->initialize();
> >
> > $test->b[0]->foo();  //It doesn't work
> > $test->b[1]->foo();  //It doesn't work
> >
> > Any suggestion?
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




Re: [PHP] Uploading file

2002-09-03 Thread Rodrigo Dominguez

You are doing wrong... you are checking for the temp file and after that you
are deleting the temp file, you should copy the files first

This is your code

if(isset($UploadedFile))
{
unlink($UploadedFile); // Here you are deleting the temp file
print("Local File: $UploadedFile \n");
print("Name: $UploadedFile_name \n");
print("Size: $UploadedFile_size \n");
print("Type: $UploadedFile_type \n");
print("\n");
}

You should write something like this


if(isset($UploadedFile))
{
copy($UploadedFile, "/uploaded_files/" . $UploadedFile_name);  // Here
we first copy the temp file to a secure path, you should change the
/uploaded_files/

// path
print("Local File: $UploadedFile \n");
print("Name: $UploadedFile_name \n");
print("Size: $UploadedFile_size \n");
print("Type: $UploadedFile_type \n");
print("\n");

unlink($UploadedFile); // Now we can delete the temp file
}

"Clemson Chan" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thanks Juan, and other listers,
>
> I have this example,
>
> 
> 
> Figure 7-3
> 
> 
>  //check for file upload
> if(isset($UploadedFile))
> {
> unlink($UploadedFile);
> print("Local File: $UploadedFile \n");
> print("Name: $UploadedFile_name \n");
> print("Size: $UploadedFile_size \n");
> print("Type: $UploadedFile_type \n");
> print("\n");
> }
> ?>
>  ACTION="7-3.php" METHOD="post">
> 
> 
> 
> 
>
> 
> 
>
> and the result is this after I uploaded a file
>
> Local File: /tmp/phpnYLV2J
> Name: 323lake.jpg
> Size: 48254
> Type: image/pjpeg
>
> But I couldn't find the uploaded file, nor the /tmp/phpnYLV2J path.
> Do I normally do a copy after the upload?
> Can I just change the tmp path and filename when I upload?
> Thanks.
>
> --Clemson
>
>
>
> -Original Message-
> From: Juan Pablo Aqueveque [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 7:58 AM
> To: Clemson Chan; [EMAIL PROTECTED]
> Subject: Re: [PHP] Uploading file
>
>
> Hi friend,
>
> http://www.php.net/manual/en/features.file-upload.php
> And take a look to the User Contributed Notes
>
> --jp
>
> At 13:03 03-09-2002 -0700, Clemson Chan wrote:
> >Hi, I am new to this group.
> >I am trying to figure out how to let people to upload image files to my
> >website.
> >My ISP is using PHP 3 (I believe).
> >If someone can give me simple example, that will be great.
> >Thanks.
> >
> >--Clemson
> >
> >How can I tell what version of PHP is running on the system (linux)?
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> 
> Juan Pablo Aqueveque <[EMAIL PROTECTED]>
> Ingeniero de Sistemas
> Departamento de Redes y Comunicaciones http://www.drc.uct.cl
> Universidad Católica de Temuco.
> Tel:(5645) 205 630 Fax:(5645) 205 628
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




Re: [PHP] XML vs Everything Else

2002-09-03 Thread Rodrigo Dominguez

I'm writting an application, a control panel for a web site, and it will be
great if I can separe data from presentation, I know that I have to work
with XML and XSL but I didn't understand how it works.

Can you give me a simple example?

Let guess that a client request index.php, and I have index.xml for the
data, index.xsl for the data transformation and index.php, how it works?

"Geoff Hankerson" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> >Can anyone direct me to a page with xml in use? Something that can help
me
> >grasp what its all about.
> >
> >
> >
>
> I didn't understand xml at all until I started using it . I  asked
> pretty much the same question as you (what is it good for?). Now I will
> almost always use xml in any app I work on.
>
> One application that is simply wonderful is xsl transformations. This
> allows you to take xml and transform it into html, wml, pdf, rtf , etc...
>
> What this ultimately means to me is seperation of presentation from
> logic and data which makes for a very flexible and easy to maintain
> application.
>
> I have made a php class to make a database query into xml in the form of:
>  value 
>
> Now stuff I used to do that took a whole page to code nows uses about 5
> lines. This is a real world benefit for me.
>
> Spend some time learning about xml and you won't regret it
>



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




[PHP] Re: Pass array in HTTP_POST_VARS question

2002-09-04 Thread Rodrigo Dominguez

If you are in a session you can register the array and it will be available
on the next page, once you finish working with the array, just unregister
the array.

File1.php   action= file2.php
session_start();
session_register("foo");
var $foo = array();

File2.php
session_start();
Work with $foo
session_unregister("foo");


"Paul Maine" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it possible to pass an array in a form post? If so, how do I reference
> the array on the next page?
>
> Thank You
> Paul
> php
>



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




[PHP] XML doubt

2002-09-04 Thread Rodrigo Dominguez

I don't know how to work with XML... I know that it's a good standard to
pass information between computer or applications, but I don't know how to
separe my data from my presentation on my PHP projects.

I always use OOP, I organize all the data in databases and clases, but I
always have to put some code on my presentation files, like index.php,
viewstock.php, and it will be great if I can organize my projects so the
presentation can be handled by any designersm, at this time I always have to
make the changes on the presentation files because I am the one who know
about PHP.

Can you give some example about how to separate the data from the
presentation using XML and databases? Or can you tell me about a project
where I can see it?

Thank you.



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




Re: [PHP] XML doubt

2002-09-04 Thread Rodrigo Dominguez

Ok, thank you just one more doubt
Is it threading safe?

For example:
At 13:30:10 [Proccess 1] cliente request index.php
At 13:30:11 [Proccess 1] index.php is putting the content of the querey into
index.xml
At 13:30:12 [Proccess 2]a new client request index.php
At 13:30:13 [Proccess 2]a new instance of index.php is invoked and it starts
to put the content of the query into index.xml, but [Proccess 1] is still
working with index.xml

What happends?

"Geoff Hankerson" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Forgot a step: (1C) make an xslt stylesheet which is basically just a
> beefed-up html page.
> Check out devshed.cm
> xml.com
> and w3c.org for info on xslt stlyesheets
>
> Geoff Hankerson wrote:
>
> > Rodrigo Dominguez wrote:
> >
> >> I don't know how to work with XML... I know that it's a good standard
to
> >> pass information between computer or applications, but I don't know
> >> how to
> >> separe my data from my presentation on my PHP projects.
> >>
> >> I always use OOP, I organize all the data in databases and clases, but
I
> >> always have to put some code on my presentation files, like index.php,
> >> viewstock.php, and it will be great if I can organize my projects so
the
> >> presentation can be handled by any designersm, at this time I always
> >> have to
> >> make the changes on the presentation files because I am the one who
know
> >> about PHP.
> >>
> >> Can you give some example about how to separate the data from the
> >> presentation using XML and databases? Or can you tell me about a
project
> >> where I can see it?
> >>
> >> Thank you.
> >>
> >>
> >>
> > 1. Convert sql queries into xml (I'm glad to send a copy of my class
> > if you'd like)
> >basically its:
> >A. Loop over query as you normally would
> >B. Loop through each column in a record for a query and make an xml
> > compatible string like:
> >
> > value 
> >
> > 2. Then just follow the xslt section of the php manual it's pretty
> > straight forward
> >
> > Give it a shot, if  you have trouble send specific questions to the
> > list I and quite a few other will be glad to help
> >
>
>
>



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




[PHP] PHP e GD big files

2002-09-05 Thread Rodrigo Peres

Hi,

I'm using GD to put a dinamic text in some buttons. The problem is that the
original image that I use has 8k and after i put a black text it jumps to
20K. What I'm doing wrong? there's a way to compact this?

Thank's
-- 



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




[PHP] sort dinamic generated table

2002-09-05 Thread Rodrigo Peres

Hi,

I have a resume system that put a rank in it resume at runtime. example: If
you do a serach for each match that it finds it atribute 1 point, now I need
to sort the generated list based in this rank, how can i do this, since this
rank is dinamic and isn't in database??

Thank's


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




[PHP] Re: checkbox question

2002-09-08 Thread Rodrigo Dominguez

Why you can't use square brackets?
"Alex Shi" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
>
> Alex
>
>
> --
> ---
> TrafficBuilder Network:
> http://www.bestadv.net/index.cfm?ref=7029
>



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




[PHP] wrong date

2002-09-26 Thread Rodrigo Meurer

Hi!

Someone knows why is this returning 1969-12-31 ???

$day = 13;
$month = 10;
$year = 2002;
echo date("Y-m-d",mktime (0,0,0,$month,$day,$year)); 

And MySQL also does the same when I insert '2002-10-13' in a date field!!!

::: R o d r i g o M e u r e r  
   [EMAIL PROTECTED]
B a s e 5 1 - W e b p r o j e c t s
Tel 51 3332.8813 / Fax 51 3321.1405
: : :www.base51.com.br: : : 

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




[PHP] php mail()

2002-10-14 Thread Rodrigo Peres

Hi list,

I trying to send mail using PHP's mail() function without success. My email
is rejected because it goes with apache@localhost. I've tried everything put
a diferent from in header etc.

Does anyone have a clue

My system is a RedHAT 7, PHP4.2.3, sendmail

thank's n advance


-- 



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




[PHP] protect code or something like..

2002-06-14 Thread Rodrigo Peres

Hi list,

I have a project that was develop in a partnership, now this partners
doesn't so partners anymore :-/
My question is there's a way to create a protection that I can trace if the
software was installed in other servers?? I mean not hide the code, but put
an important include of the project in another server and generate a log of
the acess to it, or anything that can "tell me" who is installed and running
the system.

Thank's

Rodrigo



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




[PHP] How to use file() function with an "HTTPS:\\www.example.com"

2003-09-17 Thread Rodrigo Nakahodo
How to use file() function with an "HTTPS:\\www.example.com"

https://www.example.com/');

 foreach ($lines as $line_num => $line) {
echo "Line #{$line_num} : " . htmlspecialchars($line) . "\n";
 }

?>

Thanks a million!

Rodrigo Nakahodo
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003

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



[PHP] CURL - SSL

2003-09-17 Thread Rodrigo Nakahodo
Anyone knows how to get a simple(HTML) https response using CURL session.

Thanks a million!!


Rodrigo Nakahodo
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003

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



[PHP] Re:Form CheckBox question

2003-09-18 Thread Rodrigo Webler
If you've echo-ed or printed an Array value, yes, you'll get 'Array' as 
result, try to var_dump the value, and check if it isn't all well.

Rodrigo

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



[PHP] Create a table with more than 1 column

2001-12-27 Thread Rodrigo Peres

Hi list,

I am in a big trouble. My deadline is coming and I couldn't solve my problem
yet! I have this script that outputs a table that can be seen at
http://www.celebnet.com.br/abc.php

$ultletra = '';
$row = '';
while($resultado = $query->dados()) {
$curletra = $resultado['letra'];
if($curletra != $ultletra) {
if (!empty($row)) {
   $row .= "\n";
}
$row .= "\n\n\n\n\n";
}
$row .= "".$resultado['Nome_Artistico']."\n";
$ultletra = $curletra;
}
if (!empty($row)) {
   $row .= "\n";
}

SQL is:

SELECT 
categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico,
lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN
celebridades ON categorias.CategoriaID=celebridades.Categoria  WHERE
CategoriaID='1' ORDER BY Nome_Artistico

My problem is that I need to modify the script to output a 3 column table. I
have tried everything but nothing works, and I've tried also all url about
PHP that i could found. Please I'll appreciate any help.

Thank's in advance and happy new year to all!!!

Rodrigo Peres (Brazil)


-- 
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] PHP and Images stored in mysql

2002-01-09 Thread Rodrigo Peres

Hi list,

I have some images stored in a blob in mysql. I've made this code to output
them to html, but the problem is if there's no image at a given id the page
tooks a long time to load and display the "broken image", there's a way to
avoid this, I mean, there's a way to print a message or another image if
there's none in mysql ???

executa($sql);
$resultado = $query->dados();
mysql_close();

$imagem_banco = $resultado['Imagem_data'];
$type = $resultado['Imagem_type'];
if($imagem_banco != "") {
HEADER("Content-type: $type");
echo($imagem_banco);
}
}
?>

Thank's in advance

Rodrigo
-- 



-- 
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] echo diferent coluns from left join

2002-01-10 Thread Rodrigo Peres

Dear List,

I have this sql command that grabs a result of 3 tables. What i want is if
there's a way to do a while printing the site and url and after it's finish
begin, printing site_2 and url_2.

SELECT celebridades.*, links_relacionados.Nome_Link as
site,links_relacionados.Url_link as url, fanclubes.Nome as
site_2,fanclubes.Site as url_2

 FROM celebridades LEFT JOIN links_relacionados ON
links_relacionados.CelebID=celebridades.CelebID LEFT JOIN fanclubes ON
fanclubes.CelebID=celebridades.CelebID WHERE celebridades.CelebID='$celebID'

Thank's in advance

Rodrigo Peres


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




Re: [PHP] echo diferent coluns from left join

2002-01-10 Thread Rodrigo Peres

Sorry, Ithink that I not explain right. I nedd to create a list, something
like:

url site 
url site 
url_2 site_2 
url_2 site_2 

When the values returned by url and site finished them proceed to url_2 and
site_2 values.

Thank's

Rodrigo





on 1/10/02 3:16 PM, Miles Thompson at [EMAIL PROTECTED] wrote:

> 
> If I understand you correctly, use Javascript to open a second browser
> window for url_2.
> 
> Miles Thompson
> 
> At 02:49 PM 1/10/2002 -0200, Rodrigo Peres wrote:
>> Dear List,
>> 
>> I have this sql command that grabs a result of 3 tables. What i want is if
>> there's a way to do a while printing the site and url and after it's finish
>> begin, printing site_2 and url_2.
>> 
>> SELECT celebridades.*, links_relacionados.Nome_Link as
>> site,links_relacionados.Url_link as url, fanclubes.Nome as
>> site_2,fanclubes.Site as url_2
>> 
>> FROM celebridades LEFT JOIN links_relacionados ON
>> links_relacionados.CelebID=celebridades.CelebID LEFT JOIN fanclubes ON
>> fanclubes.CelebID=celebridades.CelebID WHERE celebridades.CelebID='$celebID'
>> 
>> Thank's in advance
>> 
>> Rodrigo Peres
>> 
>> 
>> --
>> 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]




Re: [PHP] PHP and Images stored in mysql

2002-01-10 Thread Rodrigo Peres

How can I echo an image from other location than the mysql using this kind
of script?? since I'm using php to output the image from database, there's a
way to change it to a ftp link for example if image doesn't exists??

this is my script:

executa($sql);
$resultado = $query->dados();
mysql_close();

$imagem_banco = $resultado['Imagem_data'];
$type = $resultado['Imagem_type'];
if($imagem_banco != "") {
HEADER("Content-type: $type");
echo($imagem_banco);
}
}
?>

and I call it from my page with .

Thank's

Rodrigo


on 1/9/02 9:16 PM, Bogdan Stancescu at [EMAIL PROTECTED] wrote:

> My way around this is using two fallback stages: for one you test
> mysql_num_rows() after performing the query. If that's 0, use a default image
> placed in the database beforehand. If that also returns a null
> mysql_num_rows()
> then echo an image (probably the same default) from a known location in the
> filesystem.
> 
> HTH
> 
> Bogdan
> 
> Rodrigo Peres wrote:
> 
>> Hi list,
>> 
>> I have some images stored in a blob in mysql. I've made this code to output
>> them to html, but the problem is if there's no image at a given id the page
>> tooks a long time to load and display the "broken image", there's a way to
>> avoid this, I mean, there's a way to print a message or another image if
>> there's none in mysql ???
> 

-- 



-- 
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] PHP 4.1.1 and Mac OS X 10.1.2

2002-01-15 Thread Rodrigo Peres

Hi all,

Does anyone have success in compiling PHP 4.1.1 in MacOS X 10.1.2?
If yes, could please give some directions? After many tries I surrended
miself and start using the pre compiled package that came with X.

Thanks

Rodrigo
-- 



-- 
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] get image from DB problem

2002-01-25 Thread Rodrigo Peres

List,

I'm using the following code to retrieve image from Mysql. My problem is how
can I output another image if the given ID doesn't have an image on it??? I
had already inserted a blank gif in the database in order to use it, but
I've tried to check if ($resultado['Imagem_data'] == "") or  null and
outputs the blank gif, but didn't work.


$conexao = new conexao();
$query = new Query($conexao);
$sql = "SELECT Imagem_data,Imagem_type FROM imagens WHERE
CelebID='$celebID'";
$query->executa($sql);
$resultado = $query->dados();
$imagem_banco = $resultado['Imagem_data'];
$type = $resultado['Imagem_type'];
if($imagem_banco != "") {
HEADER("Content-type: $type");
echo($imagem_banco);
}

Thank's

Rodrigo



-- 
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] get image from blob in mysql

2002-01-26 Thread Rodrigo Peres

List,

I'm using the following code to retrieve image from Mysql. My problem is how
can I output another image if the given ID doesn't have an image on it??? I
had already inserted a blank gif in the database in order to use it, but
I've tried to check if ($resultado['Imagem_data'] == "") or  null and
outputs the blank gif, but didn't work.


$conexao = new conexao();
$query = new Query($conexao);
$sql = "SELECT Imagem_data,Imagem_type FROM imagens WHERE
CelebID='$celebID'";
$query->executa($sql);
$resultado = $query->dados();
$imagem_banco = $resultado['Imagem_data'];
$type = $resultado['Imagem_type'];
if($imagem_banco != "") {
HEADER("Content-type: $type");
echo($imagem_banco);
}

Thank's

Rodrigo
-- 



-- 
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] create xml document with PHP

2002-01-29 Thread Rodrigo Peres

Hi list,

I'm new to the xml world, and I need to create a page with data retrieved
from my database using PHP. The process is the same of create an html page??
I mean I can use echo to output the xml tags and values?? Since this page
will be dinamically generated what kind of headers I need to use to this
page become an xml???
I saw many docs in web but all about parse an xml, but not in how to build
one.
-- 



Thank's in advance

Rodrigo


-- 
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] browser reload button

2002-02-14 Thread Rodrigo Peres

Hi list,

I've made a log to my site, that counts the hits per page. My problem is,
there is some way to detect when the user presses the reload button?? I need
this, or other suggestion, in order to prevent the log to input data for the
reload, that isn't a real visit.

My script is just a insert into a table, and I put it in the beggining of my
page with require();

Thank's in advance

Rodrigo Peres
-- 



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




[PHP] session problem

2002-02-14 Thread Rodrigo Peres

Hi list,

I've made this script in order to solve the problem with reload button that
I've posted. My idea is to register in a session the id, them check if it
exists, if so don't insert again. But even if I quit the browser the session
persists. Why?? ps: this is an include in the main page where I use
session_start();

if(!$visita) {
$visita = array();
}
if(!in_array($celebID,$visita)) {
$sql_log = "INSERT INTO log_hits
(logID,log_date,log_ip,log_referrer,log_celeb,log_url)
VALUES('',now(),'$REMOTE_ADDR','$HTTP_REFERER','$celebID','$REQUEST_URI')";
$query_log = new Query($conexao);
$query_log->executa($sql_log);
array_push($visita,$celebID);
session_register('visita');
}

Thank's

Rodrigo
-- 



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




[PHP] My Session don't expire

2002-02-16 Thread Rodrigo Peres

Hi list,

I'm using IE5 on Mac with MacOS 9.2.2.
I've made a script that use session_register(), but even when I quit the
browser the values registered with session still there.
Ex: I run the script, quit the browser, reopen it and do an echo($myvar)
and, the value is there, didn't expire.
How can I correct this???

Thank's in advance

Rodrigo Peres
-- 



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




[PHP] Change gif image with php

2002-02-16 Thread Rodrigo Peres

Hi list

I have some buttons made in photoshop in .gif format. This buttons have
round corner, feather, multiple colors etc. There's a way to open it with
php and write some text to it. I know that is possible to create images, but
what about to change them??? I need to do this because the text that will
fill the buttons come from mysql and change everyday.

Thank's in advance


Rodrigo


ps: If someone want to see the button I'm talking look in
http://www.celebnet.com.br/home.php under the "AS ++".


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




[PHP] include() and require() problem

2002-04-19 Thread Rodrigo Peres

List,

I'm trying to include some .inc files in my project, but I got errors 
all time saying that this includes couldn't be found. I'm a newbie, so I 
can't understand what's happend, since it worked pretty good in my local 
machine and not in the ISP. I tried to speak to ISP many times but they 
couldn't solve to.
My directorie structure is : HRM(directorie)->includes(directorie)->my 
inc files(to be included in files that is in the directorie HRM).

Thank's

Rodrigo


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




[PHP] multidimensional array

2002-04-19 Thread Rodrigo Peres

Hi list,

In order to avoid many left joins I took an aproach that I didn't know 
if it's good, but I couldn't figure out another way. If my cliente has 
10 phone numbers I buld an array, serialize it and store in database, so 
I didn't have to create another table. The problem is now I need to 
migrate the data to this format, how can I select the multiple data and 
put in multidimensional array at runtime to store again. for example I 
need to put all fileds with graduation and all fields with discipline 
with equal id in array named school serialize it and after insert in 
another table.

Thank's

Rodrigo


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




[PHP] multidimensional array

2002-04-19 Thread Rodrigo Peres

Hi list,

In order to avoid many left joins I took an aproach that I didn't know
if it's good, but I couldn't figure out another way. If my cliente has
10 phone numbers I buld an array, serialize it and store in database, so
I didn't have to create another table. The problem is now I need to
migrate the data to this format, how can I select the multiple data and
put in multidimensional array at runtime to store again. for example I
need to put all fileds with graduation and all fields with discipline
with equal id in array named school serialize it and after insert in
another table.

Thank's

Rodrigo



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




[PHP] read text file into mysql

2002-04-24 Thread Rodrigo Peres

Hi list,

I need to read a txt file and insert it lineas a record in mysql.
My list in the format
aa|b | cc |
fff|hhdhdhdh|jsjjsjs

in other words my separator is "|" and the lines have a return at the end of
each one.

I'm new to PHP, so can anyone help me with and Idea???

thank's in advance

Rodrigo
-- 



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




[PHP] using html select as array

2002-04-25 Thread Rodrigo Peres

Hi list,

In my system I have multiples choices of language that user selects 
using drop down menus. So I've named this dropdows language[] and grab 
it as php array, and with looo i insert it into mysql as registers. But 
now i need to put a text field that the user can type any language that 
is not in the dropdown. my question is how can i know when this was 
typed when i do the select to update the user itens. I mean, when i 
select and populate your preferences to update, how can i know that this 
info is from the input text???


Thank's

Rodrigo


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




[PHP] build array dinamicaly

2002-04-29 Thread Rodrigo Peres

Hi list,

I want to buil an multidimensional array with the results of Mysql, but I
don't know how to do it.
What I need is:
"SELECT name,adress from tbl_."

array name will receive the names
array adress will receive the adresses
and array clientes will contain both, so when i try to access i will have
something like $cliente['nome'][0] or $clientes['adress'][1] and so on.

Someone can help???

Thank's in advace

Rodrigo Peres


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




[PHP] file() and macintosh line break

2002-05-01 Thread Rodrigo Peres

Hi list,

I'm in a problem that is driving me crazy!!! I want open a file and puts 
each line into an array, but this files was created in macintosh!! so 
the file() can't recognize the end line and only outputs 1 element in 
array!! How can I solve it. I tried to fread() the file and 
eregi_replace the line breaks, it worked, but now I don't know how to 
use this to create the array!

Thank's in advance

Rodrigo


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




[PHP] php to generate statiscs

2002-06-02 Thread Rodrigo Peres

Hi list,

Sorry if this is a off-topic, but I really don't know where to begin. I 
have a mysql database with about 20.000 records, now I need to build a 
statistics panel to show for example how many of this record are male, 
female, lives in determinated city, school graduation etc, everything 
grouped by sex and alone too, present the respectives percentages etc... 
How do I begin??? Can someone help??

thank's in advance

Rodrigo Peres


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




Re: [PHP] php to generate statiscs

2002-06-03 Thread Rodrigo Peres

Does anybody knows the link to this article or other that treats something
like this. I couldn;t find it in devshed.

Rodrigo


on 6/2/02 3:57 PM, John Holmes at [EMAIL PROTECTED] wrote:

> Look into cross-tab queries (I think that's what they are called). There
> is a good article on Devshed.com about it. You can do a query like this
> 
> SELECT SUM(IF(Gender='M'),1,0)) AS Male, SUM(IF(Gender='F',1,0)) AS
> Female FROM table
> 
> That'll give you two columns, one named Male, one named Female, in the
> result set. The result set will have one row, containing the number of
> males in the database in the Male column, the number of females in the
> database in the second.
> 
> You could probably do the majority of your "statistic" queries this way.
> 
> ---John Holmes...
> 
>> -Original Message-
>> From: Rodrigo Peres [mailto:[EMAIL PROTECTED]]
>> Sent: Sunday, June 02, 2002 2:02 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] php to generate statiscs
>> 
>> Hi list,
>> 
>> Sorry if this is a off-topic, but I really don't know where to begin.
> I
>> have a mysql database with about 20.000 records, now I need to build a
>> statistics panel to show for example how many of this record are male,
>> female, lives in determinated city, school graduation etc, everything
>> grouped by sex and alone too, present the respectives percentages
> etc...
>> How do I begin??? Can someone help??
>> 
>> thank's in advance
>> 
>> Rodrigo Peres
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 



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




[PHP] php mysql_num_rows problem

2002-02-27 Thread Rodrigo Peres

Hi list,

I have a class to perform my tasks to bd, among than there's this function

function executa($sql="") {
if($sql == "") {
$this->resultado = 0;
$this->numrows = 0;
$this->row = -1;
}
$this->resultado = mysql_query($sql,$this->conexao->id);
$this->numrows = mysql_num_rows($this->resultado);
}
everything works fine, except when I tri to insert a record. It inserts, but
give an error

"Warning: Supplied argument is not a valid MySQL result resource in
/home/restricted/home/papagaiodigital/public_html/recrutamento/includes/clas
sesql.inc on line 22"

line 22 is "$this->numrows = mysql_num_rows($this->resultado);"

what's the problem??

Thank's n advance

Rodrigo Peres
-- 



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




[PHP] PHP vs object.record set

2002-03-07 Thread Rodrigo Peres

Hi list,

I'm new to PHP, but I found it greate. But I have a question. Recently I've
saw a friend using asp and the object record set seems perfect, I mean the
function to count records, navigate in throw record (back and forth)
everything automatic is amazing. There's a way, to implement such things in
PHP??

Thank's in advance

Rodrigo
-- 



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




[PHP] bug???

2002-03-07 Thread Rodrigo Peres

Hi list,

I'm developing an CMS, and I started a session with PHP 4.1.1
With I use this in javascript "alert(document.forms[0].elements[0].name)"
it returns "PHPSESSID" and if i use
"alert(document.forms[0].elements[0].value)", it returns a number.

It's a bug???

I'm using IE5 in macos 9.2.2

Thank's in advance

Rodrigo
-- 




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




[PHP] bug with session or normal procedure???

2002-03-08 Thread Rodrigo Peres

Hi list,

I'm developing an CMS, and I started a session with PHP 4.1.1
With I use this in javascript "alert(document.forms[0].elements[0].name)"
it returns "PHPSESSID" and if i use
"alert(document.forms[0].elements[0].value)", it returns a number.

It's a bug???

I'm using IE5 in macos 9.2.2

Thank's in advance

Rodrigo
-- 




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




[PHP] dynamic query string

2002-03-11 Thread Rodrigo Peres

Hi list,

I have my data distribuited across 3 tables, that I'm using left join to
retrieve data from them. Now I need to make a search system in this tables
and I like, if possible, that someone can send me tips in how is the best
way to concatenate the query string in order to do the search. The users
will have about 8 types of options to search, age (18 - 25, 25-30..),
gender, nationality.

Thank's


Rodrigo
-- 



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




[PHP] php array

2002-03-12 Thread Rodrigo Peres

Hi list,

I think this could be an idiot question but I couldn't find an answer.
I have 4 input text in a html, and I'd like to store them as a list, so I've
named it Name[]. OK, php understand it as an array, but how can I make an
validation code with javascript to know if the user didn't typed in this
fields??? I couldn't do javascript recognize my name[] field


Thank's in advance

Rodrigo
-- 



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




[PHP] PHP regular expression

2002-03-12 Thread Rodrigo Peres

Hi list,

I have a huge text file with many text on it. I'd like to know if someone
can help in construct a regular expression to delete everything that not
have this pattern "Email: [EMAIL PROTECTED]". The part "Email: " is fixed
and the email adress changes. I've tried many time to make the replace with
PHP, but I'm very new to regular expression.

Thank's

Rodrigo
-- 



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




[PHP] Saving data with cookies

2002-03-17 Thread Rodrigo Peres

Hi list,

I'm developing a system to store Resumes, since my form has a lot of fields,
about 70, i'd like to have the ability to save the filled ones if my user
wants to finish it later. Wha'ts the best way to implement this kind of
feature. Maybe I could use cookies, right?!?!? If so, how can I store this,
multiples cookies, one big cookie, like an array?? this is possible??

Thank's in advance

Rodrigo Peres


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




[PHP] serialize()

2002-03-27 Thread Rodrigo Peres

Hi list,

I've already look at the php manual but couldn't figure out a way to use
serialize to solve my problem.
I have a form, with many fields like (name, age, adress, state), that I put
a save button. This button allows my user to save the fields already filled
in order to finish the form later. I thought in get the values submited by
the save button and store it as cookie, them read it back later, but how can
I store the fields in cookie with serialize and use it later to complety my
fields again???

Thanks

Rodrigo
-- 



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




[PHP] setcookie with array (was serialize)

2002-03-28 Thread Rodrigo Peres

Hi list,

Regarding my last post about serialize, I've tried many things but couldn't
make it function.

I'm trying to store the data from a form in order to allow my user to stop
the process of filling the form and retrieve later what was inserted before.

Among many other thing I tried this little script only to test but didn't
work. why??

if(isset($submit)) {
$x = addslashes($HTTP_POST_VARS);
$y = serialize($x);
setcookie("posted",$y)
}
if($posted) {
$w = unserialize($posted);
$j = stripslashes($w);
echo(count($j));
}

The script aways returns 1, but I've submited 10 values.

Thank's in advance

Rodrigo


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




[PHP] mail to authenticated smtp on WIN2K

2002-04-04 Thread Rodrigo Figueiredo

Hi,

I've tried the following script:

on PHP 4.1.2-32 with Apache on a Win2k machine.
The ISP smtp is known as "smtp" in the Outlook send server acct and the smtp
server requires requires authentication. If I ping it, I get the real smtp
name, let's say ssmtp.domain.com, so I tried in php.ini (at the system dir):

SMTP = smtp
sendmail_from = [EMAIL PROTECTED]

or

SMTP = ssmtp.domain.com
sendmail_from = [EMAIL PROTECTED]

Neither option makes the above script work. Nor the numeric IP address
itself. I get "Server Error" response. I suspect this is because of the
authentication requirement. If this is so, is there a way to specify this
authentication either in php.ini or in the script?

Any input is greatly appreciated.  Thanks.

Rodrigo




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




[PHP] session unset or unregister??

2002-04-11 Thread Rodrigo Peres

Hi list,

I'm in a serious trouble that I couldn't figure out an escape. I have
basically to html pages that pass variables to each other by get method. So
I register some vars in sessions. in one o this pages i have.

if(isset($HTTP_GET_VARS['erase_data'])) {
session_unregister('data');
}

but the code doesn't erase the var from session, and If i use
session_unset('data') it erases all vars from session, that I don't want to.
How to solve this?!??! i have started the session and used
session_register('data','id').. to store the vars.

Thank's in advance

Rodrigo


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




[PHP] Problem with non us caracters and "strtr"

2001-11-01 Thread Rodrigo Peres

Hi list,

I'm in a big trouble. I'm brazilian, so I've made a script to clean up the
special caracters from our language in order to not mess up my publisher,
but this script don't work in Macintosh (macos 9.1, IE 5, all in american
english).

This is my code




What happens is if i try for example to clean up "São Paulo" it prints "são
paulo". Why??
The "$name" will receive a string form a text field in a form. my html
charset is iso-8859-1

Thank's in advance

Rodrigo Peres


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




Re: [PHP] Re: Problem with non us caracters and "strtr"

2001-11-02 Thread Rodrigo Peres

I've tried the recode(), but I think I didn't uderstand it's functionality,
since nothing happens. can someone has an idea in how to convert for example
a string posted by a form in this format "são paulo" to this "sao paulo"??
Does anyone knows how Macintosh's browsers send this special caracteres to
PHP???

Thank's again

Rodrigo Peres




on 11/1/01 9:17 PM, Yasuo Ohgaki at [EMAIL PROTECTED] wrote:

> Rodrigo Peres wrote:
> 
>> Hi list,
>> 
>> I'm in a big trouble. I'm brazilian, so I've made a script to clean up the
>> special caracters from our language in order to not mess up my publisher,
>> but this script don't work in Macintosh (macos 9.1, IE 5, all in american
>> english).
>> 
>> This is my code
>> 
>> 
>> > function myclean(&$name) {
>> $name = strtolower(strtr($name,
>> "áéíóúàèìòùäëïöüâêîôûãçÁÉÍÓÚÀÈÌÒÙÄËÏÖÜÂÊÎÔÛÃÇ ",
>> "aeiouaeiouaeiouaeiouacAEIOUAEIOUAEIOUAEIOUAC"));
>> return $name;
>> }
>> $temp = myclean($name_actor);
>> echo($temp);
>> ?>
>> 
>> What happens is if i try for example to clean up "São Paulo" it prints "são
>> paulo". Why??
>> The "$name" will receive a string form a text field in a form. my html
>> charset is iso-8859-1
> 
> 
> I think you are better to use recode extension for this.
> Check out recode manual page.
> 
> --
> Yasuo Ohgaki
> 

-- 



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




Re: [PHP] Re: Problem with non us caracters and "strtr"

2001-11-02 Thread Rodrigo Peres

I need to transalte the chars because the system will create folder
automatically, base in the name entered in this fields, so if it contains
illegal chars

Rodrigo



on 11/2/01 11:10 AM, Stefan Rusterholz at [EMAIL PROTECTED] wrote:

> I have little experience with this kind of problem.
> None of the Browsers I used under mac (IE 4 - 5 and sever NS 4.x) has sent
> the data different than Windows Browsers. But avoid the meta-tag charset. I
> had serious problems when the HTML-file where the form data came from had
> that tag set (but I didn't spend a lot of time investigating it).
> 
> Anyway: why do you want to translate a ã to an a?
> I made good experiences with storing original chars and using htmlentities()
> (or otherway round if you don't have to edit that stuff)
> 
> Stefan Rusterholz, [EMAIL PROTECTED]
> --
> interaktion gmbh
> Stefan Rusterholz
> Zürichbergstrasse 17
> 8032 Zürich
> --
> T. +41 1 253 19 55
> F. +41 1 253 19 56
> W3 www.interaktion.ch
> ------
> 
> - Original Message -
> From: "Rodrigo Peres" <[EMAIL PROTECTED]>
> To: "Yasuo Ohgaki" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, November 02, 2001 2:51 PM
> Subject: Re: [PHP] Re: Problem with non us caracters and "strtr"
> 
> 
>> I've tried the recode(), but I think I didn't uderstand it's
> functionality,
>> since nothing happens. can someone has an idea in how to convert for
> example
>> a string posted by a form in this format "são paulo" to this "sao paulo"??
>> Does anyone knows how Macintosh's browsers send this special caracteres to
>> PHP???
>> 
>> Thank's again
>> 
>> Rodrigo Peres
>> 
>> 
>> 
>> 
>> on 11/1/01 9:17 PM, Yasuo Ohgaki at [EMAIL PROTECTED] wrote:
>> 
>>> Rodrigo Peres wrote:
>>> 
>>>> Hi list,
>>>> 
>>>> I'm in a big trouble. I'm brazilian, so I've made a script to clean up
> the
>>>> special caracters from our language in order to not mess up my
> publisher,
>>>> but this script don't work in Macintosh (macos 9.1, IE 5, all in
> american
>>>> english).
>>>> 
>>>> This is my code
>>>> 
>>>> 
>>>> >>> function myclean(&$name) {
>>>> $name = strtolower(strtr($name,
>>>> "áéíóúàèìòùäëïöüâêîôûãçÁÉÍÓÚÀÈÌÒÙÄËÏÖÜÂÊÎÔÛÃÇ ",
>>>> "aeiouaeiouaeiouaeiouacAEIOUAEIOUAEIOUAEIOUAC"));
>>>> return $name;
>>>> }
>>>> $temp = myclean($name_actor);
>>>> echo($temp);
>>>> ?>
>>>> 
>>>> What happens is if i try for example to clean up "São Paulo" it prints
> "são
>>>> paulo". Why??
>>>> The "$name" will receive a string form a text field in a form. my html
>>>> charset is iso-8859-1
>>> 
>>> 
>>> I think you are better to use recode extension for this.
>>> Check out recode manual page.
>>> 
>>> --
>>> Yasuo Ohgaki
>>> 
>> 
>> --
>> 
>> 
>> 
>> --
>> 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]




Re: [PHP] Re: Problem with non us caracters and "strtr"

2001-11-02 Thread Rodrigo Peres

Py,

I've tried your method but again, didn't work, here how the word "São Paulo"
appears in the url with get method "S%E3o+Paulo" and the word "zé" "z%E9",
maybe there's some clue here.
I'm in a macintosh sys 9.1, IE5 all in english.

Thank's in advance

Rodrigo


on 11/2/01 1:01 PM, pierre-yves at [EMAIL PROTECTED] wrote:

> Hello,
> 
>> can someone has an idea in how to convert for example
>>> a string posted by a form in this format "são paulo" to this "sao
> paulo"??
> 
> function remove_accents( $str ){
> if( strlen( $str ) == 0 )
> return $str;
> else
> $ret = strtr($str,
> "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ",
> "AACOYaacoouuuuyy");
> return $ret;
> }
> 
> hope it helps,
> py
> 
> - Original Message -
> From: "Stefan Rusterholz" <[EMAIL PROTECTED]>
> To: "Rodrigo Peres" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, November 02, 2001 9:10 AM
> Subject: Re: [PHP] Re: Problem with non us caracters and "strtr"
> 
> 
>> I have little experience with this kind of problem.
>> None of the Browsers I used under mac (IE 4 - 5 and sever NS 4.x) has sent
>> the data different than Windows Browsers. But avoid the meta-tag charset.
> I
>> had serious problems when the HTML-file where the form data came from had
>> that tag set (but I didn't spend a lot of time investigating it).
>> 
>> Anyway: why do you want to translate a ã to an a?
>> I made good experiences with storing original chars and using
> htmlentities()
>> (or otherway round if you don't have to edit that stuff)
>> 
>> Stefan Rusterholz, [EMAIL PROTECTED]
>> --
>> interaktion gmbh
>> Stefan Rusterholz
>> Zürichbergstrasse 17
>> 8032 Zürich
>> --
>> T. +41 1 253 19 55
>> F. +41 1 253 19 56
>> W3 www.interaktion.ch
>> --
>> 
>> - Original Message -
>> From: "Rodrigo Peres" <[EMAIL PROTECTED]>
>> To: "Yasuo Ohgaki" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>> Sent: Friday, November 02, 2001 2:51 PM
>> Subject: Re: [PHP] Re: Problem with non us caracters and "strtr"
>> 
>> 
>>> I've tried the recode(), but I think I didn't uderstand it's
>> functionality,
>>> since nothing happens. can someone has an idea in how to convert for
>> example
>>> a string posted by a form in this format "são paulo" to this "sao
> paulo"??
>>> Does anyone knows how Macintosh's browsers send this special caracteres
> to
>>> PHP???
>>> 
>>> Thank's again
>>> 
>>> Rodrigo Peres
>>> 
>>> 
>>> 
>>> 
>>> on 11/1/01 9:17 PM, Yasuo Ohgaki at [EMAIL PROTECTED] wrote:
>>> 
>>>> Rodrigo Peres wrote:
>>>> 
>>>>> Hi list,
>>>>> 
>>>>> I'm in a big trouble. I'm brazilian, so I've made a script to clean
> up
>> the
>>>>> special caracters from our language in order to not mess up my
>> publisher,
>>>>> but this script don't work in Macintosh (macos 9.1, IE 5, all in
>> american
>>>>> english).
>>>>> 
>>>>> This is my code
>>>>> 
>>>>> 
>>>>> >>>> function myclean(&$name) {
>>>>> $name = strtolower(strtr($name,
>>>>> "áéíóúàèìòùäëïöüâêîôûãçÁÉÍÓÚÀÈÌÒÙÄËÏÖÜÂÊÎÔÛÃÇ ",
>>>>> "aeiouaeiouaeiouaeiouacAEIOUAEIOUAEIOUAEIOUAC"));
>>>>> return $name;
>>>>> }
>>>>> $temp = myclean($name_actor);
>>>>> echo($temp);
>>>>> ?>
>>>>> 
>>>>> What happens is if i try for example to clean up "São Paulo" it
> prints
>> "são
>>>>> paulo". Why??
>>>>> The "$name" will receive a string form a text field in a form. my
> html
>>>>> charset is iso-8859-1
>>>> 
>>>> 
>>>> I think you are better to use recode extension for this.
>>>> Check out recode manual page.
>>>> 
>>>> --
>>>> Yasuo Ohgaki
>>>> 
>>> 
>>> --
>>> 
>>> 
>>> 
>>> --
>>> 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]
>> 
> 

-- 



--
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] Mysql and Images

2001-11-13 Thread Rodrigo Peres

His list,

I have some images stores in a mysql database and now i need to recover them
to put in a html. My question is there's a way to do this in the same page,
I mean, withou the need to buil another php page that process th image?
Something like a function that output the image to the  in the
html.

Thank's in advance

Rodrigo Peres
-- 



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

2001-11-13 Thread Rodrigo Peres

Hi list,

I have PHP code to insert the result of a form into mysql. When I nedd to
made an update, I pass an "id" in the url and use it to make the update
query. The problem is after I click in the update button (input submit) my
page refresh and came back in the same state, to see the changes I need to
type in the url again with the parameter?? why?? There's a way to avoid this
and get a new blank form page after the update?

ps: I've stored the "id" in a input type hidden, so I could click the button
and still have the id

Thank's in advance

Rodrigo Peres
-- 



-- 
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] silly question cont...

2001-11-13 Thread Rodrigo Peres

Sorry all, just to add a little info, the inpu hidden i've mentioned in the
other message is made if exist the id in the url!! it isn't all the time
there :-)

thks again

Rodrigo



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




Re: [PHP] Re: silly question

2001-11-15 Thread Rodrigo Peres

First, thak's all for the answers.
I didn't understood what's happend, but I've solved the problem using a
Header("location: ".$PHP_SELF."?celebID=".$ID) after the update command,
passing the same ID I used to update on it. I don't know if it is the best
way, but now I have the "refresh" of the page.

Rodrigo



on 11/14/01 4:01 PM, George Whiffen at [EMAIL PROTECTED] wrote:

> Rodrigo,
> 
> I don't quite understand your problem,  it might help to see some of the
> php or form html. It might also help if I explain how I usually handle
> updates.
> 
> I have a single php page with the form on it which is also the target
> of the form.
> 
> Typically users get to the form via a link which includes the "id" on the
> url (i.e. passed as a GET variable).  The php picks up this id and uses
> it to query the database to get the current data.  Then the form is
> presented with the form values set to the current values and the "id"
> included as a hidden field.  The user makes a change and presses a submit
> button with the name "update" ()
> 
> The php checks to see if "update" is set (isset($update)).  If it is
> it uses the form values to update the database before it goes to search
> for the current values. Then it just continues as normal retrieving the
> database (new) values and printing out the form.  i.e. the logic is :
> 
> if (isset($update))
> {
> update database for "id" record
> e.g. update mytable set myfield = '".$myfield."' where id = '".$id."'
> }
> 
> select data for "id" record into myrow
> e.g. select * from mytable where id = '".$id."'
> 
> print form including data
> e.g.
> print '
> 
> 
> MY FIELD : 
> 
> 
> 
> 
> For the user this means they always have visual confirmation that their
> changes have gone to the database after pressing SUBMIT.  If they're
> happy they have a link to go wherever they want to next.  If they're
> not happy they can correct the data and submit again.
> 
> Could you be getting problems because there is confusion between your
> hidden "id" and the "id" on the url?  The ACTION="'.$SCRIPT_NAME.'"
> should sort that out since it will remove anything passed on the url
> when the form is submitted.
> 
> Or perhaps you have set the values in the form to php variables with
> the same name as the form variables e.g.
> 
> print '
> 
> If this is the case, then the form will always come back with the last
> entered details and not blank details since $myfield is continually
> being set to the value of the HTML input variable myfield.
> 
> Sorry I can't help more without getting a better idea of what you
> are trying to achieve!
> 
> George 
> 
> Rodrigo Peres wrote:
>> 
>> Hi list,
>> 
>> I have PHP code to insert the result of a form into mysql. When I nedd to
>> made an update, I pass an "id" in the url and use it to make the update
>> query. The problem is after I click in the update button (input submit) my
>> page refresh and came back in the same state, to see the changes I need to
>> type in the url again with the parameter?? why?? There's a way to avoid this
>> and get a new blank form page after the update?
>> 
>> ps: I've stored the "id" in a input type hidden, so I could click the button
>> and still have the id
>> 
>> Thank's in advance
>> 
>> Rodrigo Peres
>> --

-- 



-- 
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] Safe mode and dir permissions

2001-11-16 Thread Rodrigo Peres

Hi List,

My ISP runs the PHP in Safe Mode, this is causing me a lot of trouble. In
safe mode how can I change the permission of a dir to 0777?, my problem is
that I've built a Content management system, and for every new people
inserted the system creates a Directorie and will upload things
automatically on it, but I couldn't create it with 0777 permission, so I
can't upload nothing with PHP, and I don't have how change every single
folder permissio by hand.

Thank's

-- 


Rodrigo


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




  1   2   >