Lists are back up

2001-06-18 Thread Rasmus Lerdorf

We have re-enabled the PHP mailing lists.  They are now running from a
temporary machine sitting on the floor of my spare bedroom.  A more
permanent home is in the works.

-Rasmus




php-general Digest 18 Jun 2001 19:14:40 -0000 Issue 706

2001-06-18 Thread php-general-digest-help


php-general Digest 18 Jun 2001 19:14:40 - Issue 706

Topics (messages 54239 through 54256):

Compiler advice please!
54239 by: Gerry

ereg function
54240 by: Jay Paulson
54252 by: CC Zona

Re: [PHP-DEV] Fork() in php? (äâà óäàðà - 8 äûðîê?)
54241 by: ~~~i LeoNid ~~

fdf and pfd functions in PHP
54242 by: David A Castillo
54243 by: mheumann.sei.cl

Re: NEED BOOK: DB Abstaction
54244 by: Jon Haworth

a little ot, mysql binary fields
54245 by: Christian Dechery

Form security
54246 by: phpman
54247 by: James Stevens
54248 by: Peter Dudley
54251 by: mheumann.sei.cl
54253 by: phpman

.htaccess and secure image directory
54249 by: bill

pg_fetch_object() and composite field names
54250 by: Arcady Genkin

Re: out file
54254 by: Hasan Niyaz

Re: advice on 'Nusphere Mysql Package' appreciated
54255 by: scott [gts]

Lists are back up
54256 by: Rasmus Lerdorf

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



Hi this is probably of the scope of the list since it is a c++ question. (sorry)

 I'm trying to learn a few things about c++ and I'm using gcc on my
Linux box. The problem I encountered is with the floating point
manipulation classes or functions like fixed and showpoint, I get a
compile error saying they are not declared. I triyed the gcc.gnu site
but I could not find a support maillist like this one. After endless
fruitless searches on the web I decided to give you a shot since you
have answered many of my PHP questions and I know some of you do a lot
more than just PHP related development. 

Could someone point me in the right direction please, maybe a site or
mailgroup where I could ask about this?

Thanks in advance and sorry for the inconvenience!

Gerry




hello-
I have a pretty easy question for some of you.  I'm using the ereg function and it's 
not returning a true or false after it runs.  Below is the code snippet I'm using.

echo ereg(^[a-zA-Z]$, $fname);

as you can see I'm just looking to make sure the variable $fname just has characters 
a-zA-Z and nothing else.  Anyway, I'm running PHP 4.0.5 and I'm using the ereg 
function else where and it seems to work fine.

Thanks,
Jay Paulson




In article 002e01c0e46c$ec2459a0$6e00a8c0@webdesign,
 [EMAIL PROTECTED] (Jay Paulson) wrote:

 echo ereg(^[a-zA-Z]$, $fname);
 
 as you can see I'm just looking to make sure the variable $fname just has 
 characters a-zA-Z and nothing else.

Actually, you're checking whethere the variable is a single-character 
string a-zA-Z.  For what you want:

ereg(^[a-zA-Z]+$, $fname); //add plus sign

Note also that although the docs imply that ereg() returns an integer 
value, it says further down Returns true if a match for pattern was found 
in string, or false if no matches were found or an error occurred.  In my 
experience, boolean values don't echo well.  Try this instead:

if(ereg(^[a-zA-Z]+$, $fname))
   {
   echo pPassed!/p\n;
   }
 else
   {
   echo pFailed.  Enter a different value./p\n;
   }

-- 
CC




On 21 May 2001 10:06:41 -0700 impersonator of [EMAIL PROTECTED] (Zeev Suraski)
planted I saw in php.general:

At 08:24 21/5/2001, Rasmus Lerdorf wrote:
You are assuming they even read this mailing list.

*ping* (in Tokyo, so it took me a while to catch up on my Email)

Zeev

Sorry for _an_ intrusion her. I just unsuccsefully pinged zend (on an
address supplied on the page) of wich the author is co-founder
co-developer, as i undustand:) So i publish my quest her. Hopefully it
will be seen by some, besides maintainers:) Is there hope to get answer
too? I hope.

I was checking on PHP en-coder (unfortunately, it only goes from 4.03:(so
i didn't go *further*, but wanted to test Zend Optimizer too. But

stoped at license item 8.2, and asked for an explanation, on witch i
received *demon* response (below) - sorry it got compacted, as i forgot to
close my copy/paste buffer compacter (and i am to lazy to copy it again:) 

Hope, you decipher:)

Sincerely, LeonId

AM i `disclosing´ by this?:)
d(a)emonadvice-
Hi. This is the qmail-send program at mail.zend.com. I'm afraid I wasn't
able to deliver your message to the following addresses. This is a
permanent error; I've given up. Sorry it didn't work out. [EMAIL PROTECTED]:
--- Below this line is a copy of the message. Return-Path:
[EMAIL PROTECTED] Received: (qmail 6544 invoked by alias); 24 May 2001
14:37:03 - Delivered-To: [EMAIL PROTECTED] Received: (qmail
6541 invoked from network); 24 May 2001 14:37:02 - Received: from
unknown (HELO mckexch02.mckusa01) (38.201.8.162) by mail.zend.com with
SMTP; 24 May 2001 14:37:02 - Received: from cheerleo

Re: Lists are back up

2001-06-18 Thread Thomas Deliduka

On 6/18/2001 3:15 PM this was written:

 We have re-enabled the PHP mailing lists.  They are now running from a
 temporary machine sitting on the floor of my spare bedroom.  A more
 permanent home is in the works.

LOL, ya hoo!!
-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/





PHP version?

2001-06-18 Thread Abe Asghar



Hi Guys,

I wonder if you can help. One of our servers 
has migrated to php V 4.05 from V 4.04. Unfortunately part of the site 
that accesses a MySQL database no longer functions. I have checked pretty 
much everything and it seems OK. Is there any changes in the version which could 
be causing these problems?

Thanks very much.


Re: PHP version?

2001-06-18 Thread Thomas Deliduka
Title: Re: PHP version?



On 6/15/2001 5:29 AM this was written:

I wonder if you can help. One of our servers has migrated to php V 4.05 from V 4.04. Unfortunately part of the site that accesses a MySQL database no longer functions. I have checked pretty much everything and it seems OK. Is there any changes in the version which could be causing these problems?


Not sure, any mysql-related stuff here: http://www.php.net/ChangeLog-4.php

-- 

Thomas Deliduka
IT Manager
-
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/







Re: Lists are back up

2001-06-18 Thread Data Driven Design

Thank You.

Data Driven Design
P.O. Box 1084
Holly Hill, Florida 32125-1084

http://www.datadrivendesign.com
http://www.rossidesigns.net
- Original Message - 
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 3:15 PM
Subject: Lists are back up


 We have re-enabled the PHP mailing lists.  They are now running from a
 temporary machine sitting on the floor of my spare bedroom.  A more
 permanent home is in the works.
 
 -Rasmus
 
 




Re: Lists are back up

2001-06-18 Thread John Donagher


Any chance we can get the [LISTNAME] subject prefixing so all my filters
don't break? :)

John

On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:

 We have re-enabled the PHP mailing lists.  They are now running from a
 temporary machine sitting on the floor of my spare bedroom.  A more
 permanent home is in the works.
 
 -Rasmus
 
 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD




[PHP] Problem with PDFLib - pdf_show_boxed()

2001-06-18 Thread Carsten Gehling

I have a problem with the PDFLib library under PHP. The following script
should print two texts, one is Times Roman outlined the other Ti mes Rom
an out lin ed. They are using different functions to do so.

Only the first text is displayed in my PDF document (which, besides that, is
shown nicely). What is wrong with the other function call?

Tech info: Windows 2000 server, IIS 5.0, PHP 4.0.5, PDFLib 4.0.1

Please reply to me offlist, since I cannot subscribe at the moment (I get no
confirmation from the list-daemon???)

-
?php
$pdf = pdf_new();
pdf_open_file($pdf);
pdf_begin_page($pdf, 595, 842);

pdf_set_value($pdf, textrendering, 0);
pdf_set_font($pdf, Times-Roman, 12, host);

pdf_show_xy($pdf, Times Roman outlined, 50, 550);
pdf_show_boxed($pdf, Ti mes Rom an out lin ed, 50, 550, 120, 400, left);

pdf_end_page($pdf);

pdf_close($pdf);

$buf = pdf_get_buffer($pdf);
$len = strlen($buf);
pdf_delete($pdf);

header(Content-type: application/pdf);
header(Content-Length: $len);
print $buf;
?
---

- Carsten




RE: [PHP] RE: Lists are back up

2001-06-18 Thread scott [gts]

most email programs will allow you to filter
by email address also.  works great for me.


 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 18, 2001 4:05 PM
 To: John Donagher; Rasmus Lerdorf
 Cc: [EMAIL PROTECTED]
 Subject: [PHP] RE: Lists are back up
 
 
 Yes, -please- put this back, my inbox will thank you, as will I.
 
 Chad
 
 -Original Message-
 From: John Donagher [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 18, 2001 3:41 AM
 To: Rasmus Lerdorf
 Cc: [EMAIL PROTECTED]
 Subject: Re: Lists are back up
 
 
 
 Any chance we can get the [LISTNAME] subject prefixing so all my filters
 don't break? :)
 
 John
 
 On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:
 
  We have re-enabled the PHP mailing lists.  They are now running from a
  temporary machine sitting on the floor of my spare bedroom.  A more
  permanent home is in the works.
  
  -Rasmus
  
  
 
 -- 
 
 John Donagher
 Application Engineer
 Intacct Corp. - Powerful Accounting on the Web
 408-395-0989
 720 University Ave.
 Los Gatos CA 95032
 www.intacct.com
 
 Public key available off http://www.keyserver.net
 Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD
 
 



[PHP] RE: Lists are back up

2001-06-18 Thread ckieninger

thanks 

mailto:[EMAIL PROTECTED]
http://www.packdata.net

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Montag, 18. Juni 2001 21:15
To: [EMAIL PROTECTED]
Subject: Lists are back up


We have re-enabled the PHP mailing lists.  They are now running from a
temporary machine sitting on the floor of my spare bedroom.  A more
permanent home is in the works.

-Rasmus




[PHP] Re: Lists are back up

2001-06-18 Thread John Meyer

At 12:15 PM 6/18/2001 -0700, Rasmus Lerdorf wrote:
We have re-enabled the PHP mailing lists.  They are now running from a
temporary machine sitting on the floor of my spare bedroom.  A more
permanent home is in the works.

-Rasmus

Does this also refer to the news server?


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing




[PHP] back again!!!

2001-06-18 Thread Jochen Kaechelin

great - something is missing without this mailing list!


-- 
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]



Re: [PHP] RE: Lists are back up

2001-06-18 Thread Alexander Wagner

scott [gts] wrote:
 most email programs will allow you to filter
 by email address also.  works great for me.

Yeah.

If Return-Path contains php-general-return
as a filter-rule works great.

regards
Wagner

-- 
Little Boy: Mr. President, how did you become a war hero? 
President Kennedy: It was absolutely involuntary. They sank my boat. 



[PHP] MoneyR (Opportunity of earnings)

2001-06-18 Thread implast

Hello,

  Thank you for giving attention to this message.

The work is connected with processing and sending of electronic mail.

You can make up your own flexible schedule (we offer full-time and part-time job). 
You can work at any time, which is convenient for you, at home or at office.
For the work you need the computer connected to the Internet with the functions of 
sending
the electronic messages.

You will earn from $ 900 up to $ 4.000 working for 7-14 hours per week. 

The income will make more than $ 9.000 if you work 30 and more hours per week in the 
Internet monthly.

Everything depends on your diligence and desire.

To receive the further instructions write to the following e-mail address: 
[EMAIL PROTECTED] 

In the column Subject write Report. 

In the message write:  I’d like to get the further instructions” and do not forget to 
write your 
e-mail. The detailed information will be sent to you, and all the questions will be 
answered.
 

P.S. This letter is not a spam. If you are not interested in it,
simply remove and forget about it, it will not be sent to you again.

If this letter has caused you any inconveniences, accept my deep apologies!!!

I wish you success!


-- 
Best regards,
Aleksei K.   mailto:[EMAIL PROTECTED]





Re: [PHP] Re: Lists are back up

2001-06-18 Thread David VanHorn



If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing

Most of my systems don't even HAVE a reset button.
:)

--
Dave's Engineering Page: http://www.dvanhorn.org

I would have a link to http://www.findu.com/cgi-bin/find.cgi?KC6ETE-9 here 
in my signature line, but due to the inability of sysadmins at TELOCITY to 
differentiate a signature line from the text of an email, I am forbidden to 
have it.





[PHP] Re: Lists are back up

2001-06-18 Thread eschmid+sic

On Mon, Jun 18, 2001 at 12:15:23PM -0700, Rasmus Lerdorf wrote:
 We have re-enabled the PHP mailing lists.  They are now running from a
 temporary machine sitting on the floor of my spare bedroom.  A more
 permanent home is in the works.

This was the best mail I have read since weeks. I have been informed by my
French editor, there are some errors in the manual. I have tried to
download the latest, but it is not working for me?

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/



Re: [PHP] RE: Lists are back up

2001-06-18 Thread Julia A. Case

Quoting ckieninger ([EMAIL PROTECTED]):
 thanks 
 
can you renable the gtk-php mailing list.

Thanks,
Julia

-- 
[  Julia Anne Case  ] [Ships are safe inside the harbor,   ]
[Programmer at large] [  but is that what ships are really for.]  
[   Admining Linux  ] [   To thine own self be true.   ]
[ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
  



[PHP] RE: Lists are back up

2001-06-18 Thread PHPBeginner.com

Let's Go!

m


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 19, 2001 4:15 AM
To: [EMAIL PROTECTED]
Subject: Lists are back up


We have re-enabled the PHP mailing lists.  They are now running from a
temporary machine sitting on the floor of my spare bedroom.  A more
permanent home is in the works.

-Rasmus





[PHP] Re: Lists are back up

2001-06-18 Thread bard

ditto that.
On Mon, 18 Jun 2001, John Donagher wrote:

 
 Any chance we can get the [LISTNAME] subject prefixing so all my filters
 don't break? :)
 
 John
 
 On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:
 
  We have re-enabled the PHP mailing lists.  They are now running from a
  temporary machine sitting on the floor of my spare bedroom.  A more
  permanent home is in the works.
  
  -Rasmus
  
  
 
 
--
If society fits you comfortably enough, you call it freedom.
-- Robert Frost




RE: [PHP] Re: Lists are back up

2001-06-18 Thread Clayton Dukes

Why not just set your filter to look for [EMAIL PROTECTED] in the to
or cc line?

Clayton Dukes
MicroMuse, Inc.
CIC Product Engineer
CCNA, CCDA, CCDP, CCNP
(c) 904-631-4131
(o) 904-880-5996

-=]-Original Message-
-=]From: bard [mailto:[EMAIL PROTECTED]]
-=]Sent: Monday, June 18, 2001 6:00 PM
-=]To: John Donagher
-=]Cc: [EMAIL PROTECTED]
-=]Subject: [PHP] Re: Lists are back up
-=]
-=]
-=]ditto that.
-=]On Mon, 18 Jun 2001, John Donagher wrote:
-=]
-=]
-=] Any chance we can get the [LISTNAME] subject prefixing so all
-=]my filters
-=] don't break? :)
-=]
-=] John
-=]
-=] On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:
-=]
-=]  We have re-enabled the PHP mailing lists.  They are now
-=]running from a
-=]  temporary machine sitting on the floor of my spare bedroom.  A more
-=]  permanent home is in the works.
-=] 
-=]  -Rasmus
-=] 
-=] 
-=]
-=]
-=]--
-=]If society fits you comfortably enough, you call it freedom.
-=] -- Robert Frost




RE: [PHP] back again!!!

2001-06-18 Thread Kees Hoekzema

yeah, the 5000 emails in my inbox monthly ;)
thanks for fixing it Rasmuss :)

- Kees

 -Original Message-
 From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 18, 2001 10:14 PM
 To: PHP General
 Subject: [PHP] back again!!!
 
 
 great - something is missing without this mailing list!
 
 
 -- 
 phpArbeitsgruppe in Gruendung - Jochen Kaechelin
 Stuttgarter Str.3, D-73033 Goeppingen
 Tel. 07161-92 95 94, Fax 07161-92 95 98
 http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]
 



[PHP] What is the deal with cookies

2001-06-18 Thread Richard Kurth

I have a script that authorizes the user and sets a cookie but when I
run the script it takes the username and password sets the
cookie. Verifies the cookie is set and then runs the rest of the code
on the page. except it does not pass on the user name. I have to do a
manual refresh to get it to pull the data from the database using
the username furnished by the cookie. Look at the code below. how can
I overcome this refresh problem.

 This is the script that calls the userauth.php file look at the
 userauth.php file below

include(../inc/dataconf.inc);
include(userauth.php);
include(../inc/function.inc);
conf();
 $username =  $user_name;
$db = MYSQL_CONNECT($roothostname,$rootusername, $rootpassword) OR DIE(Unable to 
connect to database); 
$query = Select * from customers,datsubd,plans where datsubd.id = customers.id and 
customers.cusername='$username'and plans.planno=customers.plan;
$result=mysql_db_query($dbName,$query);
$row = mysql_fetch_array($result);

?
? include(top.inc);?
table width=100% border=0 cellspacing=0 cellpadding=0 align=center
tr
td colspan=3/td
/tr
tr
td width=25% align=left valign=top?php include(left.inc);? /td


td width=100% align=center valign=top

 #
Userauth.php

 function query($query)
 {
   Global $roothostname,$rootusername, $rootpassword,$dbName;
   // Connect to DB
if (!$link = @MYSQL_CONNECT($roothostname,$rootusername, $rootpassword))
{
$result = 0;
die(db connect error);
}
else 
{
// Select DB
if (!@mysql_select_db($dbName, $link))
{
$result = 0;
die(db select error);
}
else
{
// Execute query
if (!$result = @mysql_query($query, $link))
{
$result = 0;
die(db query error);
}
}
}
 @mysql_close($link);
return $result;
  }
  function login_user($user_name, $password) 
  { 
// Form our sql query
   $result = query(SELECT * FROM customers WHERE cusername ='$user_name');
   $row = mysql_fetch_array($result); 
  if (($row[cusername] == $user_name) AND ($row[cpassword] == $password) AND 
($user_name != ))
  { 
// User has been authenticated, send a cookie 
$user_id = $row[cusername]; 
$encryptedpassword = md5($password); 
SetCookie(LoginCookie, $user_id-$encryptedpassword, time()+50); // 3600 
expires one hour from now you can increse this if you what it to last longer
$success = 1; 
} else { 
  $success = 0; 
   } 
  return $success; 
 } 
  function verify_auth($cookie)
  { 
   // Split the cookie up into userid and password
   $auth = explode(-, $cookie); 
   $query = query(SELECT * FROM customers WHERE cusername = '$auth[0]'); 
   $row = mysql_fetch_array($query); 
   $encryptedpassword = md5($row[cpassword]);
   if (($row[cusername] == $auth[0]) AND ($encryptedpassword == $auth[1]) AND 
($auth[0] != )) 
   { 
 $success = 1; 
   } else { 
$success = 0; 
   } 
  return $success; 
} 
 function display_loginform()
 {
   global $SCRIPT_URL,$user_name;
   ?
  table width=400 border=1 align=center
form name=login action=?$SCRIPT_URL? method=post
trtd bgcolor=blackfont face=Arial color=white 
size=2bLoginb/font/td/tr
trtdfont face=Arial color=black size=2Name input name=user_name value= 
size=10 Password input name=password type=password value= 
size=10/font/td/tr
trtdfont face=Arial color=black size=2 input type=submit value=Login 
input type=reset value=Clear/font/td/tr
/form
/table
 ?
   exit;
 }
 script entry point here
 $SCRIPT_URL=getenv(SCRIPT_NAME);
 if($LoginCookie) // if cookie exists, check authenticity
 {
  $authenticated=verify_auth($LoginCookie);
  if($authenticated==0) display_loginform();
 } else {
$login=login_user($user_name,$password);
if($login==0) display_loginform(); 
}
 // if user has logged in, the script carries on here
$cookie_var = split(-, $LoginCookie);
// this variable contains who the user is logged in as!
   $username = $cookie_var[0];


  









Best regards,
 Richard  
mailto:[EMAIL PROTECTED]




[PHP] bad exec parse in nested foreach loop

2001-06-18 Thread Julie Tsai

Hi,

I posted this on phpbuilders forum last week and didn't get a peep, so please let me 
know if more info or clarification would help  This involves exec parsing and the 
foreach function in PHP4.

I'm encountering a problem with the parsing of an exec string within a foreach loop 
(itself nested in an if loop).  The string executes correctly outside of the foreach 
loop, but within the foreach mangles the arg syntax and returns error code 127.

The exec string within the foreach loop parses correctly up until it enounters the 
arguments to my shell script.  There it sees 0 or 1 arguments passed to the shell 
script, triggering the Usage:   message.

The exec string invokes the shell script via /bin/bash -c and looks like this:

exec(bin/putenv SOME_STRING /bin/bash -c \bin/suexec $login \\\$SOME_STRING 
my/shell/script $arg1 $arg2 $arg3 \ :eof\n.$somestring.\n:eof\n, $output, 
$return); 

For context, the foreach loop correctly expands and interprets variable and array 
assignments.

Regards,
Julie


-- 
Julie Tsai
415 864 0861 (h)
415 990 5271 (cel)



[PHP] help on mail and proxy

2001-06-18 Thread Javier Onate
Title: help on mail and proxy


 I developed a small system in php on a linux (redhat 7.0)
box with mysql and php 4.0, which is meant, among other things, to
send e-mails to certain people whenever a new record is added to one
of the tables.
When the computer was connected to internet throw my office line,
without any package filtering or firewall, all worked fine. But when I
connected the same machine to the network of my client, which is
behind a proxy server, the mails just stopped to arrive to their
destinations. Of course I changed the ip number of the machine to the
one the system admin. gave to me. All the mails go to a machine inside
the network of the company where the delivery is made throw Lotus
Notes. I can reach that machine from mine by means of ping or
traceroute, but when the mails arrive they got stopped (timeout) by a
process (or machine?) named dgcorlnmtaX.server.com.
(where 1=X=3)
I tried to send them to internet throw the proxy and make them
arrive as before, but the proxy don't let them out. Only the port 80
is allowed, and I don't know how to make sendmail pass throw that port
in that machine. The reconfiguration of the rules of the proxy are
difficult due to the administrative rules of the client.

Perhaps you have any suggestions to make this mails arrive.
I will really appreciate your help.

Than you in advance

-- 

Javier Onate Mendia
[EMAIL PROTECTED]



[PHP] variables in a e-mail

2001-06-18 Thread Richard Kurth

How can I add a variable to an e-mail on the fly. Say I have a form on
my page that the user fells in with data. but when he fills in the
message things like Hello,$Variable are added before it is sent. Does
this make sence











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]




[PHP] Thank you to all

2001-06-18 Thread Todd Cary

As I read the sniping remarks coming from MS about open source software,
I find it necessary to say thank you to the developers of PHP and the
incredible support I have received on these PHP forums.  And they say
open source applications are dangerous to companies (and MS has been
using open source along in their own applications!!).

So, thank you for providing me with the tools to create a rather
sophisticated Web application with no prior experience using PHP.

In gratitude

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]





RE: [PHP] Re: Lists are back up

2001-06-18 Thread Clayton Dukes

Fair enough, I'll give you that :-)



-=]-Original Message-
-=]From: Alexander Skwar [mailto:[EMAIL PROTECTED]]
-=]Sent: Monday, June 18, 2001 6:01 PM
-=]To: Clayton Dukes
-=]Cc: bard; John Donagher; [EMAIL PROTECTED]
-=]Subject: Re: [PHP] Re: Lists are back up
-=]
-=]
-=]So sprach Clayton Dukes am Mon, Jun 18, 2001 at 05:38:26PM -0400:
-=] Why not just set your filter to look for
-=][EMAIL PROTECTED] in the to
-=] or cc line?
-=]
-=]Because not all filters support that, and it makes reading mails eg. via
-=]webmail interfaces easier?
-=]
-=]Alexander Skwar
-=]--
-=]How to quote:http://learn.to/quote (german)
-=]http://quote.6x.to (english)
-=]Homepage:http://www.digitalprojects.com   |   http://www.iso-top.de
-=]   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
-=] Uptime: 2 days 6 hours 21 minutes




[PHP] Solution to headers already sent error.

2001-06-18 Thread Merio, Quinn

So, during the time the lists were down, i was banging my head over a
seemingly impossible error message.

This was the error message: 

Warning: Cannot send session cache limiter - headers already sent

What?! I exlaimed.. the first line in my page registered the session
variable i was using, so what was the deal.  I turned out to be one measly
little space in front of my ?php tag.

If you are registering a session variable, it seems you cant have ANY
whitespace in the page before you register the session variable.

Figured i would share that nugget, cus man did it ever drive me nuts, and i
saw no reference to it at all in the manuals.

Quinn Merio
Vice President
Vir2lAlliance Inc.
www.vr2a.com



[PHP] Re: Lists are back up

2001-06-18 Thread Mark Musone

I second that motion :^)


-Mark

On Mon, 18 Jun 2001 03:40:46 -0400 (EDT) John Donagher [EMAIL PROTECTED] wrote:

Any chance we can get the [LISTNAME] subject prefixing so all my filters
don't break? :)

John

On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:

 We have re-enabled the PHP mailing lists.  They are now running from a
 temporary machine sitting on the floor of my spare bedroom.  A more
 permanent home is in the works.
 
 -Rasmus
 
 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD







Re: [PHP] Solution to headers already sent error.

2001-06-18 Thread Alexander Wagner

Hiho,

Merio, Quinn wrote:
 So, during the time the lists were down, i was banging my head over a
 seemingly impossible error message.

 Warning: Cannot send session cache limiter - headers already sent

 What?! I exlaimed.. the first line in my page registered the session
 variable i was using, so what was the deal.  I turned out to be one measly
 little space in front of my ?php tag.

Well, reading the complete message should have helped, which goes like this:

Warning: Cannot add header information - headers already sent by (output 
started at /foo/foo.php3:2) in /foo/bar.php3 on line 399

The message tells you in which file and on which line the output was started. 
With PHP 4 it does, anyway.

 Figured i would share that nugget, cus man did it ever drive me nuts, and i
 saw no reference to it at all in the manuals.

Not in the session-section, no. But the description of the header()-function 
(http://php.net/header) contains this paragraph:

Remember that the header() function must be called before any actual output 
is sent, either by normal HTML tags blank lines in a file, or from PHP. It is 
a very common error to read code with include(), or require(), functions, or 
another file access function, and have spaces or empty lines that will output 
before header() is called. The same problem exists when using a single 
PHP/HTML file.

Of course, this is hard to find when you're browsing through the 
session-functions. A link might be useful. Something like This function 
needs to send a HTTP-Header, so you ... as with the header()-function.

regards
Wagner

-- 
Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously.
 - Cincinnati Enquirer   



Re: [PHP] variables in a e-mail

2001-06-18 Thread Alexander Wagner

Hiho,

Richard Kurth wrote:
 How can I add a variable to an e-mail on the fly. Say I have a form on
 my page that the user fells in with data. but when he fills in the
 message things like Hello,$Variable are added before it is sent. Does
 this make sence

Of course it does.
However, variables are not the way to go. The mails are not parsed, so 
variables won't do you any good. You'll have to use Placeholders. Something 
like this:

$mail_template = 
Hi ##firstname## ##lastname##,
how are you...;

Now you can continue with str_replace():
$mail_content = str_replace('##firstname##',$fname,$mail_template);
$mail_content = str_replace('##lastname##',$lname,$mail_content);

regards
Wagner

-- 
Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously.
 - Cincinnati Enquirer   



[PHP] image retrival from db?

2001-06-18 Thread Steve

Anyone have a pointer to a script or documentation on how to retrieve an
image that is stored in a database?

I can insert the image, but unable to display the image once retieved, i
apparently am missing something.


Thanks

Steve




[PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Todd A. Jacobs

PHP: 4.0.4pl1
MySQL: 3.23.36-1

I have the following code fragment, which uses the same connection
parameters elsewhere to *successfully* to retrieve data from a database,
so this doesn't appear to be a permissions problem with MySQL.

However, nothing happens with inserts; no rows are added at all. All I get
is a message form mysql_error() saying Query was empty.

Can anyone tell me what might be wrong?

$user_idx  = 1;
$objective = 1;
$question  = 'Foo';
$question_type = 'singular';

$connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
or die (No connection.\n);

$sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
'$question', '$question_type', NULL, NULL);

$result = mysql_db_query('item_db', $sql_query, $connection_id);

echo pre;
echo \nDebugging output:\n;
echo \tSQL: $sql\n;
echo \tError: , mysql_error(), \n;
echo \tLast insert ID: , mysql_insert_id(), \n;
echo \tResult: $result\n;
echo /pre\n;

-- 
Todd A. Jacobs
CodeGnome Consulting, LTD




[PHP] please try this on versions = 4.0.3pl1

2001-06-18 Thread Dennis Gearon

This should work and print out the contents of the test string
using EITHER version of the test string.

BUT, it only works when the string is one piece, and hasn't been
concatenated from other strings, at least with the contents of the
string I'm using.

Please email and let me know your version and it's behavior. Only
version 2 works for me.

?
/* //string version 1
$test_string = 
?XML version=\1.0\? . 
simple_object
  variable2Crikey Mate1/variable2
  variable1Crikey Mate2/variable1
/simple_object
;
*/

/* //string version 2
$test_string = 
?XML version=\1.0\?
simple_object
  variable2Crikey Mate1/variable2
  variable1Crikey Mate2/variable1
/simple_object
;
*/

echo(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 Transitional//EN\
HTML
HEAD
  TITLE test_XML_container /TITLE
  META NAME=\Generator\ CONTENT=\EditPlus\
  META NAME=\Author\ CONTENT=\\
  META NAME=\Keywords\ CONTENT=\\
  META NAME=\Description\ CONTENT=\\
/HEAD
BODY BGCOLOR=\#FF\\n);

$indexes;
$idx=0;
$src_array;
$XML_doc;

$p = XML_parser_create();
if( false == $p ){
  echo(br\nNO PARSER CREATED);
} else {
  XML_parser_set_option ( $p, XML_OPTION_CASE_FOLDING , false);
  XML_parser_set_option ( $p, XML_OPTION_SKIP_WHITE   , true );

  if( XML_parse_into_struct($p,$test_string,$src_array,$indexes)) {
XML_parser_free($p);
print_r($src_array);
  } else {
echo(br\nDID NOT PARSE CORRECTLY);
echo(br\n . $test_string );
  }
}
echo(\n/BODY
/HTML);
?



[PHP] Re: Lists are back up

2001-06-18 Thread Miles Thompson

Hoo-boy. It's been a long drought. I just checked my mail and PHP was 
BOLD. YAY!! THE LIST'S BACK UP!!

Wonderful!

More seriously ...

Can we get a report on what happened?

If this happens in the future, is there some way of putting an alternative 
in place quickly? For example, could phpbuilder take up the slack?

Could this outage lend fuel to the Who do you sue? and Open Source is 
unreliable schools. Having said that, I recognize that PHP-based sites 
around the world kept running, as did php.net itself.

Great to have this list back - Miles Thompson

At 12:15 PM 6/18/01 -0700, Rasmus Lerdorf wrote:
We have re-enabled the PHP mailing lists.  They are now running from a
temporary machine sitting on the floor of my spare bedroom.  A more
permanent home is in the works.

-Rasmus




Re: [PHP] variables in a e-mail

2001-06-18 Thread Steve Werby

Richard Kurth [EMAIL PROTECTED] wrote:
 How can I add a variable to an e-mail on the fly. Say I have a form on
 my page that the user fells in with data. but when he fills in the
 message things like Hello,$Variable are added before it is sent. Does
 this make sence

If you're using the mail() function set the message string to $msg_body.
Then build $msg_body from the form data.  If you're posting the form the
variables will be accessible within $HTTP_POST_VARS[], if you're within a
function you'll have to declare that array global first or access like
$GLOBALS[HTTP_POST_VARS][my_form_field].  So, in your example you'd do:

$msg_body = Hello,  . $GLOBALS[HTTP_POST_VARS][variable];

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/




[PHP] Apache/PHP4 Question

2001-06-18 Thread Devin Atencio


I have a Server Running Apache 1.3.14 and it has PHP4 running
as a module. For our customers we require that they use .cgi
for all of their scripts and so if a user wants to run a php4
script on our server they use www.blah.com/myphpfile.cgi with
of course the first line being #!/usr/local/bin/php4, then our
server runs the php4 script as the user rather than running
as the server username. 

I noticed a security whole if a customer stuck a .htaccess
file in the Directory and then added the following, it would
allow them to stick .php files in their home directory and have
it run as the server and be parsed automatically. Is there a way
to make it so that they can't do this and me not have to disable
the AllowOverride FileInfo, cause right now I have to disable that
feature cause of the security problem that it allowed to happen.

Anyone have any idea of what I can do?

   /'^'\
  ( o o )
--oOOO--(_)--OOOo
Devin Atencio
ArosNet Systems Administration .oooO
EMail: [EMAIL PROTECTED]   (   )   Oooo.
\ ((   )-
 \_)) /
   (_/
 



[PHP] PHP 4.0.5 Windows 2000 Server Getting Rid Of The Windows Authentication Still Being Able To Access PHP

2001-06-18 Thread Speakeasy News

Dear All;

Hi, this I imagine should be an easy question for some of the ex[perts out
there so please help. I have install PHP 4.0.5 on a WIndows 2000 Server SP2
with IIS CGI; and am using the php.exe. When I try and access a page
generated using php say like http://domain.com/page.php I get the Windows
2000 logon windows comes up. If I log in the page works fine, also I'm able
to access http://domain.com/cgi-bin/page.pl files without them bringing up
the logon screen.

I've gone into the web site properties and have recreated the site with all
anonymous setting and I still get the same thing When I go into Web Site
Security and turn off the Windows Authenicatiion  I get you are not
authorized to view this page even though it set to anonymous.

I've tried it usieng the deafult web site, creating a brand new web site,
still get the same thing. When I go and change the permissions on the
php.exe from within it's file properites and add more users I get CGI ERROR
Headers Not Acting right and not returning what they should and then it's
just blank, it never tells me what it isn't returning.

Also, I have the directory set up to allow everyone to read  run scripts
and executables, just not write

No matter what I do I either get yuou are not authorized to view this page,
or the logon screen and if I logon it works, or the CGI ERROR I mentioned
earlier.

I don't understand why I'm able to run a perl script and not a php
executable. I also get the same stuff if I try and access it locally on the
same machince it resides on.

I hope this gives you enough info to answer my question please help before I
really mess things up.

Sincerely

Brian





[PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked

2001-06-18 Thread Tom Beidler

I have a form with approximately 40 input fields. When a form is posted it
sends an email and then builds a tab delimited $txt entry for a text file on
the server.

The problem is that if a checkbox is not checked, when it's not required, I
don't get a blank entry in my tab file for the checkbox input. I'm imploding
my HTTP_POST_VARS variable like so;

reset($HTTP_POST_VARS);
  while (list($var, $value) = each($HTTP_POST_VARS)) {
if (is_array($value)){
  $txt .= implode($value, \t);
  $txt .= \t;
}
else{
  $txt .= $value\t;
}
 }
 $txt .= end\n;
 $flsfile = fopen(text/fls.txt, a);
 if ($flsfile){
fputs($flsfile, $txt);
fclose($flsfile);
 }

Is there a way to send a blank value if the checkbox is not set? Should I
use a completely different strategy? Have I said Thank you enough to Rasmus
Lerdorf and whomever else was involved in resuscitating the list?

Thanks Rasmus Lerdorf and all others involved for getting the list back up
and running.


.
Tom Beidler
Orbit Tech Services
805.682.8972 (phone)
805.682.5833 (fax)
[EMAIL PROTECTED]
http://www.orbittechservices.com/
.





[PHP] send data to a file composed of frames

2001-06-18 Thread kaab kaoutar

Hi guys!
I have a login in my site, some pictures and links are differents depending 
on being logged or not!
I thought of using sessions in the whole site, but the disadvantage is that, 
we can never go back in a the previous page, when using sessions.
i thought of using a hidden input in each page but some or rather almost all 
my pages are composed of frames and therefore the frames don't receive the 
login status!
Can u please help ?
THanks
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




[PHP] Multipe Tables, Single Query Problem

2001-06-18 Thread Simon Kimber

Hi all,

I have three tables in my (mysql) database:

videos - ID, title, description, etc..
links - ID, videoID, actorID
actors - ID, name, dateofbirth, gender, etc...

what i need to do is return a particular video and all it's staring actors
with just one query returning just one row, ie. with all the actor names in
one field... is this possible? or do i have to get the video data first and
then the actors separately?

Simon Kimber
Funny.co.uk - The Comedy Portal
http://www.funny.co.uk/

Now Incorporating: The UK Live Comedy Directory
FREE promotion for UK Comedy Acts and Venues
http://www.funny.co.uk/uklive/

eml. [EMAIL PROTECTED]
icq. 16156911





Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Tom Carter

Only a small little problem.. you called your sql query $sql and then in
your mysql_db_query line called it $sql_query..call them both the same name
and it should work!

HTH,Tom
- Original Message -
From: Todd A. Jacobs [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2001 12:11 AM
Subject: [PHP] INSERT problem with MySQL/PHP


 PHP: 4.0.4pl1
 MySQL: 3.23.36-1

 I have the following code fragment, which uses the same connection
 parameters elsewhere to *successfully* to retrieve data from a database,
 so this doesn't appear to be a permissions problem with MySQL.

 However, nothing happens with inserts; no rows are added at all. All I get
 is a message form mysql_error() saying Query was empty.

 Can anyone tell me what might be wrong?

 $user_idx  = 1;
 $objective = 1;
 $question  = 'Foo';
 $question_type = 'singular';

 $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
 or die (No connection.\n);

 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
 '$question', '$question_type', NULL, NULL);

 $result = mysql_db_query('item_db', $sql_query, $connection_id);

 echo pre;
 echo \nDebugging output:\n;
 echo \tSQL: $sql\n;
 echo \tError: , mysql_error(), \n;
 echo \tLast insert ID: , mysql_insert_id(), \n;
 echo \tResult: $result\n;
 echo /pre\n;

 --
 Todd A. Jacobs
 CodeGnome Consulting, LTD





Re: [PHP] Re: Lists are back up

2001-06-18 Thread Alexander Skwar

So sprach Clayton Dukes am Mon, Jun 18, 2001 at 05:38:26PM -0400:
 Why not just set your filter to look for [EMAIL PROTECTED] in the to
 or cc line?

Because not all filters support that, and it makes reading mails eg. via
webmail interfaces easier?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 6 hours 21 minutes



[PHP] email forms

2001-06-18 Thread Tim Thorburn

Hello,

First let me say its good to have this list back up and running - and now 
time for the questions to keep rolling in.

I've got an email form setup on a site (well actually many of them) to 
collect basic information from people which will eventually be entered into 
our local database and even more eventually be placed online ...

My forms work, they send the information fine ... my only complaint is that 
when you view the message in any email program, it comes from 
Underprivileged User with nobody@hosting company name here.com

I'd like to be able to change that to ... well anything other than 
Underprivileged User - for now its not the end of the world, only a few 
people are receiving this message, and all are internal working on the 
site.  What I'd like to be able to do is have the script send a message to 
the individuals who entered the information as a confirmation that we 
received their message.

Here is a sample of the script I'm using:

?
$toaddress = [EMAIL PROTECTED];
$subject = Business/Organization Form;
$mailcontent = Business/Organization Name: .$bname.\n
.First Name: .$fname.\n
.Last Name: .$lname.\n
.Phone: (.$ACphone.) .$phone.\n
.Fax: (.$ACfax.) .$fax.\n
.Cell: (.$ACcell. .$cell.\n
.Email Address: .$email.\n
.Website URL: .$url.\n
.Street: .$street.\n
.City: .$city.\n
.State/Province: .$state.\n
.Country: .$country.\n
.P.O. Box: .$pobox.\n
.Postal/ZIP Code: .$zip.\n
.Category: .$category.\n
.Sub-Category: .$subcategory.\n
.Brief Description of Business/Organization: 
.$description.\n
.Do you have a logo you'd like included: .$logo.\n
.Any additional comments: .$comments.\n;

$fromaddress = [EMAIL PROTECTED];

mail($toaddress, $subject, $mailcontent, $fromaddress);
?

I've spoken to the hosting company, they say they will not provide any 
assistance to PHP script related problems.  They are running on Solaris 
servers with PHP 3.0.16.

Thanks
-Tim




Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread David Robley

On Tue, 19 Jun 2001 08:41, Todd A. Jacobs wrote:
 PHP: 4.0.4pl1
 MySQL: 3.23.36-1

 I have the following code fragment, which uses the same connection
 parameters elsewhere to *successfully* to retrieve data from a
 database, so this doesn't appear to be a permissions problem with
 MySQL.

 However, nothing happens with inserts; no rows are added at all. All I
 get is a message form mysql_error() saying Query was empty.

 Can anyone tell me what might be wrong?

 $user_idx  = 1;
 $objective = 1;
 $question  = 'Foo';
 $question_type = 'singular';

 $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
   or die (No connection.\n);

 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
   '$question', '$question_type', NULL, NULL);

 $result = mysql_db_query('item_db', $sql_query, $connection_id);

 echo pre;
 echo \nDebugging output:\n;
 echo \tSQL: $sql\n;
 echo \tError: , mysql_error(), \n;
 echo \tLast insert ID: , mysql_insert_id(), \n;
 echo \tResult: $result\n;
 echo /pre\n;

Your INSERT statement is contained in the variable $sql but you are using 
$sql_query in the mysl_db_query function?

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   URA Redneck if your funeral has more pickup trucks than cars.



Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Developer

Try the following,

INSERT INTO questions(user_id,objective,question,question_type)
VALUES('$uawr_idx', '$objective', '$question', '$question_type')

Define the rows you want to insert into.

Hope this helps!

Regards,
Ray
- Original Message -
From: Todd A. Jacobs [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 4:11 PM
Subject: [PHP] INSERT problem with MySQL/PHP


 PHP: 4.0.4pl1
 MySQL: 3.23.36-1

 I have the following code fragment, which uses the same connection
 parameters elsewhere to *successfully* to retrieve data from a database,
 so this doesn't appear to be a permissions problem with MySQL.

 However, nothing happens with inserts; no rows are added at all. All I get
 is a message form mysql_error() saying Query was empty.

 Can anyone tell me what might be wrong?

 $user_idx  = 1;
 $objective = 1;
 $question  = 'Foo';
 $question_type = 'singular';

 $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
 or die (No connection.\n);

 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
 '$question', '$question_type', NULL, NULL);

 $result = mysql_db_query('item_db', $sql_query, $connection_id);

 echo pre;
 echo \nDebugging output:\n;
 echo \tSQL: $sql\n;
 echo \tError: , mysql_error(), \n;
 echo \tLast insert ID: , mysql_insert_id(), \n;
 echo \tResult: $result\n;
 echo /pre\n;

 --
 Todd A. Jacobs
 CodeGnome Consulting, LTD




[PHP] Module writing question: Sharing resources between modules

2001-06-18 Thread Yermo M. Lamers


I would like to port some Mysql code I have over to a PHP module.

To make things clean, I'd like the exported functions from my new module
to accept MySQL-Link resources as in:

$mysql_conn = mysql_connect(  );

my_custom_module_func( $mysql_conn );

From my reading of ext/mysql/php_mysql.c it looks like you need to have
access to the return code from zend_register_list_destructors_ex() in
order to be able to lookup the resource passed to you using
ZEND_FETCH_RESOURCE2().

In ext/mysql/php_mysql.c le_link and le_plink are declared static and
there doesn't seem to be a clean way of getting at them to get the
resources.

What am I missing? 

How can can I get at the MYSQL * connection set up by the mysql module
from within my module? I want to be able to do queries on an already
opened connection?

Any pointers to sample code or information would be greatly appreciated,

thanks,

-- Yermo 

-
   Try Personal Stock Monitor for Windows(tm) for FREE at:
 http://www.personalstockmonitor.com
   Powerful Desktop Software for Online Investors
-




[PHP] Templates??

2001-06-18 Thread Daniel Guerrier

What the true advantage of using templates and where
can I get info on using them?

__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/



Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Miles Thompson

Todd,

Did you echo $sql and examine it?
Did you try the statement at the mysql console?
Does the list of values exactly match the field list?
Did you try the alternate syntax 
INSERT [LOW_PRIORITY | DELAYED] [IGNORE]
[INTO] tbl_name
SET col_name=expression, col_name=expression, ...
as in the MySQL docs?

I'm really curious about what $sql looks like when you echo it. I've been 
surprised more than once.

Miles Thompson

At 04:11 PM 6/18/01 -0700, Todd A. Jacobs wrote:
PHP: 4.0.4pl1
MySQL: 3.23.36-1

I have the following code fragment, which uses the same connection
parameters elsewhere to *successfully* to retrieve data from a database,
so this doesn't appear to be a permissions problem with MySQL.

However, nothing happens with inserts; no rows are added at all. All I get
is a message form mysql_error() saying Query was empty.

Can anyone tell me what might be wrong?

 $user_idx  = 1;
 $objective = 1;
 $question  = 'Foo';
 $question_type = 'singular';

 $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
 or die (No connection.\n);

 $sql = INSERT INTO question VALUES (NULL, $user_idx, $objective,
 '$question', '$question_type', NULL, NULL);

 $result = mysql_db_query('item_db', $sql_query, $connection_id);

 echo pre;
 echo \nDebugging output:\n;
 echo \tSQL: $sql\n;
 echo \tError: , mysql_error(), \n;
 echo \tLast insert ID: , mysql_insert_id(), \n;
 echo \tResult: $result\n;
 echo /pre\n;

--
Todd A. Jacobs
CodeGnome Consulting, LTD