Re: [PHP] Blank PHP pages...

2002-10-17 Thread René Moonen
I had the same thing just two days ago. This is what happend: I have some code using include files in this way: 1 ?php 2 3 // some php code 4 include(xlib.inc); 5 // some php code 6 7 ? The include file looks like 1 ?php 2 // some code 3 ? The problem was in line 3 of the include file. If

Re: [PHP] conditional statement problems

2002-10-01 Thread René Moonen
Pablo Oliva wrote: $title_err = ($adTitle == ) ? 1 : strlen($adTitle) 50 ? 2 : 0; Can anyone tell me why this is not evaluating correctly (returning a value of 1) when $adTitle is an empty string? I have no idea... but if you change your code to this, it works: $title_err = ($adTitle ==

Re: [PHP] conditional statement problems

2002-10-01 Thread René Moonen
René Moonen wrote: Pablo Oliva wrote: $title_err = ($adTitle == ) ? 1 : strlen($adTitle) 50 ? 2 : 0; Can anyone tell me why this is not evaluating correctly (returning a value of 1) when $adTitle is an empty string? I have no idea... but if you change your code to this, it works

Re: [PHP] This is weird, this script does/doesn't work

2002-09-04 Thread René Moonen
Øystein Håland wrote: on my own machine, W2k+Apache+php4.2 this works without problem, on the Internet-server though, (Linux), the following script produces a blank page: ?php require ../utils.php; $link=openDB(); $file = $target.form; // Queries for student if ($target == student) { //

Re: [PHP] Re: PHP OOP

2002-09-04 Thread René Moonen
Rodrigo Dominguez wrote: 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

Re: [PHP] Please help with fresh fish.

2002-09-04 Thread René Moonen
Anh wrote: Hello everyone, I would like to study PHP but do not have any experience about PHP or programming. Could you please give me some advice to begin such as books, news, forum... Many thanks in advance, Anh You already found the best PHP forum there is ;-) René -- PHP

Re: [PHP] How to Popup a Window Using PHP Code

2002-08-02 Thread René Moonen
Hakkan Lui wrote: Dear all, As the title state, is there any method to popup a window (like window.open in Javascript), using PHP code? Thanks for your help. Regards, Hakkan Lui Yep there is: ?php echo SCRIPT LANGUAGE='JavaScript'window.open();/SCRIPT ? But I suppose it is not

Re: [PHP] Why won't this work?

2002-07-19 Thread René Moonen
You probably do not have a background of C / C++ programming ;-) assignments:single equal sign comparison:dual equal sign The *assignments* in your if statements are always TRUE, so it will always execute the statements after the first *if* So use if ($mode == entrance) { and

Re: [PHP] Why won't this work?

2002-07-19 Thread René Moonen
snip $mode = entrance; if ($mode == entrance) { /snip I suppose you added the first line ($mode = entrance; ) for testing purposes during debugging, but in order for the script to work you should now remove it, because now $mode will always have

Re: [PHP] Why won't this work?

2002-07-19 Thread René Moonen
hmm... seems a MySQL topic. I suppose that your table is filled with correct data at some other point. So what you need is a count query that returns *one* result and not all records in that table. You do not want a *while* loop in your PHP script, because that would show a list of unique ips.

Re: [PHP] Why won't this work?

2002-07-19 Thread René Moonen
Well if you *know* your query only returns one row or you are just interessed in the first row, just forget about the while construction $result = mysql_query(SELECT id FROM ma_users WHERE user='$PHP_AUTH_USER'); $id=mysql_fetch_row($result) print $id; Good luck René John Wulff wrote:

Re: [PHP] Why won't this work?

2002-07-19 Thread René Moonen
Eh.. probably should be: $result = mysql_query(SELECT id FROM ma_users WHERE user='$PHP_AUTH_USER'); $row=mysql_fetch_row($result) print $row['id']; René René Moonen wrote: Well if you *know* your query only returns one row or you are just interessed in the first row, just forget about

Re: [PHP] Sessions / logins / cookies / security

2002-07-17 Thread René Moonen
snip What I'm looking to do is when a user logs in, I start up the session.. I then have the registered session var to verify they are authenticated as they move throughout the site. /snip This solution is no garantuee that the authenticated user is in control during that session. The only

Re: [PHP] querying for one specific row number

2002-07-17 Thread René Moonen
Phil Schwarzmann wrote: I want query my mysql table and get one particular row. So let's say my table had 5 rows (entries) in it, and I want to pull just row #2, how would I do this?? THANKS!! It's OT but OK: SELECT * FROM table LIMIT 1,1; Have another look at the MySQL manual (6.4.1.

Re: [PHP] Good Forum...

2002-07-15 Thread René Moonen
snip What is a good php-based forum? /snip http://phpnuke.org/ http://phpwebsite.appstate.edu/ A bit more than just a forum, you could use them to build your complete site... snip What I would do is expand the table with more user info for use with my whole site. /snip I would consider

Re: [PHP] Geting PHP Version

2002-07-10 Thread René Moonen
run this MySQL query SELECT VERSION(); René Skyhawk wrote: Please, How do I make to get version information of MySql in runtime ? I would like to show the version of MySql in my website. For example: Version PHP : ? echo phpversion(); ? Version MySql : ?? Thanks Skyhawk

Re: [PHP] Generating word documents based on fields in a browser

2002-07-10 Thread René Moonen
Is this what you mean? ?php header(Content-type: application/rtf); echo Hello World; ? René Craig wrote: Is this possible I want to create a form, similar to an invoicing system that generates a word document that the user can print out Any help would be gratefully appreciated. craig

Re: [PHP] Browser Troubles...

2002-07-09 Thread René Moonen
snip Now... on certain browser platforms the browser spuriously dies for no reason. (Primarily Oldish IE 5.0(but not all releases) and 5.5). Has anyone came accross this kind of thing before? /snip What? M$ software crashing? Na... never seen that ;-) sorry... coudn't help that! What

Re: [PHP] Compiling PHP with XML????

2002-06-27 Thread René Moonen
snip Yes. Since 4.1.x at least. But for XSLT you need to get expat and Sablotron and link them into the compile (with the appropriate ./configure options). /snip Hum, I did spent some time yesterday on exactly that, but with no success (yet). I'm using Linux RedHat 7.1. Expat

Re: [PHP] Compiling PHP with XML????

2002-06-27 Thread René Moonen
snip I had the same problem yesterday afternoon, trying to compile PHP with Sablotron 0.95. Last week, I did a compile with Sablotron 0.90 and everything was good, so I downgraded 0.95 to 0.90 and was able to successfully build PHP. /snip That did it for me also... thanks René -- PHP

Re: [PHP] Seperating presentation from logic

2002-06-25 Thread René Moonen
You might want to start by looking (download, instal, try) at available content managers like PHPWebSite http://phpwebsite.appstate.edu/ PHPNukehttp://phpnuke.org/ They do exactly that; seperate content from programming logic. As an admin you can assign certain users as

Re: [PHP] function echo ' '

2002-06-25 Thread René Moonen
Use the escape character to output double quotes echo 'a href=\$address\'; René Martin Johansson wrote: Is there a way to express php variables inside an echo ' '. I want something like this to work: echo 'a href=$address'; I know I can write it like this: echo 'a href='; echo $address;

Re: [PHP] Seperating presentation from logic

2002-06-25 Thread René Moonen
Well... I still think that these tools can help. For example PHPWebSite (which I use for our Intranet) has a set of 'themes'. A theme consists of a style sheet (.css), some image files (logo's, backgrounds etc.) and a small set of PHP scripts that define things like standard header, footers.

Re: [PHP] Stopping multiple votes by IP

2002-06-05 Thread René Moonen
What then happens with users who are behind a firewall/proxy (probably have non-routable IP addresses on theire LAN) and share one internet connection. They all have the same remote IP address (routable IP address of the firewall). This would mean that only one user of that group can vote.

Re: [PHP] Question about grant user right to MySql

2001-08-13 Thread René Moonen
Try these links for MySQL news: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) Best Regards René Jack wrote: Sorry, all, but i couldn't fine any Mysql News group around, so i sent this message here, as i found php got a close

Re: [PHP] IP security check

2001-08-08 Thread René Moonen
Try this code: if(getenv(HTTP_X_FORWARDED_FOR)) { $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } $host = gethostbyaddr($ip); And check out http://www.php.net/manual/en/function.getenv.php However, I think it is very unsafe to base your payment transactions on these

[Re: [PHP] user's ip]

2001-08-07 Thread René Moonen
The problem is that REMOTE_ADDR returns the IP address of the proxy (if the user accesses the web-page via a proxy. This will allways return the IP address of the user's machine: if(getenv(HTTP_X_FORWARDED_FOR)) { $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } $host =

[PHP] declaring variables in PHP???

2001-07-24 Thread René Moonen
Hi, I'm using PHP for a few weeks now, so you can imagine that I'm making a lot of typing errors... Often I make a typing error in one of the variable names ($helo instead of $hello or worse still $Hello instead of $hello). Since PHP does not care about declaring variables before using them, it