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
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?
>>
>
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 = ($
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é
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]...
>
Ø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")
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
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
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
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
> $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
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
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
>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
>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
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
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
>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
>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
> 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
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.
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
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
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
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'
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
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
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
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
29 matches
Mail list logo