Re: [PHP] About the mail().

2005-04-30 Thread BAO RuiXian
Hello, Penghui Wang wrote: Hi lists: I am new here. And i know little about php. Sorry ask so stupid question. snipped ... $headers .= "Content-Transfer-Encoding: UTF-8\n"; $headers .= "Content-Type: text/plain; charset=utf-8\n"; snipped ... åçæé snipped ... But all the chinese words c

Re: [PHP] eregi problem

2005-04-03 Thread BAO RuiXian
[EMAIL PROTECTED] wrote: I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha numeric chars only. here, how I check the variable: Try this: if(eregi("^[a-zA-Z0-9]+$",$GP[sifre])) The above say that between the beginning of the string "^" and the end of the string "

Re: [PHP] link problem - Apache or PHP?

2005-04-03 Thread BAO RuiXian
germ germ wrote: In my HTML file the HREF tag is: google.com When clicked, the link in then directed to: http://10.10.1.5/test-a/ref/www.google.com Basically it seems like it appends the link to the URL path. Yes, guess you have a base tag on the page, which reads http://10.10.1.5/test-a/ref. Pl

Re: [PHP] class and global

2005-03-19 Thread BAO RuiXian
Evert - Rooftop Solutions wrote: pooly wrote: I'm trying to use a global object (declared at a upper level), but all I got is : Call to a member function on a non-object in /home/pooly/public_html/templeet/modules/freedb.php on line 16 Hmm, perhaps your problem is the failed connection to your

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, Octavian Rasnita wrote: Hi, I also use Win 2k with PHP 5 in command line mode. This is the result I got when run from the command line: C:\Program Files\Apache Group\Apache2\htdocs\php> Content-type: text/html X-Powered-By: PHP/4.3.3 1,000,000,000,000 C:\Program Files\Apache Group\Apache2

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, M. Sokolewicz wrote: you might want to try using number_format() to change the format back to "integer likeness" After I changed to echo number_format($var), I got 1,000,000,000,000:) Well, actually this is not my problem. I just tested this for fun. Best Bao Bao Ruixian wr

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, Octavian Rasnita wrote: This prints: 1E+012 and... not 1 as it should. I tried the above example, and I got what you want, i.e. 1. My environment is Windows 2k, PHP 4.3.3 and Apache 2.0.47. Best Bao I have first tried just echo $var, but I thought that maybe if

Re: [PHP] weird problem with index page

2004-05-16 Thread BAO RuiXian
loll wrote: Hi, I am not sure if this is a PHP or Apache problem, but I am hoping someone can tellme what is wrong. When I go to www.domain.com on my server it shows the page as text instead of parsing the php code. If I go to www.domain.com/index.php (same page) it runs as it should. if I go

Re: [PHP] page_title

2004-05-07 Thread BAO RuiXian
Erik Gjertsen wrote: >I have write following code: >$page_title = "Welcome"; >?> > >But I can not see Welcome on top of the page. >Can someone tell me why I not can see it? > > Can you see it by reading the source of the page?:) Best Bao >Thanks >Erik Gjertsen > > > -- PHP General Mail

Re: [PHP] values from string query

2004-02-26 Thread BAO RuiXian
Angelo Zanetti wrote: [snip...] $q="select * from prospects where p_id = '$p_id'"; $result=mysql_query($q, $this->link) or die ("".mysql_error()); while($a_row=mysql_fetch_array($result)) { $c_query="Insert into client (c_name, c_company, c_worktel, c_dir

Re: [PHP] [php] if $sql has returned something

2004-02-25 Thread BAO RuiXian
e eventid like '.$eventid.';'; #echo $sql; #SELECT * FROM GMCalendar where eventid like 2004-02-16; $glquery = mysql_query($sql); if ($glquery) { echo " $day "; }else{ echo " $day "; } Bao Ruixian wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [php] if $sql has returned something

2004-02-25 Thread BAO RuiXian
John Taylor-Johnston wrote: I'm trying to figure out something. I found some calendar making code. For each table cell, I want to add $day around $day if an entry exists in $db.$table $sql = 'SELECT * FROM '.$db.'.'.$table.' where eventid like '.$eventid.';'; if ($sql ??) This will do:

Re: [PHP] Re: hello

2004-02-23 Thread BAO RuiXian
Based on the style of message body (short and shout), and the subject line, and the zip attachment, I conclude it as a virus. It may or may not a virus in face, I immediately delete it anyway:) Best Bao Ben Ramsey wrote: I would advise against sending attachments to the list with the message

Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread BAO RuiXian
Brian Dunning wrote: On Feb 23, 2004, at 9:18 AM, BAO RuiXian wrote: Have you tried to insert the same SQL statement manually, i.e., not via your php scirpt? I did the insert in phpmyadmin & copied & pasted the SQL that it generated, and it's the same, so I'm left scra

Re: [PHP] Can anyone tell me why this code doesn't insert anything?

2004-02-23 Thread BAO RuiXian
Brian Dunning wrote: This inserts nothing into the database, but returns no error that I can see. How come? What's wrong with it? $dbname = "my_database"; $dbconnection = mysql_connect("mysql05.powweb.com","my_user","my_pass"); mysql_select_db($dbname, $dbconnection); $query = "INSERT INTO inv

[PHP] Re: :-(((( PROBLEM: Explorer trying to save my *.php files...

2004-02-20 Thread BAO RuiXian
----- From: "BAO RuiXian" <[EMAIL PROTECTED]> To: "Цыганенко Артём" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, February 21, 2004 12:35 AM Subject: Re: [PHP] PROBLEM: Explorer trying to save my *.php files... Цыганенко Артём wrote:

Re: [PHP] PROBLEM: Explorer trying to save my *.php files...

2004-02-20 Thread BAO RuiXian
Цыганенко Артём wrote: Now, my problem is next: When I tryin' to view my phpinfo.php file, Internet Explorer is invite me to save it to disk Not To Open Why? I have 11 files in my PHP directory: LICENSE MSVCRT.DLL php4ts.dll php4isapi.dll php.exe php.ini php.ini-optimized p

Re: [PHP] & sign not posted to next page

2004-02-20 Thread BAO RuiXian
Piet from South Africa wrote: >i have the following problem. > >when i href like this > > > >and the name contains a & sign, it does not post it to the next page. > >if the name is bed&breakfast it stops at bed. > > Because '&' is a special character in URL, you need to escape it by urlencode

[PHP] Re: I don't understand you!

2004-02-19 Thread BAO RuiXian
install php on windows' to find the basics. Best Bao PS: Don't change the subject line each time. It will make people hard to follow. Help me, please... I'm waiting for you... I have only about 5 minutes... Please, help me. It's very improtant! Best regards. __

Re: [PHP] Problem with Apache!

2004-02-19 Thread BAO RuiXian
deal in it?? E-mail: [EMAIL PROTECTED] - Original Message ----- From: "BAO RuiXian" <[EMAIL PROTECTED]> To: "Цыганенко Артём" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, February 19, 2004 11:40 PM Subject: Re: [PHP] Problem with Apac

Re: [PHP] Problem with Apache!

2004-02-19 Thread BAO RuiXian
Цыганенко Артём wrote: Hello! My name is Artem! I want to tell you about my problem. Please, help me When I changed my "httpd.conf" file like in book by Julie C.Meloni, I try to open file phpinfo.php from directory "C:\Program Files\Apache Group\Apache2\htdocs". But when I open Int

Re: [PHP] auto increment

2004-02-17 Thread BAO RuiXian
marc serra wrote: Hi, i use PEAR DB with a mysql database and i want to know if there is a solution to get last inserted id in a table. If the id is auto increment, can't you use max(id) to get the last inserted one? Best Bao I see that I can use sequences but it doesn't work with mysq

Re: [PHP] Parse Error

2004-02-17 Thread BAO RuiXian
Jay Blanchard wrote: [snip] More info about the parse error of my previous post: The lines 45-46: $mysql_query = "INSERT INTO sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a vail height) "; $mysql_query .= "VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheigh

Re: [PHP] returning value to variable

2004-02-14 Thread BAO RuiXian
tg wrote: hi i need returning value of function as a variable example : function 1 () { return "some error"; } function 2 () { $v = 1(); if ( $v != '' ) echo "error"; } it doesn't work this way Are you using 1 and 2 as the function names in your real application? Hope not, becaus

Re: [PHP] Fedora FC1 + PHP 4.3.4 + phpMyAdmin 2.5.6 rc1 - Problems Resolving Included Files

2004-02-13 Thread BAO RuiXian
Radi Shourbaji wrote: Hello All! I'm struggling to get phpMyAdmin working correctly on a new installation of Fedora FC1. Despite my best efforts, phpMyAdmin keeps running into problems resolving included files. I'm sure that it has something to do with the settings in Apache / php.ini / .htacc

Re: [PHP] Hard links

2004-02-13 Thread BAO RuiXian
Ryan A wrote: [snip...] the source and target files are on the same filesystem. My (simple) question is: What is "hard links"? never really heard of it and googles no help either. Am I missing something? A link is called hard link when its system-file-identifier (SFID) is added to the curren

Re: [PHP] New Line code question \r\n etc.

2004-02-13 Thread BAO RuiXian
Al wrote: [snip...] I'd like to have my code clean up the newline code every pass and standardize it. What new line should I use, "\n" Unix, or what? Yes, "\n" is the line separator for Unix. Best Bao Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] problem referencing a mysql object

2004-02-04 Thread BAO RuiXian
craig wrote: Hi, the problem is that I am trying to use a varible in the objects attribute name. the offending line of code is: echo ""; this is giving the warning: Undefined property: cPic I have tried playing with eval and variable variables to get 'cPic$count' to look like 'cPic1' befor

Re: [PHP] Use of Class Reference Variable in another Class

2004-02-04 Thread BAO RuiXian
news.php.net wrote: >[snip...] > >Inside another class (Class2) I have several functions that need database >access. So in each function I can use "$db = new dbi;" and then use the >functions as usual ($db->dbquery("blah");). > >I am wondering, can I create the new "dbi" instance at the top of

Re: [PHP] HTTP request parameters do not populate variables

2004-02-01 Thread BAO RuiXian
Slava Zinkovski wrote: [snip...] I run it with URL like this http://localhost/myApp/test.php?param=qqq: I expect it to print 'param=qqq' string, though it does not! :((( Here is the output: Array ( [param] => qqq ) Notice: Undefined variable: param in d:\phptest\test.php on line 4 pa

Re: [PHP] Unix-Apache: running apache as different user

2004-01-27 Thread BAO RuiXian
Eli Hen wrote: Hello All, I have PHP installed on Apache and Unix with several vhosts so each vhost has its own user account on Unix. Now when accessing a webpage, Apache runs with user httpd.. but I want it to run as the user of the vhost account.. How can I do that? What version of Apache

Re: [PHP] How to prevent duplicated values?

2004-01-26 Thread BAO RuiXian
Thomas Svenson wrote: BAO RuiXian wrote: Make it field UNIQUE. That's the easy method, but usually not very smart. It only causes MySQL to Well, if there is an easy method, why we bother to use a more complicacted way? generate an error which you then have to take care of in

Re: [PHP] cron problem

2004-01-26 Thread BAO RuiXian
Hmm, this is a bit off topic, but... Mario wrote: [snip...] The story: I have created a script in the cron dir that runs a php file that sends auto emails. (The script is working fine when we run it through the command line, so it's working fine). The problem is that when the time comes and the c

Re: [PHP] How to prevent duplicated values?

2004-01-26 Thread BAO RuiXian
Radwan Aladdin wrote: Hello.. I want to prevent mySQL from storing the same value in a specified field (Username).. so how can I do it? Regards.. Make it field UNIQUE. Best Bao -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem: Failed to write session data (lack of resources?)

2004-01-25 Thread BAO RuiXian
Louie Miranda wrote: i mean under / Please use the unix command 'df' to see the disk drive usages for a list of your available disks and specially for the disk where /tmp is located. Best Bao -- - Louie Miranda http://www.axishift.com - Original Message - From: "Louie Miranda" <[

[PHP] Re: [users@httpd] Re: [PHP] Apache 1.3/PHP

2004-01-22 Thread BAO RuiXian
your original mail that you installed php as CGI not as module, have you tried to put your testing php file to the CGI directory after adding .php as a CGI extension? BTW, you are cross posting, but it seems your question is closely related to the both lists. Best Bao >Thanks again, >

Re: [PHP] Apache 1.3/PHP

2004-01-22 Thread BAO RuiXian
Tom Ray [List] wrote: >[snip]... > >print "Test 123"; >?> > >I'm sure I'm missing a line or two in my httpd.conf, but I really don't know what >they would be. Anyone with experience >with FreeBSD/Apache/PHP give me a hand? > > Do you have the following line in your httpd.conf: AddType applic

Re: [PHP] includes...

2003-12-18 Thread BAO RuiXian
[EMAIL PROTECTED] wrote: Oh... So it's the same as not having any /'s just the file name? Not quite. For example, when you have more than one executables with the same name, when you use ./executable_name, it will call the the one in your current directory, otherwise it will use the one in yo

Re: [PHP] includes...

2003-12-18 Thread BAO RuiXian
[EMAIL PROTECTED] wrote: bit of a random thought I need answering really... when referencing external files, what's the difference between: ../ / ./ I know that ../ means back one directory and jsut a / means look from the root directory, but what is: ./ ??? ./ means the current directory. B

Re: [PHP] PHP IDE?

2003-12-14 Thread BAO RuiXian
Mike wrote: if you are using windows, I would highlt recommend PHPEdit, it is open source and has function completion. It boosts productivity a lot http://www.phpedit.net/products/PHPEdit/ Mike Not that good. IIRC, all the error messages and the prompts are in German, one need to guess which

Re: [PHP] session_start() make netscape 4.7 reload page.

2003-12-14 Thread BAO RuiXian
Jonathan Zhang wrote: test.php --> For Win2kpro+netscape 4.7,all form data you enter in this page will lost when resize the browser's window size, ns4.7 have reload this page when resize the window. But if you remove the session_start() from this page, the issue will not exist. I use Win2kp

Re: [PHP] Page breaks and printing?

2003-10-17 Thread BAO RuiXian
Don't know the HTML thead/tbody/tfoot elements can hold down on a single page. The CSS command page-break-before:always and page-break-after:always should play the trick on a XML sensible browser like IE or Opera. For example, you can have a look at this page: http://www.codeave.com/css/code.a

Re: [PHP] $_POST in MySQL query issue...

2003-10-16 Thread BAO RuiXian
Adam Reiswig wrote: $table="elements"; $sql="insert into $table set Name = '$elementName'"; This works with register_globals set to on. But, I want to be able to turn that off. My code then, I am guessing, be something as follows: $table="elements"; $sql="insert into $table set Name = '$_POS