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
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 ==
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
Ø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) {
//
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
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
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
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
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
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.
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:
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
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
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.
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
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
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
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
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
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
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
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;
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.
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.
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
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
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 =
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
28 matches
Mail list logo