Re: [PHP] Please explain...

2002-03-19 Thread Alex Vargas

Because you are telling the parser to compare a numeric variable against
something called foo which (in your context) has to be numerical too.
Since foo has not been given any value, the parser defaults it to 0. So
foo = 0. So is true that foo=$x=0.

Alex.

- Original Message -
From: Jan Rademaker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 11:30 AM
Subject: [PHP] Please explain...


 Can someone explain why this works?

 $x = 0;
 if ($x == foo) {
 print yeah;
 }

 This prints 'yeah', but i can't figure out why...

 --
 Jan Rademaker [EMAIL PROTECTED]
 http://www.ottobak.com



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to run a script leaving screen output of previous script

2002-03-03 Thread Alex Vargas

Hi. I want to run a php script without leaving the php that calls that
script.

Let's say I have a script called mypage.php which displays html. There is a
link to link.php, which makes some database maintenance and has no output. I
want to be able to run link.php from mypage.php, but don't want to display
anything new on screen.

As it is, when link.php runs, it displays a blank screen. I guess I could
insert a header to reload mypage.php, but I wonder if there is a way of not
leaving mypage.php at all. Is this posible?

Thanks,

-Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mysql

2002-01-30 Thread Alex Vargas

Maybe a dumb question, but are you sure you have the fields id, songname and
artist in a table named rage in a database named rage?

The times I got that error was because a non-existent field or a
non-existent table.

Otherwise, everything looks ok.

Alex.


- Original Message -
From: Mason Batley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 31, 2002 6:48 AM
Subject: [PHP] mysql


G'day

I keep getting an error message of :Warning: Supplied argument is not a
valid MySQL result resource in /var/www/html/RageProject/StripPlayList.php
on line 100
Rows:


$link = mysql_connect(127.0.0.1, rage, rage);
mysql_select_db(rage);
$query = Select id from songs
   where songname = '$Song' and
   artist = '$Artist';
$result = mysql_query($query);
$rows = mysql_num_rows($result);  Line 100
echo Rows: $rows;
mysql_close($link);

Can someone explain why.. I've been trying to work it out for 2 long.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] browser back button - Page has Expired.. problem

2002-01-28 Thread Alex Vargas

Just add this header

header (Cache-Control: public);

Alex.

- Original Message - 
From: Lee P Reilly [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 11:26 PM
Subject: [PHP] browser back button - Page has Expired..  problem


 Hi,
 
 I wonder if anyone can offer me a few pointers..?
 
 I'm building a portal to do various bits and bobs. I'm using sessions to
 facilitate the user authentication/login, etc. The only problem I have
 is that when viewing these (.php) pages in IE once the session variable
 has been set, a Warning: Page has Expired  page is displayed whenever
 the 'Back' button is pressed. This means that the user can only access
 the page again by hitting 'Refresh' (and therefore posting the form data
 back  executing whatever scripts again).
 
 The rest of IE's error message reads, The page you requested was
 created using information you submitted in a form. This page is no
 longer available. As a security precaution, Internet Explorer does not
 automatically resubmit your information for you.
 
 I know from using other web applications (Hotmail is one example), that
 this doesn't always have to be the case. Is there anyway I can eliminate
 this security precaution on the *server side* i.e. without telling users
 to ditch IE ;-)
 
 Thanks very much in advance for any advice.
 
 - Best regards,
 
Lee
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Got a problem I cant figure out

2002-01-27 Thread Alex Vargas

That error is always a missing } somewhere...

:)

Alex.

- Original Message -
From: Ben Turner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 5:55 AM
Subject: [PHP] Got a problem I cant figure out


Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line
47

I am receiving this error on my page but the problem is that line 47 is the
? and last line of the page.  Is their something Im missing here??

Thanks,
Ben



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Modify someone else's session register

2001-12-27 Thread Alex Vargas

Hi.

Let's suppose I have 3 users in my site, each of them generating their
respective session variables. Assuming I have a session variable named
$variable, I'll end up in the server with 3 values: $variable_1, $variable_2
and $variable_3.

My question is: is there a way I can change let's say the variable of the
second user when the third user is running the php script? Can I access (and
change) the session registers generated by the users?

Thanks for your help,

Alex.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Not PHP but MYSQL

2001-12-27 Thread Alex Vargas

create table table_name
(
id int not null auto_increment, 
primary key (id)
)
auto_increment = 1001



- Original Message - 
From: Steve Maroney [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 28, 2001 6:59 AM
Subject: [PHP] Not PHP but MYSQL


 
 
 Sorry for the OT, but im trying to figure out something with mysql and
 need some help.
 
 Does anyone know how set the auto_increment value to some other number
 than 0. I have an order_number coloumn and I want to start it at 1000.
 So the first record would 1001.
 
 
 
 
 
 
 
 
 Thank you,
 Steve Maroney
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Jpeg to Wbmp algorithm

2001-12-22 Thread Alex Vargas

Hi. I need to convert jpegs to wbmp. Unfortunately, the PHP build available
in my server wasn't compiled with the GD library, so I have no access to
JPEG2WBMP().

Is the source code of this function available somewhere? Or does anyone know
about a PHP class to make this task? At least an algorithm to do the
jpeg-wbmp conversion?

Thanks,

Alex.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sendemail appends domain to mail function

2001-12-21 Thread Alex Vargas

That's because XYZ company isn't a valid email address and sendmail fixes
the address with the name of the server. If you'd put
[EMAIL PROTECTED], you'd see that address unchanged.

Alex.

- Original Message -
From: Peter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 21, 2001 11:48 AM
Subject: [PHP] Sendemail appends domain to mail function


 Hi,

 I have problem.

 Everytime that I want to send email using a PHP script from my server, it
 automatically appends the domain name of my server to the From: line.

 else
 {
 $mailheaders .= From: XYZ company\n;
 $mailheaders .= Reply-To: $email\r\n;
 $mailheaders .= Content-Type: text/html; charset=iso-8859-1\r\n;
 $remarks .= brbr$items;
 mail([EMAIL PROTECTED], quotation enquiry, $remarks, $mailheaders);
 ?img src=images/thank_you.gif?
 }
 }

 As you can see from the example above , I use XYZ company , but in the
 email that I receive it comes out as XYZ [EMAIL PROTECTED]

 It automatically appended the domain name to the end of it.

 How can I avoid this?

 Thanks.

 Peter


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to convert OEM to ANSI character set

2001-12-20 Thread Alex Vargas

I have a PHP script that receives a CSV text file and inserts it into a
MySQL database.
My problem is that this CSV file is made using the OEM character set and I
need it with the ANSI character set. The closest thing I've found is the
convert_cyr_string() function, but there isn't a code specific for OEM and
translation is not completely accurate.

Any help?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Supressing PHPSESID from url

2001-12-14 Thread Alex Vargas

Hi,

I am making a wap application and I am using PHP's session handler. I pass
different values between scripts and I end up with an url which seems to be
too long:

nextscript.php?var1=somethingvar2=elsePHPSESID=5345345345...whatever

As I have found out, some wap browsers simply crash if the url is too long.
If I don't use PHP's session handling, and therefore the PHPSESID value is
not embeded in the url, the wap browser performs fine.

My question is: Is there a way to use session handling in a silent mode?
Can I supress the display of PHPSESID in the url? At least can I reduce the
lenght of the value?

Thanks for any help.

Alex.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]