RE: [PHP-DB] sending bulk emails

2001-11-03 Thread Robert Klinkenberg

Always nice to know when something is not too serious :-).

-Oorspronkelijk bericht-
Van: Rick Emery [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, November 02, 2001 5:05 PM
Aan: PHP DB list
Onderwerp: RE: [PHP-DB] sending bulk emails


my comment was humor.  we've already explored and killed this thread.


-- 
PHP Database 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-DB] Forms error in a catalog by Greenspan Bulger

2001-11-03 Thread p.whiter

Hi

If you get yourself any decent text editor, it will have an option to show
line numbers.

Plenty of free editors here:

http://download.cnet.com/downloads/0,10151,0-4003619-106-0-1-0,00.html?tag=d
ir

Personally I use and would recommend 'Ultra-edit'

It would probably be a good idea to just post the line in question, due to
line wrapping in mail it is difficult to figure out without going through
the entire script where your error is.

HTH
Paul

- Original Message -
From: Darren [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 03, 2001 8:49 AM
Subject: [PHP-DB] Forms error in a catalog by Greenspan  Bulger


: Greetings All!
:
: I am working on making a catalog from the example used in MySQL/PHP
: Databases Applications by Jay Greenspan andBrad Bulger.  I am using
: php3 on the remote unix server.  I had to remain all the php files
: and there references in the documents from .php to .php3.  I am
: editing the code in a simple texteditor.
:
: Here is the problem.  I keep getting a Parse error on line 33.
: Question 1) How are you suposed count the lines? What is the exact
: definition of a line?
: Question 2) Can anybody tell me where the error is and or how to fix
: it?  Enclosed is the code.
:
: Thanks very much in advance for any help or comments.
:
: Darren
:
: Here Tis...
:
: ?php
: /*
: 
: *** This script from MySQL/PHP Database Applications ***
: *** by Jay Greenspan and Brad Bulger ***
: ***  ***
: ***   You are free to resuse the material in this***
: ***   script in any manner you see fit. There is ***
: ***   no need to ask for permission or provide   ***
: ***   credit.***
: 
: */
:
: // string start_form ([string action [, array attributes]])
:
: // This function returns an HTML form tag. If the first argument
: // is empty, the value of the global Apache variable SCRIPT_NAME
: // is used for the 'action' attribute of the form tag. Other
: // attributes for the form can be specified in the optional second
: // argument; the default method of the form is post.
:
: // The behavior of this function on servers other than Apache is
: // not known. It's likely that it will work, as SCRIPT_NAME is
: // part of the CGI 1.1 specification.
:
: function start_form ($action=, $atts=)
: {
: global $SCRIPT_NAME;
:
: if (empty($action)) { $action = $SCRIPT_NAME; }
:
: $attlist = get_attlist($atts,array(method=post));
: $output = EOQ
: form action=$action $attlist
: EOQ;
: return $output;
: }
:
: // string end_form(void)
:
: // This function returns an HTML /form tag.
:
: function end_form ()
: {
: $output = EOQ
: /form
: EOQ;
: return $output;
: }
:
: // string text_field ([string name [, string value [, int size [,
: int maximum length)
:
: // This function returns an HTML text input field. The default size
: // of the field is 10. A value and maximum data length for the field
: // may be supplied.
:
: function text_field ($name=, $value=, $size=10, $maxlen=)
: {
: $maxatt = empty($maxlen) ?  : maxlength=\$maxlen\;
: $output = EOQ
: input type=text name=$name value=$value size=$size $maxatt
: EOQ;
: return $output;
: }
:
: // string textarea_field([string name [, string value [, int cols [,
: int rows [, string wrap mode])
:
: // This function returns an HTML textarea field. The default size is
: // 50 columns and 10 rows, and the default wrap mode is 'soft',
: which means
: // no hard newline characters will be inserted after line breaks in what
: // the user types into the field. The alternative wrap mode is 'hard',
: // which means that hard newlines will be inserted.
:
: function textarea_field ($name=, $value=, $cols=50, $rows=10,
: $wrap=soft)
: {
: $output = EOQ
: textarea name=$name cols=$cols rows=$rows
: wrap=$wrap$value/textarea
: EOQ;
: return $output;
: }
:
: // string password_field ([string name [, string value [, int size
: [, int maximum length)
:
: // This function returns an HTML password field. This is like a text
: field,
: // but the value of the field is obscured (only stars or bullets are
: visible
: // for each character).  The default size of the field is 10.  A
: starting
: // value and maximum data length may be supplied.
:
: function password_field ($name=, $value=, $size=10, $maxlen=)
: {
: $output = EOQ
: input type=password name=$name value=$value size=$size
: maxlength=$maxlen
: EOQ;
: return $output;
: }
:
: // string hidden_field ([string name [, string value]])
:
: // This function returns an HTML hidden field. A value may be supplied.
:
: function hidden_field ($name=, $value=)
: {
: $output = EOQ
: input type=hidden name=$name value=$value
: EOQ;
: return $output;
: }
:
: // string file_field ([string name])
:
: // This function returns an HTML file field. These are used to specify
: // files on the 

Re: [PHP-DB] Forms error in a catalog by Greenspan Bulger

2001-11-03 Thread Darren

Excellent!! I'll do it!  I didn't know about the editors.  I'll let 
you know.

Thank you very much!

Darren

P.Whiter wrote:

 Hi
 
 If you get yourself any decent text editor, it will have an option to show
 line numbers.
 
 Plenty of free editors here:
 
 http://download.cnet.com/downloads/0,10151,0-4003619-106-0-1-0,00.html?tag=d
 ir
 
 Personally I use and would recommend 'Ultra-edit'
 
 It would probably be a good idea to just post the line in question, due to
 line wrapping in mail it is difficult to figure out without going through
 the entire script where your error is.
 
 HTH
 Paul
 
 - Original Message -
 From: Darren [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, November 03, 2001 8:49 AM
 Subject: [PHP-DB] Forms error in a catalog by Greenspan  Bulger
 
 
 : Greetings All!
 :
 : I am working on making a catalog from the example used in MySQL/PHP
 : Databases Applications by Jay Greenspan andBrad Bulger.  I am using
 : php3 on the remote unix server.  I had to remain all the php files
 : and there references in the documents from .php to .php3.  I am
 : editing the code in a simple texteditor.
 :
 : Here is the problem.  I keep getting a Parse error on line 33.
 : Question 1) How are you suposed count the lines? What is the exact
 : definition of a line?
 : Question 2) Can anybody tell me where the error is and or how to fix
 : it?  Enclosed is the code.
 :
 : Thanks very much in advance for any help or comments.
 :
 : Darren
 :
 : Here Tis...
 :
 : ?php
 : /*
 : 
 : *** This script from MySQL/PHP Database Applications ***
 : *** by Jay Greenspan and Brad Bulger ***
 : ***  ***
 : ***   You are free to resuse the material in this***
 : ***   script in any manner you see fit. There is ***
 : ***   no need to ask for permission or provide   ***
 : ***   credit.***
 : 
 : */
 :
 : // string start_form ([string action [, array attributes]])
 :
 : // This function returns an HTML form tag. If the first argument
 : // is empty, the value of the global Apache variable SCRIPT_NAME
 : // is used for the 'action' attribute of the form tag. Other
 : // attributes for the form can be specified in the optional second
 : // argument; the default method of the form is post.
 :
 : // The behavior of this function on servers other than Apache is
 : // not known. It's likely that it will work, as SCRIPT_NAME is
 : // part of the CGI 1.1 specification.
 :
 : function start_form ($action=, $atts=)
 : {
 : global $SCRIPT_NAME;
 :
 : if (empty($action)) { $action = $SCRIPT_NAME; }
 :
 : $attlist = get_attlist($atts,array(method=post));
 : $output = EOQ
 : form action=$action $attlist
 : EOQ;
 : return $output;
 : }
 :
 : // string end_form(void)
 :
 : // This function returns an HTML /form tag.
 :
 : function end_form ()
 : {
 : $output = EOQ
 : /form
 : EOQ;
 : return $output;
 : }
 :
 : // string text_field ([string name [, string value [, int size [,
 : int maximum length)
 :
 : // This function returns an HTML text input field. The default size
 : // of the field is 10. A value and maximum data length for the field
 : // may be supplied.
 :
 : function text_field ($name=, $value=, $size=10, $maxlen=)
 : {
 : $maxatt = empty($maxlen) ?  : maxlength=\$maxlen\;
 : $output = EOQ
 : input type=text name=$name value=$value size=$size $maxatt
 : EOQ;
 : return $output;
 : }
 :
 : // string textarea_field([string name [, string value [, int cols [,
 : int rows [, string wrap mode])
 :
 : // This function returns an HTML textarea field. The default size is
 : // 50 columns and 10 rows, and the default wrap mode is 'soft',
 : which means
 : // no hard newline characters will be inserted after line breaks in what
 : // the user types into the field. The alternative wrap mode is 'hard',
 : // which means that hard newlines will be inserted.
 :
 : function textarea_field ($name=, $value=, $cols=50, $rows=10,
 : $wrap=soft)
 : {
 : $output = EOQ
 : textarea name=$name cols=$cols rows=$rows
 : wrap=$wrap$value/textarea
 : EOQ;
 : return $output;
 : }
 :
 : // string password_field ([string name [, string value [, int size
 : [, int maximum length)
 :
 : // This function returns an HTML password field. This is like a text
 : field,
 : // but the value of the field is obscured (only stars or bullets are
 : visible
 : // for each character).  The default size of the field is 10.  A
 : starting
 : // value and maximum data length may be supplied.
 :
 : function password_field ($name=, $value=, $size=10, $maxlen=)
 : {
 : $output = EOQ
 : input type=password name=$name value=$value size=$size
 : maxlength=$maxlen
 : EOQ;
 : return $output;
 : }
 :
 : // string hidden_field ([string name [, string value]])
 :
 : // This function returns an HTML hidden field. A value may be 

Re: [PHP-DB] Forms error in a catalog by Greenspan Bulger

2001-11-03 Thread Darren

Thanks for the help on the free editors.

Line 31 is blank

The section is as follows:

// string start_form ([string action [, array attributes]])

// This function returns an HTML form tag. If the first argument
// is empty, the value of the global Apache variable SCRIPT_NAME
// is used for the 'action' attribute of the form tag. Other
// attributes for the form can be specified in the optional second
// argument; the default method of the form is post.

// The behavior of this function on servers other than Apache is
// not known. It's likely that it will work, as SCRIPT_NAME is
// part of the CGI 1.1 specification.

function start_form ($action=, $atts=)
{
global $SCRIPT_NAME;

if (empty($action)) { $action = $SCRIPT_NAME; }
//this is line 31//
$attlist = get_attlist($atts,array(method=post));
$output = EOQ
form action=$action $attlist
EOQ;
return $output;
}


What do you think?

Thanks Darren


P.Whiter wrote:

 Hi
 
 If you get yourself any decent text editor, it will have an option to show
 line numbers.
 
 Plenty of free editors here:
 
 http://download.cnet.com/downloads/0,10151,0-4003619-106-0-1-0,00.html?tag=d
 ir
 
 Personally I use and would recommend 'Ultra-edit'
 
 It would probably be a good idea to just post the line in question, due to
 line wrapping in mail it is difficult to figure out without going through
 the entire script where your error is.
 
 HTH
 Paul
 



-- 
PHP Database 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-DB] Forms error in a catalog by Greenspan Bulger (sorry line 33)

2001-11-03 Thread Darren


Sorry for the last post it is line 33

As follows

// string start_form ([string action [, array attributes]])

// This function returns an HTML form tag. If the first argument
// is empty, the value of the global Apache variable SCRIPT_NAME
// is used for the 'action' attribute of the form tag. Other
// attributes for the form can be specified in the optional second
// argument; the default method of the form is post.

// The behavior of this function on servers other than Apache is
// not known. It's likely that it will work, as SCRIPT_NAME is
// part of the CGI 1.1 specification.

function start_form ($action=, $atts=)
{
global $SCRIPT_NAME;

if (empty($action)) { $action = $SCRIPT_NAME; }

$attlist = get_attlist($atts,array(method=post));
$output = EOQ  //this is line 33//
form action=$action $attlist
EOQ;
return $output;
}


*

Remember I'm running php3 I'm going to look at the manuel from 
switching  php3 to 4 and see if it mentions anything.

I'm still very new to php

Thanks

Darren



-- 
PHP Database 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-DB] EOQ what does it mean??

2001-11-03 Thread Darren

Greetings,

I bought the bookMySQL/PHP Database Applications by Jay Greenspan 
and Brad Bulger, and in I discovered some code that I don't 
understand and I can't find reference to it anywhere. (in the php 
manuel, book, php website etc.) does anyone know what it means and 
if it php3 compatible.  It is used in the following code:

Here tis

// string start_form ([string action [, array attributes]])

// This function returns an HTML form tag. If the first argument
// is empty, the value of the global Apache variable SCRIPT_NAME
// is used for the 'action' attribute of the form tag. Other
// attributes for the form can be specified in the optional second
// argument; the default method of the form is post.

// The behavior of this function on servers other than Apache is
// not known. It's likely that it will work, as SCRIPT_NAME is
// part of the CGI 1.1 specification.

function start_form ($action=, $atts=)
{
global $SCRIPT_NAME;

if (empty($action)) { $action = $SCRIPT_NAME; }

$attlist = get_attlist($atts,array(method=post));
$output = EOQ
form action=$action $attlist
EOQ;
return $output;
}




Thanks for your comments and help in advance


Darren


-- 
PHP Database 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-DB] EOQ what does it mean??

2001-11-03 Thread p.whiter

If you look up 'here doc' in the manual you will see that the reference to
EOQ below is part of that, you can use whatever you like in place of EOQ, I
think your problem is that 'here doc' is not supported in php 3

Try replacing the lines

$output = EOQ
form action=$action $attlist
EOQ;

with

$output = print(form action=\$action\ $attlist);

HTH
Paul


- Original Message -
From: Darren [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

: I bought the bookMySQL/PHP Database Applications by Jay Greenspan
: and Brad Bulger, and in I discovered some code that I don't
: understand and I can't find reference to it anywhere. (in the php
: manuel, book, php website etc.) does anyone know what it means and
: if it php3 compatible.  It is used in the following code:
:
: Here tis
:
: // string start_form ([string action [, array attributes]])
:
: // This function returns an HTML form tag. If the first argument
: // is empty, the value of the global Apache variable SCRIPT_NAME
: // is used for the 'action' attribute of the form tag. Other
: // attributes for the form can be specified in the optional second
: // argument; the default method of the form is post.
:
: // The behavior of this function on servers other than Apache is
: // not known. It's likely that it will work, as SCRIPT_NAME is
: // part of the CGI 1.1 specification.
:
: function start_form ($action=, $atts=)
: {
: global $SCRIPT_NAME;
:
: if (empty($action)) { $action = $SCRIPT_NAME; }
:
: $attlist = get_attlist($atts,array(method=post));
: $output = EOQ
: form action=$action $attlist
: EOQ;
: return $output;
: }


-- 
PHP Database 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-DB] Nothing returned

2001-11-03 Thread Martin

Why am I not getting anything returned from this function?
I have code doing a if user exists and b if user doesn't exist. I'm not 
getting any numRows result apparently. The query is OK and returns 1 user 
for $name=admin. I'm not getting any errors from isError.

Martin

function exists($name)
{

$sql = SELECT * FROM users WHERE (name='$name');
$res = $db-query($sql);
if (DB::isError($res)) {
die ($res-getMessage());
}
if($res)
{
$Rows = $res-numRows();
if($Rows  0)
{
return(TRUE);
} else
{
return(FALSE);
}
}
}

-- 
PHP Database 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-DB] Unwanted Column Updating

2001-11-03 Thread Jeff Oien

I have this which inserts a stock trade entry:

$sql1 = INSERT INTO $table_name 
(stock, shares, LorS, type, price1, time1) VALUES
(\$stock\, \$shares\, \$LorS\, \$type\, \$price1\, NOW());

With price1 being the entry price and time1 the date/time of entry. 
Then when I exit the trade it will do this:

$sql1 = update $table_name set stock = '$stock', 
shares = '$shares', LorS = '$LorS', type = '$type', 
price1 = '$price1', price2 = '$price2', time2 = NOW() where id = '$id';

However, time1 is being updated to be the same as time2 after 
the exit and I don't want it to be. Am I missing something?
Jeff Oien

-- 
PHP Database 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-DB] Nothing returned

2001-11-03 Thread boclair


- Original Message - 
From: Martin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 04, 2001 8:29 AM
Subject: [PHP-DB] Nothing returned


: Why am I not getting anything returned from this function?
: I have code doing a if user exists and b if user doesn't exist. I'm not 
: getting any numRows result apparently. The query is OK and returns 1 user 
: for $name=admin. I'm not getting any errors from isError.
: 
: Martin
: 
: function exists($name)
: {
: 
: $sql = SELECT * FROM users WHERE (name='$name');

How about 
$name=admin

and 
WHERE name=$name

Tim Morris


-- 
PHP Database 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-DB] Unwanted Column Updating

2001-11-03 Thread DL Neil

 I have this which inserts a stock trade entry:

 $sql1 = INSERT INTO $table_name
 (stock, shares, LorS, type, price1, time1) VALUES
 (\$stock\, \$shares\, \$LorS\, \$type\, \$price1\, NOW());

 With price1 being the entry price and time1 the date/time of entry.
 Then when I exit the trade it will do this:

 $sql1 = update $table_name set stock = '$stock',
 shares = '$shares', LorS = '$LorS', type = '$type',
 price1 = '$price1', price2 = '$price2', time2 = NOW() where id = '$id';

 However, time1 is being updated to be the same as time2 after
 the exit and I don't want it to be. Am I missing something?


Jeff,

The information provided does not say, but are the timeN columns declared as TIMESTAMP 
data types?
In which case time1 is not being 'replaced' by time2, but being the first TIMESTAMP 
field is being updated to
the NOW() time of the UPDATE operation.
Please read up about automatic updating in the manual 7.3 Column Types and 7.3.3.2 The 
DATETIME, DATE, and
TIMESTAMP Types.
If correct, recommend changing data type to Integer(10) - must be at least 4Bytes, to 
hold the timestamp value
but not be subject to update.

Regards,
=dn



-- 
PHP Database 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-DB] EOQ what does it mean??

2001-11-03 Thread Darren

Paul,

You are exactly right from what I can tell.  I did you you suggested 
and it worked!  There are several of those in the document.  Looked 
it up in the book and have a limited idea on what it is, and also 
learning from your example I have a better Idea.  But I did a search 
for here docs, on the PHP site and couldn't find anything.  I think 
I can probably figure out the other 6 or 7 in the document but I 
can't figure this on out.


here tis

// This function returns an HTML /form tag.

function end_form ()
{
$output = EOQ
/form
EOQ;

return $output;
}

***
I know this must be simple but I just can't get it yet.  I tried 
experimenting and putting other code in there to replace it but 
nothing has worked... yet.

Thanks again for the help

Darren

PS here is the next one in case you felt like looking at it

// This function returns an HTML text input field. The default size
// of the field is 10. A value and maximum data length for the field
// may be supplied.

function text_field ($name=, $value=, $size=10, $maxlen=)
{
$maxatt = empty($maxlen) ?  : maxlength=\$maxlen\;
$output = EOQ
input type=text name=$name value=$value size=$size $maxatt
EOQ;
return $output;
}

P.Whiter wrote:

 If you look up 'here doc' in the manual you will see that the reference to
 EOQ below is part of that, you can use whatever you like in place of EOQ, I
 think your problem is that 'here doc' is not supported in php 3
 
 Try replacing the lines
 
 $output = EOQ
 form action=$action $attlist
 EOQ;
 
 with
 
 $output = print(form action=\$action\ $attlist);
 
 HTH
 Paul
 
 
 - Original Message -
 From: Darren [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 
 : I bought the bookMySQL/PHP Database Applications by Jay Greenspan
 : and Brad Bulger, and in I discovered some code that I don't
 : understand and I can't find reference to it anywhere. (in the php
 : manuel, book, php website etc.) does anyone know what it means and
 : if it php3 compatible.  It is used in the following code:
 :
 : Here tis
 :
 : // string start_form ([string action [, array attributes]])
 :
 : // This function returns an HTML form tag. If the first argument
 : // is empty, the value of the global Apache variable SCRIPT_NAME
 : // is used for the 'action' attribute of the form tag. Other
 : // attributes for the form can be specified in the optional second
 : // argument; the default method of the form is post.
 :
 : // The behavior of this function on servers other than Apache is
 : // not known. It's likely that it will work, as SCRIPT_NAME is
 : // part of the CGI 1.1 specification.
 :
 : function start_form ($action=, $atts=)
 : {
 : global $SCRIPT_NAME;
 :
 : if (empty($action)) { $action = $SCRIPT_NAME; }
 :
 : $attlist = get_attlist($atts,array(method=post));
 : $output = EOQ
 : form action=$action $attlist
 : EOQ;
 : return $output;
 : }
 
 


-- 
PHP Database 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-DB] Nothing returned

2001-11-03 Thread Peter Lovatt

$sql = SELECT * FROM users WHERE (name='$name')

if you are not getting an error, it is usually worth echoing the query SQL

echo $sql ;

and perhaps trying it manually.

Is it possible the quotes around the $name are giving

SELECT * FROM users WHERE (name='$name')
and not evaluating $name

rather than

SELECT * FROM users WHERE (name='fred')

which you wanted

Peter


 : Why am I not getting anything returned from this function?
 : I have code doing a if user exists and b if user doesn't exist. I'm not
 : getting any numRows result apparently. The query is OK and
 returns 1 user
 : for $name=admin. I'm not getting any errors from isError.
 :
 : Martin
 :
 : function exists($name)
 : {
 :
 : $sql = SELECT * FROM users WHERE (name='$name');

 How about
 $name=admin

 and
 WHERE name=$name

 Tim Morris


 --
 PHP Database 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 Database 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-DB] EOQ what does it mean??

2001-11-03 Thread p.whiter

If you are running windows, I suggest you download the .chm version of the
php manual, great for easy searching and bookmarking pages etc.

http://uk2.php.net/distributions/manual/manual-en.chm

To answer your question, the first piece of code will be, replace:

$output = EOQ
/form
EOQ;

with

$output = print(/form);

and the next replace:

$output = EOQ
input type=text name=$name value=$value size=$size $maxatt
EOQ;

with

$output =print(input type=\text\ name=\$name\ value=\$value\
size=\$size\ $maxatt);

When using the print statement you must remember to escape all  within the
parenthesis with \

 Paul

- Original Message -
From: Darren [EMAIL PROTECTED]


: You are exactly right from what I can tell.  I did you you suggested
: and it worked!  There are several of those in the document.  Looked
: it up in the book and have a limited idea on what it is, and also
: learning from your example I have a better Idea.  But I did a search
: for here docs, on the PHP site and couldn't find anything.  I think
: I can probably figure out the other 6 or 7 in the document but I
: can't figure this on out.
:
:
: here tis
:
: // This function returns an HTML /form tag.
:
: function end_form ()
: {
: $output = EOQ
: /form
: EOQ;
:
: return $output;
: }
:
: ***
: I know this must be simple but I just can't get it yet.  I tried
: experimenting and putting other code in there to replace it but
: nothing has worked... yet.
:
: Thanks again for the help
:
: Darren
:
: PS here is the next one in case you felt like looking at it
:
: // This function returns an HTML text input field. The default size
: // of the field is 10. A value and maximum data length for the field
: // may be supplied.
:
: function text_field ($name=, $value=, $size=10, $maxlen=)
: {
: $maxatt = empty($maxlen) ?  : maxlength=\$maxlen\;
: $output = EOQ
: input type=text name=$name value=$value size=$size $maxatt
: EOQ;
: return $output;
: }
:



-- 
PHP Database 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-DB] Nothing returned

2001-11-03 Thread Martin

Peter Lovatt wrote:

 $sql = SELECT * FROM users WHERE (name='$name')
 
 if you are not getting an error, it is usually worth echoing the query SQL
 
 echo $sql ;
 
 and perhaps trying it manually.
 
 Is it possible the quotes around the $name are giving
 
 SELECT * FROM users WHERE (name='$name')
 and not evaluating $name
 
 rather than
 
 SELECT * FROM users WHERE (name='fred')
 
 which you wanted

echo $sql gives me:
SELECT * FROM users WHERE (name='admin') 
when entering admin as user. So the name is passed to the function but from 
then on ...

M.

-- 
PHP Database 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-DB] Function Prolem parse error

2001-11-03 Thread Darren

Howdy all

Paul if your there I have another issue similar to the past.  It is 
probably a PHP3 to PHP4 problem.

Here tis

function hidden_field ($name=, $value=)

*
I have no clue what could be wrong.

Thanks

Oh I think I got the rest fixed.  Thanks for the help.  I think I 
have a few left that are after this error, so I'll know for sure 
after I get this taken care of.

I am doing the sight on a Mac (I know its against the grain 
somewhat, but not on purpose)

Thanks

Darren


-- 
PHP Database 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-DB] include shell scripts

2001-11-03 Thread sharmad

I m making a web based config tool in which i require to configure a package
via browser but whats happening in that if i give the command in system() call
then the packege is being tried to install as nobody user (default apache user)
.Pls give me the link about how to go about it (other than CGI) or any other
information 

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