Re: [PHP] Blank PHP pages...

2002-10-16 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 The include file looks like 1 The problem was in line 3 of the include file. If there is a line feed behind ?> , the code does not work -> gives a blank page just like yours. R

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

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 = ($

Re: [PHP] Please help with fresh fish.

2002-09-03 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é

Re: [PHP] Re: PHP OOP

2002-09-03 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]... >

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

2002-09-03 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: > > require "../utils.php"; > $link=openDB(); > $file = $target.form; > >// Queries for student >if ($target == "student")

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: window.open();" ?> But I suppose it is not what you had in mind. ;-) You

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

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: >Di

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. S

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

2002-07-19 Thread René Moonen
> $mode = "entrance"; > if ($mode == "entrance") { > 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 th

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

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

2002-07-17 Thread René Moonen
>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. > This solution is no garantuee that the authenticated user is in control during that session. The only thing yo

Re: [PHP] Good Forum...

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

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

2002-07-10 Thread René Moonen
Is this what you mean? 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 > > > > > -- PHP General Mailing List (http://www.php.n

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 : >Version MySql : ?? > >Thanks > >Skyhawk > > > -- PHP Ge

Re: [PHP] Browser Troubles...

2002-07-09 Thread René Moonen
>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? > > > > What? M$ software crashing? Na... never seen that ;-) sorry... coudn't help that! What outp

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

2002-06-27 Thread René Moonen
>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. > > That did it for me also... thanks René -- PHP Genera

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

2002-06-26 Thread René Moonen
> 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). Hum, I did spent some time yesterday on exactly that, but with no success (yet). I'm using Linux RedHat 7.1. Expat 1.95.3

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] function echo ' '

2002-06-25 Thread René Moonen
Use the escape character to output double quotes echo ''; René Martin Johansson wrote: >Is there a way to express php variables inside an echo ' '. > >I want something like this to work: > >echo ''; > >I know I can write it like this: >echo 'echo '">'; > >But Its to hard to read the code like

Re: [PHP] Seperating presentation from logic

2002-06-24 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 beini

Re: [PHP] Name of script

2002-06-11 Thread René Moonen
Christoph Starkmann wrote: >Hi there! > >I don't find the function or variable >returning/containing the name of the >script itself; > >like: > >echo "Hi, my name is " . $SCRIPT_NAME; > >Anyone can help? > >(I did RTFM...) > >Kiko > > > $PHP_SELF see Language Reference chapter 7 Variables Ren

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. I'

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 relationsh

Re: [PHP] IP security check

2001-08-07 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

[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 = g

[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